題目:
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1111
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| #include <iostream>
using namespace std;
int main(){ unsigned long long s, d; while(cin >> s >> d){ while(d > s){ d-=s; ++s; } cout << s << '\n'; } return 0; }
|