Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
335807 | 李俞家骅 | 【C2-4】小虫爬墙 | C++ | 通过 | 100 | 2 MS | 248 KB | 227 | 2025-07-24 09:41: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+y; if(x<=s) break; i++; s=s-1; } cout<<i; return 0; }