| 283 | }; |
| 284 | |
| 285 | bool powgr(int n, long long int r, int x) { |
| 286 | assert(r >= 0); |
| 287 | long long int y = r; |
| 288 | long long int p = 1; |
| 289 | do { |
| 290 | p *= y; n--; |
| 291 | if (p > x) |
| 292 | return true; |
| 293 | } while (n > 0); |
| 294 | return false; |
| 295 | } |
| 296 | |
| 297 | int fnroot(int n, int x) { |
| 298 | if (x < 2) |