zhby @ 2025-01-10 21:57:11
下载了第一个测试点,明明是对的,但现实WA。
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,t;
int cnt=0;
cin>>n>>k;
while(n){
cnt+=n;
t+=n;
n=0;
n+=(t-t%k)/k;
t=t%k;
}
cout<<cnt;
return 0;
}
by LionBlaze @ 2025-01-10 22:04:27
尴尬了,l2147483647l 不是楼上。
by I2147483647I @ 2025-01-10 22:04:44
或者编译选项加-Wall
by I2147483647I @ 2025-01-10 22:06:28
@zhby
能壶关否?
by zhby @ 2025-01-10 22:22:03
我用的是DEV,它啥也没说。
另外,谢谢各位大佬!
by zhby @ 2025-01-10 22:22:48
好吧,又得从300格人种挤出几个空隙了