31142023-02-16 13:59:25PallanekPéterTükörtojás (75 pont)python3Accepted 75/7554ms14180 KiB
n=int(input())
kezdet=input()
eloirt=input()
db=0; i=n-1
if kezdet[n-1]!=eloirt[n-1]:
    db+=1
while i!=-1:
    if db%2==0:
        if kezdet[i]!=eloirt[i]:
            db+=1
    else:
        if kezdet[i]==eloirt[i]:
            db+=1
    i-=1
print(db)
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms10896 KiB
2Accepted0/037ms11724 KiB
3Accepted5/517ms11552 KiB
4Accepted5/517ms12040 KiB
5Accepted5/517ms12148 KiB
6Accepted5/517ms12392 KiB
7Accepted5/517ms12328 KiB
8Accepted5/518ms12532 KiB
9Accepted5/518ms12516 KiB
10Accepted5/517ms12772 KiB
11Accepted5/518ms13072 KiB
12Accepted5/552ms13592 KiB
13Accepted5/554ms13612 KiB
14Accepted5/554ms13688 KiB
15Accepted5/552ms13812 KiB
16Accepted5/552ms13608 KiB
17Accepted5/552ms14180 KiB