This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |