본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 4696번 St. Ives

by 현장 2022. 9. 29.

-Code

while 1:
    n = float(input())
    if n == 0:
        break
    res = round(n ** 0 + n ** 1 + n ** 2 + n ** 3 + n ** 4, 2)
    print("%.2f" % res)