| 
 | 
back to boardWhy wa #4, please give me some test #include <iostream> #include <algorithm>   using namespace std;   int main() {     int n, a;     cin >> n >> a;       if (n == 1)         cout << 0 << endl;     else     {         int S = n - 1;         //int S = n;         for (int i = 1; i <= n; i++)         {             S = S - min(a, i);               if (S <= 0)             {                 cout << i << endl;                 break;             }         }     } }  |  
  | 
|