0
点赞
收藏
分享

微信扫一扫

P5719 【深基4.例3】分类平均(python3实现)

ITWYY 2022-02-02 阅读 32

【深基4.例3】分类平均 - 洛谷

"""

P5719 【深基4.例3】分类平均
https://www.luogu.com.cn/problem/P5719

"""

n,k=map( int,input().split() )

c=n//k

a=c*(c+1)/2*k

b=n*(n+1)/2-a

print( "%.1f" %(a/c),end=" " )
print( "%.1f" %(b/(n-c)) )


举报

相关推荐

0 条评论