CSES - Aalto Competitive Programming 2024 - wk8 - Mon - Results
Submission details
Task:Piva and Glasses
Sender:htoik
Submission time:2024-10-28 16:27:57 +0200
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.04 sdetails
#20.04 sdetails
#30.04 sdetails
#40.04 sdetails
#50.04 sdetails
#60.04 sdetails
#70.04 sdetails
#80.04 sdetails
#90.04 sdetails
#100.04 sdetails
#110.04 sdetails
#120.04 sdetails
#130.04 sdetails
#140.04 sdetails
#150.04 sdetails
#160.04 sdetails
#170.04 sdetails
#180.04 sdetails
#190.04 sdetails
#200.04 sdetails
#210.04 sdetails
#220.04 sdetails
#230.04 sdetails
#240.04 sdetails
#250.04 sdetails
#260.04 sdetails
#270.04 sdetails
#280.04 sdetails
#290.04 sdetails
#300.04 sdetails

Code

import sys
import math
def factorial(x):
    f = 1
    for n in range(2,x+1):
        f *= x
    return f
s = input()
s2 = set(s)
print(int(factorial(len(s)) / factorial(len(s)-len(s2)+1)))

Test details

Test 1

Verdict:

input
mynbiqpmzjplsgqejeydtzirwztejd...

correct output
253955382019371746305129921157...

user output
129299201744311376050888482646...

Test 2

Verdict:

input
szycidpyopumzgdpamntyyawoixzhs...

correct output
551108061158008078173415475169...

user output
540986759434766186535889128967...

Test 3

Verdict:

input
bcclfxzvjitgtbsvfnumzxqlroqiba...

correct output
305421613370742845795015587427...

user output
299137934411066983322621580448...

Test 4

Verdict:

input
sreltpusctapirhgwprrpmuehueqmx...

correct output
140037512077395979638061040922...

user output
829680274929725956671582952813...

Test 5

Verdict:

input
jdxmpeccamrjzybhqrliyfdigauziz...

correct output
348940989405062643281218932084...

user output
667114975699616475018987202679...

Test 6

Verdict:

input
ixlzwxuqaoyhubfdlphmrdshaxgnif...

correct output
523444502687933447128799316928...

user output
555855542104812570670854955586...

Test 7

Verdict:

input
scpyibaevspyxlkyaipzgxnrrvdgsr...

correct output
804291277421765770488004812470...

user output
267540699427040905143604884528...

Test 8

Verdict:

input
emubcrdlsbqgbcnnchcrnbsdhuusbs...

correct output
539368193886087805857792545271...

user output
270621819726072931998951351206...

Test 9

Verdict:

input
lmegwbcehzqgmuaopompsgmcphyawi...

correct output
665407925762077489110285862326...

user output
244041306150722295526886720077...

Test 10

Verdict:

input
tliefvakqotckrtwbxmfwoxnffhbde...

correct output
129648761524634643411433104526...

user output
288637182827358552157832847863...

Test 11

Verdict:

input
bnpsagopiuzfbqpkchxlbnetlmnjvi...

correct output
254352633815523810681607015996...

user output
632270715220827904536339433128...

Test 12

Verdict:

input
ryooqsgfzqputzfdojecrzwubtmoux...

correct output
212452622895141284453529611450...

user output
157893819601701666630938875481...

Test 13

Verdict:

input
ivqvlemalpiuzowthravteolfkgbsg...

correct output
732490220763260338635928880269...

user output
520193490108730030341292929327...

Test 14

Verdict:

input
jvvzfuhvehuxfecrgxjanevtaieczz...

correct output
518420681110543932377602451247...

user output
811976554355143026518133412083...

Test 15

Verdict:

input
twyuqhixijxcvojovmmydihklzilzu...

correct output
364802587715444496585869643172...

user output
120069949104262100017004154875...

Test 16

Verdict:

input
gaqxbfhabzvewlhdkowlimilhglzkh...

correct output
476873862461844332247115208362...

user output
387036968682324588149134339456...

Test 17

Verdict:

input
ppjnhoanvwihuhajjkvextjazhtiae...

correct output
767343312313426142222306561536...

user output
486510787108357302084364926864...

Test 18

Verdict:

input
nzjljfywwrvidahmxniqzkuvxmerbe...

correct output
910297874112935296564114827261...

user output
613338131050304339911841620947...

Test 19

Verdict:

input
dvokhgpupfpjoigiwdkqvyzfzhfhgx...

correct output
188739064612275094017617681593...

user output
134269489884123202336869015478...

Test 20

Verdict:

input
bzqdqgmlqjsetidinkidykjastgcgd...

correct output
232461691179008854504057599827...

user output
475845926984568826399003350053...

Test 21

Verdict:

input
xvzyeivudksfanncdekpsonggkuvkk...

correct output
285713951274252866113989732127...

user output
770234862963555197157941645530...

Test 22

Verdict:

input
nwnujpgzpzqfqqhzaalsncezyhhwbn...

correct output
731682739693843565903082665678...

user output
435642263101611338645376440335...

Test 23

Verdict:

input
ehatofwdxulzchibktfrvxnwbsasij...

correct output
450074573205377125973875496260...

user output
323263748292324241453135626248...

Test 24

Verdict:

input
yjcasjnmqlexgioahtoadcwpnaquxn...

correct output
596345160784615487534168536470...

user output
132290029486899138407722006929...

Test 25

Verdict:

input
msfgfgfvvcwyezwjxyaooxudaqfpxo...

correct output
717476109909956801533326919144...

user output
172673887199654204224137923258...

Test 26

Verdict:

input
yagjupbyibjsndsdsvxgqztkfrlqpq...

correct output
235583496947932628535470171742...

user output
145424819968362841972069586996...

Test 27

Verdict:

input
gvgntrbeyypbxvtqfunhxnwgzwavhe...

correct output
111088422779874450993038450753...

user output
588213332765510707913727122456...

Test 28

Verdict:

input
pwijgccirkilmfhhpcxusuctnynxbv...

correct output
446346258489784916012992902633...

user output
160165548577467899135342870442...

Test 29

Verdict:

input
xertwfheuoynggemfetgganhcdnkwe...

correct output
283497304854230709850344401214...

user output
125586643154361835098291047192...

Test 30

Verdict:

input
clttjcqlmnabdouhzlcpktrnxgofhn...

correct output
218953374961690394340463245163...

user output
216698497087863564163672577375...