1
2
3
4
5
6
7
8
9
10
11
|
def sol(n):
ans=0
for i in range(5):
ans += n**i
return ans
while 1:
n=float(input())
if n==0 :
break
print("%.2f"%sol(n))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
codeforces 1714C - Minimum Varied Number (0) | 2022.08.18 |
---|---|
백준 4589 Gnome Sequencing (0) | 2022.08.02 |
codeforces 200B - Drinks (0) | 2022.07.20 |
leetcode 1702A - Round Down the Price (0) | 2022.07.19 |
leetcode 1702B - Polycarp Writes a String from Memory (0) | 2022.07.19 |
댓글