题解 | #自守数#
自守数
http://www.nowcoder.com/practice/88ddd31618f04514ae3a689e83f3ab8e
while True:
try:
n = int(input())
k = 0
for i in range(n+1):
a = i**2
b = len(str(i))
if b == 1:
c = str(a)[-1]
if b >= 2:
c = str(a)[-b:]
if int(c) == i:
k += 1
print(k)
except:
break