python-algorithm

백준 26489 Gum Gum for Jay Jay

무적김두칠 2022. 12. 17. 14:57

https://www.acmicpc.net/problem/26489

 

26489번: Gum Gum for Jay Jay

You are lost in the museum and keep walking by a giant rock head that says “gum gum for jay jay” each time you walk by. Print out the number of times you have walked by the giant rock head after reading in the data file.

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
if __name__ == '__main__':
    cnt = 0
    while 1:
        try:
            s = input()
            cnt += 1
        except:
            print(cnt)
            break
cs
반응형