| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 325298 | 沈心 | 【C2-4】购买礼物 | C++ | Accepted | 100 | 1 MS | 248 KB | 155 | 2025-06-05 16:42:07 |
#include<iostream> using namespace std; int main(){ int s=0,c=0,n,m=1; cin>>n; while(s<n){ c++; s=s+m; m++; } cout<<c; return 0; }