#t499. 与7无关的数
与7无关的数
Numbers Unrelated to 7
Problem Description
A positive integer is called "related to 7" if it is divisible by 7, or if any digit in its decimal representation is 7. Now find the sum of the squares of all positive integers not exceeding that are unrelated to 7.
Input Format
One line: a positive integer .
Output Format
One line: an integer, the sum of the squares of all positive integers not exceeding that are unrelated to 7.
Sample Input
21
Sample Output
2336