题解 | #球的体积与表面积#
球的体积与表面积
http://www.nowcoder.com/practice/5d315b9f93df4935b8d216c14e6db4be
import math
pi = math.pi
a = input().split(" ")
for i in a:
r = int(i)
print("%.3f" % (pi*r*r*r/3*4), "%.3f" % (4*pi*r*r))
球的体积与表面积
http://www.nowcoder.com/practice/5d315b9f93df4935b8d216c14e6db4be
import math
pi = math.pi
a = input().split(" ")
for i in a:
r = int(i)
print("%.3f" % (pi*r*r*r/3*4), "%.3f" % (4*pi*r*r))
相关推荐