Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
76761 sh25_chenyj 求n的值 C++ Compile Error 0 MS 0 KB 320 2025-12-19 17:38:26

Tests(0/0):


#include<bits/stdc++.h> using namespace std; int main() { int m; cin>>m; int n = 1; while(1){ int a = 0; for(int i = 1; i <= n; i++){ a += i; } if(a > m){ cout<<n; break; } n ++; return 0; }


Judgement Protocol: