#54728: c++解答


yp11451009@yphs.tp.edu.tw (711-19王敬皓)


c++

 

#include <iostream>
using namespace std;
int main(){
    int n, m;
    while(cin >> n >> m){
        int s = 0;
        int c = 0;
        do {
            s += n;
            n++;
            c++;
        }
        while(s <= m );
        cout << c << endl;
    }
}