답안 #1007975

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007975 2024-06-26T04:20:06 Z vjudge1 Magnus (COCI18_magnus) Python 3
30 / 50
49 ms 3672 KB
inp=input()
# word = "PROHODNIHODNIK"

n = inp.count("HONI")

result = []

target = "HONI"
temp = ""

wordcount = 0
tempcount = 0

while wordcount < len(inp):
    if temp == target:
        result.append(temp)
        tempcount = 0
        temp = ""
    if inp[wordcount] != target[tempcount]:
        wordcount += 1
    elif inp[wordcount] == target[tempcount]:
        temp += inp[wordcount]
        tempcount+=1
        wordcount+=1
    
print(len(result))
# 결과 실행 시간 메모리 Grader output
1 Incorrect 10 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 10 ms 2972 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 12 ms 3144 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2908 KB Output is correct
2 Correct 10 ms 2908 KB Output is correct
3 Correct 11 ms 2948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 2908 KB Output is correct
2 Correct 10 ms 2920 KB Output is correct
3 Correct 10 ms 2772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 38 ms 3452 KB Output is correct
2 Correct 47 ms 3588 KB Output is correct
3 Correct 36 ms 3420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 44 ms 3392 KB Output is correct
2 Correct 37 ms 3420 KB Output is correct
3 Correct 45 ms 3588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 49 ms 3412 KB Output is correct
2 Correct 39 ms 3580 KB Output is correct
3 Correct 36 ms 3412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 37 ms 3420 KB Output is correct
2 Correct 44 ms 3420 KB Output is correct
3 Correct 37 ms 3412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 37 ms 3672 KB Output is correct
2 Incorrect 38 ms 3408 KB Output isn't correct
3 Halted 0 ms 0 KB -