Submission #161448

# Submission time Handle Problem Language Result Execution time Memory
161448 2019-11-02T15:22:05 Z boolodifjenula Magnus (COCI18_magnus) Python 3
50 / 50
112 ms 3736 KB
N=input()
k="I"
m=0
for i in range(len(N)):
    if N[i]=="H" and k=="I":
        k="H"
    if N[i]=="O" and k=="H":
        k="O"
    if N[i]=="N" and k=="O":
        k="N"
    if N[i]=="I" and k=="N":
        k="I"
        m+=1
print(m)
# Verdict Execution time Memory Grader output
1 Correct 30 ms 3300 KB Output is correct
2 Correct 25 ms 3300 KB Output is correct
3 Correct 25 ms 3300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 3300 KB Output is correct
2 Correct 26 ms 3336 KB Output is correct
3 Correct 25 ms 3300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 3308 KB Output is correct
2 Correct 28 ms 3300 KB Output is correct
3 Correct 27 ms 3300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 3300 KB Output is correct
2 Correct 25 ms 3300 KB Output is correct
3 Correct 26 ms 3472 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 3300 KB Output is correct
2 Correct 25 ms 3300 KB Output is correct
3 Correct 26 ms 3304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 86 ms 3512 KB Output is correct
2 Correct 83 ms 3520 KB Output is correct
3 Correct 86 ms 3644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 87 ms 3664 KB Output is correct
2 Correct 84 ms 3648 KB Output is correct
3 Correct 91 ms 3640 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 88 ms 3736 KB Output is correct
2 Correct 112 ms 3620 KB Output is correct
3 Correct 86 ms 3520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 85 ms 3644 KB Output is correct
2 Correct 88 ms 3648 KB Output is correct
3 Correct 83 ms 3644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 87 ms 3620 KB Output is correct
2 Correct 83 ms 3600 KB Output is correct
3 Correct 85 ms 3520 KB Output is correct