python求助!

P5719 【深基4.例3】分类平均

EC75 @ 2021-12-09 22:39:33

h=0
n,k=map(int,input().split())
for i in range(n):
    h+=i
print("%.1f ", float(h)/(n/k))
h=(1+n)*n/2-h
print("%.1f\n", float(h)/(n-n/k))

by hjx100825 @ 2022-02-09 11:22:16

@continue_and_break 不能直接print啊


|