Блог пользователя mehrab

Автор mehrab, история, 5 лет назад, По-английски

Please give me some hint to solve this problem: https://mirror.codeforces.com/gym/102769/problem/G

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

A couple of hints:

  • the limits look daunting. Is there a special case you can treat separately which will make the limits less daunting?

  • consider how we might identify ranges of integers [L,R] such that for L <= x <= R, floor(kth root(x)) = Q, for some integer Q. If we iterate over Q, how would that range [L,R] contribute to the answer?