警示后人
查看原帖
警示后人
329672
Ninelife_Cat楼主2021/11/2 20:24

如果您的代码中有以下写法

cout<<(int)ceil(n*1.0/k)+ans<<endl;

会 被 卡 精 度

必须换成

cout<<(n+k-1)/k+ans<<endl;

才能过

2021/11/2 20:24
加载中...