题目描述
Find the sum of the following three numbers, and keep the result of 2 decimal places.
1.Sum of 1~a
2.Sum of the square of 1~b
3.Sum of the reciprocal of 1~c.
输入
a b c, 3 integers less than or equal to 100
输出
1+2+…+a + 12+22+…+b^2 + 1/1+1/2+…+1/c
样例输入 Copy
100 50 10
样例输出 Copy
47977.93
a,b,c=map(int,input().split())
s=0
for i in range(1,a+1):
s=s+i
for i in range(1,b+1):
s=s+i*i
for i in range(1,c+1):
s=s+1/i
print('%.2f'%s)```