提交时间:2024-01-25 17:23:23

运行 ID: 128482

#include<bits/stdc++.h> using namespace std; int m,ans,cnt=0,pos=1; int main(){ cin>>m; while(cnt<m){ ans++;; cnt+=pos; pos++; } cout<<ans<<endl; return 0; }