初音のミク @ 2020-08-20 16:23:34
为啥10和3输出14?不是13?
by rui_er @ 2020-08-20 16:25:09
10 个换 3 个,3 个再换 1 个
by FifthAxiom @ 2020-08-20 16:25:26
新拿的烟的烟蒂也要算
by 血色黄昏 @ 2020-08-20 16:25:38
自己手推,10+3+1
by konjacq @ 2020-08-20 16:25:50
by qzcbw @ 2020-08-20 16:26:32
by 初音のミク @ 2020-08-20 16:39:22
#include <iostream>
using namespace std;
int main( )
{
int n,k,ans,tmp=0;
cin>>n>>k;
ans=n/k;
if(ans>=k) tmp++;
cout<<n+ans+tmp;
return 0;
}
by 初音のミク @ 2020-08-20 16:39:59
第三个点老是出错
by 零殇 @ 2020-08-20 16:42:05
ans>=k并不代表只能换一个
by 零殇 @ 2020-08-20 16:42:22
建议用while
by George1123 @ 2020-08-20 16:44:19
您是机器思维吧