问题 F: Interesting Numbers

内存限制:256 MB 时间限制:1 S
题面:Markdown 评测方式:文本比较 上传者:
提交:2 通过:2

题目描述

Little G is looking for a special type of number with the following characteristics: they have $n$ digits. Splitting the number by half yields two perfect square numbers, possibly with leading zeros. It's guaranteed that $n \equiv 0 \bmod 2$ Now Little G wants to know how many such numbers there are within the range $[L, R]$. The two halves must have the same length.

输入格式

Line $1$: An integer $n$. Line $2$: Two integers $L$ and $R$.

输出格式

Line $1$: An integer, the answer.

输入样例 复制

2
10 99

输出样例 复制

12

数据范围与提示

$1\leq n\leq 60$,$10^{n-1} \le L \le R < 10^n$. $10,11,14,19,40,41,44,49,90,91,94,99$ are the only numbers satisfying the conditions.