Submission details
Task:Trading NFTs
Sender:aalto25i_002
Submission time:2025-10-29 16:42:04 +0200
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.07 sdetails
#20.07 sdetails
#30.07 sdetails
#40.07 sdetails
#50.07 sdetails
#60.07 sdetails
#70.07 sdetails
#80.07 sdetails
#90.07 sdetails
#100.07 sdetails
#110.07 sdetails
#120.07 sdetails
#130.07 sdetails
#140.07 sdetails
#150.07 sdetails
#160.07 sdetails
#170.07 sdetails
#180.07 sdetails
#190.07 sdetails
#200.07 sdetails
#210.07 sdetails
#220.07 sdetails
#230.07 sdetails
#240.07 sdetails
#250.07 sdetails
#260.07 sdetails
#270.07 sdetails
#280.07 sdetails
#290.07 sdetails
#300.07 sdetails
#310.07 sdetails
#320.07 sdetails
#330.07 sdetails
#340.07 sdetails
#350.07 sdetails
#360.07 sdetails
#370.07 sdetails
#380.07 sdetails
#390.07 sdetails
#400.07 sdetails
#410.07 sdetails
#420.07 sdetails
#430.07 sdetails
#440.07 sdetails
#450.07 sdetails
#460.07 sdetails
#470.07 sdetails
#480.07 sdetails
#490.07 sdetails
#500.07 sdetails
#510.07 sdetails
#520.07 sdetails
#530.07 sdetails
#540.07 sdetails
#550.07 sdetails
#560.07 sdetails
#570.07 sdetails
#580.07 sdetails
#590.07 sdetails
#600.07 sdetails
#610.07 sdetails
#620.07 sdetails
#630.07 sdetails
#640.07 sdetails

Code

from math import comb
from string import ascii_lowercase

aa = ord("a")
word = input()
nums = [0]*len(ascii_lowercase)
for ch in word:
	nums[ord(ch)-aa] += 1

positions = len(word)
possible = 1
# print(comb(27, 1))
for chCount in nums:
	if chCount == 0:
		continue
	combsInThis = comb(positions, chCount)
	possible *= combsInThis
	positions -= chCount
print(possible)

Test details

Test 1

Verdict:

input
1

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 2

Verdict:

input
2
6 9 

correct output
3

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 3

Verdict:

input
2
7 3 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 4

Verdict:

input
3
8 8 3 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 5

Verdict:

input
3
7 7 3 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 6

Verdict:

input
4
3 4 10 0 

correct output
7

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 7

Verdict:

input
4
6 2 1 7 

correct output
6

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 8

Verdict:

input
4
7 10 10 5 

correct output
3

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 9

Verdict:

input
4
7 6 3 1 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 10

Verdict:

input
5
6 6 7 9 6 

correct output
3

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 11

Verdict:

input
5
10 4 7 10 0 

correct output
6

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 12

Verdict:

input
5
4 2 0 10 6 

correct output
10

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 13

Verdict:

input
5
7 6 0 3 9 

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 14

Verdict:

input
5
10 9 6 1 10 

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 15

Verdict:

input
5
9 9 2 2 0 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 16

Verdict:

input
5
9 10 2 3 9 

correct output
8

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 17

Verdict:

input
5
0 2 8 3 4 

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 18

Verdict:

input
5
10 9 0 2 9 

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 19

Verdict:

input
5
0 4 5 5 5 

correct output
5

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 20

Verdict:

input
10
6 6 7 9 6 9 5 9 4 6 

correct output
12

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 21

Verdict:

input
10
4 7 10 10 0 1 3 1 2 10 

correct output
18

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 22

Verdict:

input
10
2 4 10 10 6 5 4 0 4 3 

correct output
12

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 23

Verdict:

input
10
6 0 7 9 3 1 5 6 9 4 

correct output
17

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 24

Verdict:

input
10
10 9 1 6 6 7 7 9 10 6 

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 25

