Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
335801 | 李俞家骅 | 【C2-4】小虫爬墙 | C++ | 解答错误 | 0 | 1 MS | 244 KB | 204 | 2025-07-24 09:27:07 |
#include<bits/stdc++.h> using namespace std; int main(){ int x,y,i=0,s=0; cin>>x>>y; while(s<=x){ i++; s=s+i; if(x<=s) s=s-y; } cout<<i+1; return 0; }