Submission details
Task:Babaza Game
Sender:andy_btw_
Submission time:2025-09-01 17:49:38 +0300
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.06 sdetails
#20.06 sdetails
#30.06 sdetails
#40.06 sdetails
#50.06 sdetails
#60.06 sdetails
#70.07 sdetails
#80.06 sdetails
#90.06 sdetails
#100.06 sdetails
#110.06 sdetails
#120.06 sdetails
#130.06 sdetails
#140.06 sdetails

Code



a,b = [str(x) for x in input().split()]
print(a)
#print(b)

def change_letter(word,i):
    first_half = word[:i]
    second_half = word[(i+1):]
    complete_word = first_half + b[i] + second_half
    return complete_word

letter_array = []
index_array = []
correct_array = []


for i in range(len(a)):
    if a[i]!=b[i]:
        letter_array.append(a[i])
        index_array.append(i)
        correct_array.append(b[i])

for i in index_array:
    a = change_letter(a,i)
print(a)




#def check_next(i):
#    for x in index_array:
#        if i+1 == x: #existuje písmenko na dalším indexu

Test details

Test 1

Verdict:

input
A
B

correct output
A
B

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 2

Verdict:

input
BABAZA
BACBCB

correct output
BABAZA
BACACA
BACBCB

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 3

Verdict:

input
AB
BA

correct output
AB
CB
CA
BA

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 4

Verdict:

input
ABC
BCD

correct output
ABC
DBD
DCD
BCD

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 5

Verdict:

input
AXYB
CXYD

correct output
AXYB
CXYD

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 6

Verdict:

input
LMIJLF
PAQBMH

correct output
LMIJLF
PMQJMF
PAQBMH

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 7

Verdict:

input
PNIWLSLIH
CRLVPUFHD

correct output
PNIWLSLIH
CNLWPSFID
CRLVPUFHD

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 8

Verdict:

input
ZDYIAVTKL
ZJKVXGAUM

correct output
ZDYIAVTKL
ZJYVAGTUL
ZJKVXGAUM

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 9

Verdict:

input
FBIXISJH
NXZIESMG

correct output
FBIXISJH
NBZXESMH
NXZIESMG

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 10

Verdict:

input
OPGW
QJIE

correct output
OPGW
QPIW
QJIE

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 11

Verdict:

input
DUKNPKQZBL
NZPBMOEBIC

correct output
DUKNPKQZBL
NUPNMKEZIL
NZPBMOEBIC

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 12

Verdict:

input
ZWDTX
HZOXI

correct output
ZWDTX
HWOTI
HZOXI

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 13

Verdict:

input
URJF
ITIQ

correct output
URJF
IRIF
ITIQ

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...

Test 14

Verdict:

input
WYWBWU
IRYVBA

correct output
WYWBWU
WRWVWA
IRYVBA

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    a,b = [...