#3850. C++-循环嵌套-平方和数

C++-循环嵌套-平方和数

Background

Description

对于正整数n(1<=n<=10000),如果n可以表为两个非负整数的平方和(n=a^2+b^2),那么称平方和数。给定正整数l和r,请你求出满足l≤n≤r的整数n中有多少个平方和数的等式,且计算总数,并都打印。

Format

Input

Output

Samples

1 3
1=0^2+1^2
2=1^2+1^2
2
1 15
1=0^2+1^2
2=1^2+1^2
4=0^2+2^2
5=1^2+2^2
8=2^2+2^2
9=0^2+3^2
10=1^2+3^2
13=2^2+3^2
8

Limitation

1s, 1024KiB for each test case.