Untitled
unknown
c_cpp
a year ago
272 B
9
Indexable
int main(){
int n, m, s;
while(cin >> n >> m){
s = 0;
for(int i = n; i <= m; ++i){
s += i;
if(s > m){
cout << i-n+1 << "\n";
break;
}
}
}
return 0;
}Editor is loading...
Leave a Comment