# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1007833 |
2024-06-25T14:16:43 Z |
vjudge1 |
Magnus (COCI18_magnus) |
Python 3 |
|
20 ms |
3168 KB |
def switch(current):
if current == 'H':
return 'O'
elif current == 'O':
return 'N'
elif current == 'N':
return 'I'
elif current == 'I':
return 'H'
s = input()
current = 'H'
count = 0
for val in s:
if val == current:
if val == 'I':
count += 1
current = switch(current)
print(count)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2764 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2812 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
2820 KB |
Output is correct |
2 |
Correct |
11 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
3160 KB |
Output is correct |
2 |
Correct |
19 ms |
3164 KB |
Output is correct |
3 |
Correct |
18 ms |
3164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
3164 KB |
Output is correct |
2 |
Correct |
20 ms |
3164 KB |
Output is correct |
3 |
Correct |
19 ms |
3164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
3164 KB |
Output is correct |
2 |
Correct |
20 ms |
3164 KB |
Output is correct |
3 |
Correct |
19 ms |
3164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
3168 KB |
Output is correct |
2 |
Correct |
19 ms |
3164 KB |
Output is correct |
3 |
Correct |
20 ms |
3164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
3164 KB |
Output is correct |
2 |
Correct |
19 ms |
3164 KB |
Output is correct |
3 |
Correct |
18 ms |
3164 KB |
Output is correct |