输出两位小数
print("%2.f"%n)
其中n是一个2位小数
不间断读取,直到 EOF
可以结合下面这道题看看:
while True:
try:
n, m = map(int, input().strip().split())
res = 0
for i in range(m):
res += n
p = n
n = p ** 0.5
print("%.2f"%res)
except EOFError:
break
【python刷题必备】python小点
阅读 81
2022-09-03
print("%2.f"%n)
其中n是一个2位小数
可以结合下面这道题看看:
while True:
try:
n, m = map(int, input().strip().split())
res = 0
for i in range(m):
res += n
p = n
n = p ** 0.5
print("%.2f"%res)
except EOFError:
break
相关推荐
精彩评论(0)