mehrab's blog

By mehrab, history, 5 years ago, In English

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

  • Vote: I like it
  • +5
  • Vote: I do not like it

| Write comment?
»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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?