提交时间:2024-12-21 11:55:14
运行 ID: 2756
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int temp=0; for(int i=1;temp<n;i++) { if(temp>n) { cout<<i-1;break; } else { temp+=i; } } return 0; }