题解 | #自守数#
自守数
https://www.nowcoder.com/practice/88ddd31618f04514ae3a689e83f3ab8e
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
let input = parseInt(await readline());
let res = 0;
for(let i=0;i<=input;i++){
let temp = i**2;
temp = temp.toString();
if(temp.endsWith(i.toString())){
res +=1;
}
}
console.log(res);
}()