def honiblock(word):
word = word+"X"
result = []
target = "HONI"
temp = ""
wordcount = 0
tempcount = 0
while wordcount < len(word):
if temp == target:
result.append(temp)
tempcount = 0
temp = ""
if word[wordcount] != target[tempcount]:
wordcount += 1
elif word[wordcount] == target[tempcount]:
temp += word[wordcount]
tempcount+=1
wordcount+=1
print(len(result))
honiblock(str(input()))
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2760 KB |
Output is correct |
3 |
Correct |
15 ms |
2796 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2756 KB |
Output is correct |
3 |
Correct |
10 ms |
2988 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
2908 KB |
Output is correct |
2 |
Correct |
10 ms |
2828 KB |
Output is correct |
3 |
Correct |
10 ms |
2908 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
3420 KB |
Output is correct |
2 |
Correct |
27 ms |
3420 KB |
Output is correct |
3 |
Correct |
26 ms |
3420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
27 ms |
3420 KB |
Output is correct |
2 |
Correct |
34 ms |
3460 KB |
Output is correct |
3 |
Correct |
26 ms |
3500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
3412 KB |
Output is correct |
2 |
Correct |
24 ms |
3420 KB |
Output is correct |
3 |
Correct |
27 ms |
3420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
3420 KB |
Output is correct |
2 |
Correct |
25 ms |
3420 KB |
Output is correct |
3 |
Correct |
27 ms |
3412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
27 ms |
3420 KB |
Output is correct |
2 |
Correct |
28 ms |
3420 KB |
Output is correct |
3 |
Correct |
26 ms |
3552 KB |
Output is correct |