公式

D - Digit vs Square Root 解説 by evima

Hints

Hint 0 You may feel the problem setting is somewhat unnatural. In such cases, how should you approach it initially?

Hint 1 Try experimenting with smaller values of \(N\) to see which ones satisfy the conditions stated in the problem.

Hint 2 If you’re intuitive, you should already be able to get AC.
If not, take a closer look at the results of your experiments.

Hint 3 The numbers \(N\) that satisfy the conditions form not so many intervals under the constraint \(N \le 10^{18}\).
That is, you can enumerate all \(N\) that satisfy the conditions by combining not so many expressions like “all integers in the interval \([l,r]\) satisfy the conditions.”

投稿日時:
最終更新: