Submission details
Task:Hacking hashes
Sender:aalto25l_002
Submission time:2025-11-19 17:48:32 +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.08 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.08 sdetails
#400.07 sdetails
#410.10 sdetails
#420.09 sdetails
#430.08 sdetails
#440.09 sdetails
#450.07 sdetails
#460.07 sdetails
#470.08 sdetails
#480.09 sdetails
#490.08 sdetails
#500.07 sdetails
#510.10 sdetails
#520.07 sdetails
#530.09 sdetails
#540.09 sdetails
#550.09 sdetails
#560.10 sdetails
#570.08 sdetails
#580.10 sdetails
#590.12 sdetails
#600.13 sdetails
#610.10 sdetails
#620.14 sdetails
#630.08 sdetails
#640.12 sdetails
#650.14 sdetails
#660.14 sdetails
#670.15 sdetails
#680.15 sdetails
#690.14 sdetails
#700.10 sdetails
#710.15 sdetails
#720.16 sdetails
#730.12 sdetails
#740.12 sdetails
#750.17 sdetails
#760.14 sdetails
#770.14 sdetails
#780.16 sdetails
#790.10 sdetails
#800.17 sdetails
#810.17 sdetails
#820.12 sdetails
#830.16 sdetails
#840.14 sdetails
#850.16 sdetails
#860.15 sdetails
#870.16 sdetails
#880.15 sdetails
#890.17 sdetails
#900.16 sdetails

Code

from random import randint 
import os
A,B = [int(x) for x in input().split()]

dict = {}

def F(s):
    h = 0
    for c in s:
        h = (h * A + ord(c)) % B
    return h

while True:

    s = ''.join(chr(97 + randint(0, 25)) for i in range(randint(4,8)))
    k = F(s)

    if k in dict:
        print(s)
        print(dict[s])
        break
    else:
        dict[k]=s


Test details

Test 1

Verdict:

input
6 6

correct output
dxvdzxfqi oheo

user output
rxicbjmg

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'rxicbjmg'

Test 2

Verdict:

input
5 10

correct output
yzzzeszzyc uuhdakc

user output
fikns

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'fikns'

Test 3

Verdict:

input
5 2

correct output
oheo yzzzeszzyc

user output
fwupt

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'fwupt'

Test 4

Verdict:

input
6 1

correct output
dxvdzxfqi oheo

user output
jkakou

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'jkakou'

Test 5

Verdict:

input
10 10

correct output
yzzzeszzyc uuhdakc

user output
nnyceoe

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nnyceoe'

Test 6

Verdict:

input
3 1

correct output
dxvdzxfqi oheo

user output
btumc

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'btumc'

Test 7

Verdict:

input
9 10

correct output
oheo yzzzeszzyc

user output
kigiqo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'kigiqo'

Test 8

Verdict:

input
1 3

correct output
dxvdzxfqi oheo

user output
izxporpo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'izxporpo'

Test 9

Verdict:

input
9 1

correct output
dxvdzxfqi oheo

user output
gvmw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'gvmw'

Test 10

Verdict:

input
1 4

correct output
oheo yzzzeszzyc

user output
owfamcr

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'owfamcr'

Test 11

Verdict:

input
78 30

correct output
dxvdzxfqi uuhdakc

user output
wghgdpy

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'wghgdpy'

Test 12

Verdict:

input
19 7

correct output
dxvdzxfqi uuhdakc

user output
exzkoigm

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'exzkoigm'

Test 13

Verdict:

input
16 45

correct output
yrrkt aihwbdczv

user output
copcp

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'copcp'

Test 14

Verdict:

input
78 61

correct output
oedtdfgv zgivhgayf

user output
gixqkyh

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'gixqkyh'

Test 15

Verdict:

input
52 93

correct output
yzzzeszzyc uuhdakc

user output
pjmgywlw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'pjmgywlw'

Test 16

Verdict:

input
85 82

correct output
dxvdzxfqi onbkb

user output
nweo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nweo'

Test 17

Verdict:

input
23 33

correct output
yzzzeszzyc aekmllmqu

user output
xwfrwhi

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'xwfrwhi'

Test 18

Verdict:

input
30 19

correct output
oheo jftb

user output
xyyxb

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'xyyxb'

Test 19

Verdict:

input
66 8

correct output
yzzzeszzyc uuhdakc

user output
ubokunsw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ubokunsw'

Test 20

Verdict:

input
10 44

correct output
uuhdakc gvnyskxly

user output
ppzqli

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ppzqli'

Test 21

Verdict:

input
589 888

correct output
irnrs nvmno

user output
natznudg

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'natznudg'

Test 22

Verdict:

input
49 800

correct output
irnrs nvmno

user output
fjpkodfr

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'fjpkodfr'

Test 23

Verdict:

input
209 702

correct output
yzzzeszzyc bpuse

user output
dehzgyyy

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dehzgyyy'

Test 24

Verdict:

input
518 670

correct output
nvmno mgmo

user output
dxaseb

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dxaseb'

Test 25

Verdict:

input
961 295

correct output
aekmllmqu wcpqoadrw

user output
gpvenw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'gpvenw'

Test 26

Verdict:

input
871 697

correct output
xfwgyq eokm

user output
ephryvi

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ephryvi'

Test 27

Verdict:

input
308 714

correct output
nvmno lcwlpcmzza

user output
iusi

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'iusi'

Test 28

Verdict:

input
426 481

correct output
onbkb kqupmfo

user output
rphhvms

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'rphhvms'

Test 29

Verdict:

input
730 171

correct output
eqdlmuyo wpvfat

user output
mcvt

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'mcvt'

Test 30

Verdict:

input
864 801

correct output
wpvfat onbkb

user output
nnfkvnwe

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nnfkvnwe'

Test 31

Verdict:

input
6442 9170

correct output
wgqgje blui

user output
mllmoe

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'mllmoe'

Test 32

Verdict:

input
2861 290

correct output
wpvfat onbkb

user output
mglgl

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'mglgl'

Test 33

Verdict:

input
8589 597

correct output
oheo uuhdakc

user output
yqek

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'yqek'

Test 34

Verdict:

input
2486 6897

correct output
zlscxfnxo ngvkz

user output
nruo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nruo'

Test 35

Verdict:

input
386 1958

correct output
vdihr miezzgst

user output
euthej

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'euthej'

Test 36

Verdict:

input
4581 4498

correct output
uxqojd rhvuifulrn

user output
nxwabo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nxwabo'

Test 37

Verdict:

input
7286 877

correct output
irnrs iphgzlf

user output
kpqc

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'kpqc'

Test 38

Verdict:

input
9445 1393

correct output
hdwsfcnq veukbhkw

user output
vevpzl

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'vevpzl'

Test 39

Verdict:

input
3848 8971

correct output
xshrtktoj fcuzyfii

user output
nnzer

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nnzer'

Test 40

Verdict:

input
5469 57

correct output
dxvdzxfqi yzzzeszzyc

user output
zwqq

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'zwqq'

Test 41

Verdict:

input
40770 64402

correct output
tced hbmnyt

user output
tnfwzwi

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'tnfwzwi'

Test 42

Verdict:

input
25093 68059

correct output
ljrc wjxknzhykr

user output
vpopxiw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'vpopxiw'

Test 43

Verdict:

input
37455 79656

correct output
tppoycpya wviirv

user output
tnulrysz

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'tnulrysz'

Test 44

Verdict:

input
11506 49687

correct output
xaupctgiid jcdd

user output
vkbfe

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'vkbfe'

Test 45

Verdict:

input
83486 43255

correct output
bodw cdmncijoh

user output
ljoabel

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ljoabel'

Test 46

Verdict:

input
98903 30455

correct output
xshrtktoj pofnegkmkq

user output
yzlanhrd

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'yzlanhrd'

Test 47

Verdict:

input
78385 25806

correct output
fnyjzygwa zyfhqqpkk

user output
pgsy

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'pgsy'

Test 48

Verdict:

input
11350 85178

correct output
tsgztkzvwc rkra

user output
azlsu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'azlsu'

Test 49

Verdict:

input
1750 42650

correct output
rlmle czxwmutnse

user output
jxlgt

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'jxlgt'

Test 50

Verdict:

input
30097 47375

correct output
zlscxfnxo ayfmd

user output
coqo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'coqo'

Test 51

Verdict:

input
494714 129204

correct output
czxwmutnse hudvk

user output
xmyc

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'xmyc'

Test 52

Verdict:

input
675884 327185

correct output
rlmle rejxztcu

user output
klfvq

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'klfvq'

Test 53

Verdict:

input
823296 823560

correct output
ratyx aurscmksx

user output
dhfvdio

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dhfvdio'

Test 54

Verdict:

input
846854 678908

correct output
rfpuucjk yjndrg

user output
riwzzmu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'riwzzmu'

Test 55

Verdict:

input
420278 193978

correct output
begabk sqac

user output
vwpjtun

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'vwpjtun'

Test 56

Verdict:

input
93130 695227

correct output
nkomreccwl dfboyzq

user output
thijea

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'thijea'

Test 57

Verdict:

input
984414 95962

correct output
plsmw rufywewnbq

user output
rdqj

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'rdqj'

Test 58

Verdict:

input
87370 612080

correct output
psmbxgyf yzwvwyf

user output
kxivmce

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'kxivmce'

Test 59

Verdict:

input
365188 833610

correct output
jbbjpkxs asruylwnc

user output
jtkyt

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'jtkyt'

Test 60

Verdict:

input
924244 804799

correct output
bxok beqs

user output
baeq

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'baeq'

Test 61

Verdict:

input
3012218 7755483

correct output
rzhfdn bhig

user output
bptum

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'bptum'

Test 62

Verdict:

input
8254242 8634301

correct output
gleo mavrtxor

user output
okyu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'okyu'

Test 63

Verdict:

input
337938 5429289

correct output
hexlssw zxdfne

user output
vidydvw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'vidydvw'

Test 64

Verdict:

input
5545825 4865884

correct output
copwroka xebbxy

user output
ascpw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ascpw'

Test 65

Verdict:

input
3795375 7727646

correct output
rgde yqleban

user output
ovjf

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ovjf'

Test 66

Verdict:

input
2188983 8702106

correct output
zmjbhiiqo gyrickzf

user output
nytr

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'nytr'

Test 67

Verdict:

input
1544663 1956286

correct output
lwvsjair peplyj

user output
lowj

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'lowj'

Test 68

Verdict:

input
5464835 7522941

correct output
wjctw wqbqsqcdqg

user output
ovxp

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ovxp'

Test 69

Verdict:

input
2596718 4049688

correct output
nvyasakcug bsbyew

user output
revivhdg

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'revivhdg'

Test 70

Verdict:

input
2965922 4020437

correct output
zthes oazfss

user output
jdkpu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'jdkpu'

Test 71

Verdict:

input
56122287 60624959

correct output
hgllxkyp oukmzblohw

user output
npaq

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'npaq'

Test 72

Verdict:

input
42645140 73661194

correct output
xkdotul jvryawmaj

user output
qdgj

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'qdgj'

Test 73

Verdict:

input
44585330 18926703

correct output
yqmfko hogdxzgt

user output
fdyw

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'fdyw'

Test 74

Verdict:

input
56325214 7232406

correct output
wvmuumpi weyyifgfw

user output
roky

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'roky'

Test 75

Verdict:

input
98889561 92098565

correct output
xcesn xvzzheobbo

user output
dskl

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dskl'

Test 76

Verdict:

input
22701272 5642782

correct output
lescyxpmpw hkszwirdqk

user output
ltxh

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ltxh'

Test 77

Verdict:

input
91304885 96889971

correct output
rnve dxgzxms

user output
mriu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'mriu'

Test 78

Verdict:

input
7803372 23247950

correct output
aofeuxbryn bgcepuzv

user output
mlcn

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'mlcn'

Test 79

Verdict:

input
89317875 1136575

correct output
kfdzbbelk esohyirdk

user output
dqhno

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dqhno'

Test 80

Verdict:

input
1060874 37270195

correct output
pkkvrpnjgw aoljv

user output
ihnrnmm

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ihnrnmm'

Test 81

Verdict:

input
828199235 320792352

correct output
cmqjomgda cyptxxyb

user output
tbzx

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'tbzx'

Test 82

Verdict:

input
193563111 73343920

correct output
gtswukro ziuzhijy

user output
gvou

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'gvou'

Test 83

Verdict:

input
165531091 479126951

correct output
ozbczatbfr nplek

user output
qhhu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'qhhu'

Test 84

Verdict:

input
835051605 652127789

correct output
ypkbe jvzy

user output
axiu

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'axiu'

Test 85

Verdict:

input
551842459 989875543

correct output
ajtuqsqbs tqboquks

user output
ovev

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'ovev'

Test 86

Verdict:

input
911411059 873575358

correct output
bhhhipl bcgsdgu

user output
fukg

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'fukg'

Test 87

Verdict:

input
239756971 350744380

correct output
gddvcp osie

user output
wtdy

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'wtdy'

Test 88

Verdict:

input
316394140 195182397

correct output
jthyube jxvfzsh

user output
qfpkz

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'qfpkz'

Test 89

Verdict:

input
698334027 81615941

correct output
ikrcixfxr ugacbxbd

user output
hvpo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'hvpo'

Test 90

Verdict:

input
104725912 462211740

correct output
alzppvu qlyi

user output
dnvo

Error:
Traceback (most recent call last):
  File "input/code.py", line 20, in <module>
    print(dict[s])
KeyError: 'dnvo'