Programming/Python

[정올] 2604:그릇

pental 2020. 3. 27. 23:50

a = input()
result = list(a)
list_count = len(result)
height = 10
for i in range (1, list_count):
    if (result[i] == result[i - 1]):
        height += 5
    elif (result[i] != result[i - 1]):
        height += 10
    else:
        print("Err")
print(height)

https://github.com/kim-do-hyeon/jungol/blob/master/2604/2604.py

 

kim-do-hyeon/jungol

Contribute to kim-do-hyeon/jungol development by creating an account on GitHub.

github.com