题解 | #守形数#
守形数
https://www.nowcoder.com/practice/99e403f8342b4d0e82f1c1395ba62d7b
#include <iostream>
using namespace std;
int main() {
int n;
while(cin >> n){
int sq = n * n;
int flag = 0;
while(sq && n){
int a = sq % 10;
int b = n % 10;
if(a != b){
flag = 1;
break;
}
sq /= 10;
n /= 10;
}
if(flag) cout << "No!" << endl;
else cout << "Yes!" << endl;
}
return 0;
}
顺丰集团工作强度 341人发布