Verdict:

input
10
2 0 9 9 2 4 10 10 5 0 

correct output
17

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 26

Verdict:

input
10
9 0 0 2 3 9 10 1 4 10 

correct output
19

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 27

Verdict:

input
10
8 2 0 3 4 7 10 5 10 3 

correct output
15

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 28

Verdict:

input
10
0 2 4 5 9 9 10 2 4 8 

correct output
16

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 29

Verdict:

input
10
0 0 1 1 3 4 5 5 5 0 

correct output
5

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 30

Verdict:

input
100
21709340 60895094 76274387 935...

correct output
972142477

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 31

Verdict:

input
100
122815 99147812 137572578 1575...

correct output
4604249565

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 32

Verdict:

input
100
27838075 198730371 467423860 4...

correct output
5968879174

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 33

Verdict:

input
100
980649967 962387378 958794495 ...

correct output
3338942575

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 34

Verdict:

input
100
587586157 967034923 969780558 ...

correct output
3901827208

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 35

Verdict:

input
100
59249203 221963001 238363352 3...

correct output
5618403578

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 36

Verdict:

input
100
958701282 356460600 224848373 ...

correct output
13822815556

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 37

Verdict:

input
100
17083618 26735341 70798610 773...

correct output
3327534770

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 38

Verdict:

input
100
937837680 11934037 257096282 9...

correct output
15276203568

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 39

Verdict:

input
100
8099342 11139167 14304400 4160...

correct output
3600585409

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 40

Verdict:

input
200
589284011 636562059 767928733 ...

correct output
33586949170

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 41

Verdict:

input
200
447773961 773442531 122815 137...

correct output
32881219020

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 42

Verdict:

input
200
27838075 165814380 198730371 2...

correct output
8854147317

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 43

Verdict:

input
200
591414746 75940262 760367934 9...

correct output
29427504978

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 44

Verdict:

input
200
967034923 918715994 767527829 ...

correct output
10337652892

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 45

Verdict:

input
200
995683002 995017887 993902125 ...

correct output
2165105185

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 46

Verdict:

input
200
958701282 886061723 881788058 ...

correct output
2469034633

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 47

Verdict:

input
200
81935403 244103473 837431430 3...

correct output
29954939049

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 48

Verdict:

input
200
937837680 11934037 257096282 9...

correct output
31589834039

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 49

Verdict:

input
200
998298460 993451116 993426019 ...

correct output
1492242772

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 50

Verdict:

input
1000
921212094 909729625 906523440 ...

correct output
53453101665

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 51

Verdict:

input
1000
447773961 773442531 122815 137...

correct output
168890114732

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 52

Verdict:

input
1000
916948986 908988479 878564253 ...

correct output
4480030569

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 53

Verdict:

input
1000
999247240 996968045 996364069 ...

correct output
4201826090

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 54

Verdict:

input
1000
967034923 587586157 185430193 ...

correct output
165301071885

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 55

Verdict:

input
1000
238363352 59249203 934941691 8...

correct output
164615942063

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 56

Verdict:

input
1000
958701282 881788058 653343571 ...

correct output
56392971596

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 57

Verdict:

input
1000
81935403 244103473 837431430 3...

correct output
160939345542

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 58

Verdict:

input
1000
937837680 933290529 876668628 ...

correct output
3903860846

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 59

Verdict:

input
1000
11139167 391337047 538883743 5...

correct output
177362129341

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 60

Verdict:

input
100000
589284011 636562059 767928733 ...

correct output
16723625891645

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 61

Verdict:

input
100000
999962171 999912371 999862119 ...

correct output
9220956790

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 62

Verdict:

input
100000
26016 76911 117593 132697 1908...

correct output
6853130410

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 63

Verdict:

input
100000
591414746 75940262 760367934 9...

correct output
16637307295604

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...

Test 64

Verdict:

input
100000
967034923 587586157 185430193 ...

correct output
16655555368186

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    nums[or...