题解 | #自守数#
自守数
http://www.nowcoder.com/practice/88ddd31618f04514ae3a689e83f3ab8e
import math
while True:
try:
n = int(input())
count = 0
for i in range(1, n+1):
d = int(math.log10(i))+1
if i*i % 10**d == i:
count += 1
print(count+1)
except:
break