BEGIN-4 Fibonacci数列
while True:
try:
n = int(input())
res1, res2 = 1, 1
for i in range(3, n+1):
res1, res2 = res2%10007, (res1 + res2)%10007
print(res2)
except:
break
BEGIN-3 圆的面积
import math
while True:
try:
r = float(input())
s = math.pi * r * r
print("{:.7f}".format(s))
except:
break
BEGIN-2 序列求和
while True:
try:
n = int(input())
print(int((1+n)*n/2))
except:
break
BEGIN-1 A+B问题
while True:
try:
s = list(map(int, input().split()))
print(sum(s))
except:
break
编程小白记录成长