| 310 | } |
| 311 | |
| 312 | bool powle(int n, long long int r, int x) { |
| 313 | assert(r >= 0); |
| 314 | long long int y = r; |
| 315 | long long int p = 1; |
| 316 | do { |
| 317 | p *= y; n--; |
| 318 | if (p >= x) |
| 319 | return false; |
| 320 | } while (n > 0); |
| 321 | assert(y < x); |
| 322 | return true; |
| 323 | } |
| 324 | |
| 325 | int cnroot(int n, int x) { |
| 326 | if (x < 2) |