# DCP-59: Permutation Back to All Problems

Easy Math > Counting

You are given a string. You have to answer how many permutations are possible of that string. Suppose the string is "aab", then the 3 possible permutations are "aab", "aba" and "baa". Input: ------ Input starts with an integer **T (1<=100000)**, denoting the number of test cases. Each of next T lines describes a new test case. Each case contains a string of lower case letters not more than 20 characters. Output: ------- You should output T lines each of which indicates the answer for the corresponding query. Check the sample output for clarification. Sample Input ------------ 2 ab aab Sample Output ------------- 2 3

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 2.00 Go 2.00 Java 2.00 JavaScript 2.00 Objective-C 2.00 Perl 2.00 PHP 2.00 Python 2.00 Python3 2.00 Ruby 2.00 VB.Net 2.00

# 120/354

Solve/Submission

### Ranking

# User Language Timing
01 anik_JU Cpp14 0.04s
02 afzalul Cpp 0.05s
03 tariqiitju Cpp14 0.06s
04 MAHRahat Cpp14 0.07s
05 Indro_BU Cpp14 0.07s
06 feodorv C 0.07s
07 mir003 Cpp14 0.07s
08 Morass Cpp14 0.08s
09 souravahmed C 0.11s
11 Core_i14 Cpp14 0.14s
13 emrul Cpp14 0.15s
14 Rakib05 Cpp 0.15s
15 abdulmukit Cpp 0.15s
16 Robbinb1993 Cpp14 0.15s
17 a_rahman Cpp14 0.17s
18 onucsecu Cpp14 0.19s
19 nazmul_bzs Cpp14 0.20s
20 mahmud2690 Cpp14 0.21s
21 haasib Cpp14 0.21s
22 Silent_Warrior Cpp 0.22s
23 mash02 Cpp 0.22s
24 mamun02inf Cpp14 0.23s
25 pulak_ict_mbstu Cpp14 0.23s
26 joymollick Cpp 0.24s
27 Ansarul_14 Cpp14 0.26s
28 mrinmoi Cpp 0.27s
29 seyedssz Cpp14 0.30s
30 waqqas Cpp14 0.32s
31 ammasum Cpp14 0.36s
32 lolcoder Cpp14 0.38s
34 10102020 Cpp 0.48s
35 Masum_ice Cpp14 0.50s
36 moshiur_cse15 Cpp14 0.61s
37 rayhan50001 Cpp14 0.70s
38 _dipu Cpp14 0.72s
39 7Mahfuz Cpp14 0.74s
40 Logic_Hunter Cpp 0.75s
41 subhashis_cse Cpp14 0.80s
42 duronto20 Cpp14 0.81s
43 mahbub07 Cpp14 0.82s
44 jualahmed Cpp14 0.84s
45 SakibAlamin Cpp14 0.90s
46 Taj025 CSharp 0.91s
47 Tanmoy Cpp14 0.92s
48 rana_cse Cpp14 0.98s
49 RandyWaterhouse Python3 1.02s
50 jabir_hstu Cpp14 1.13s
Feedback