不开long long见祖宗👀
洛谷P1226
#include <stdio.h>
#define LL long long
#define IN freopen("in.txt", "r", stdin)
#define OUT freopen("out.txt", "w", stdout)
#define scan(x) scanf("%d", &x)
#define sqr(x) (x) * (x)
#define f(i, a, b) for (int i
做这个是真的不快乐,开个sta数组来验证是否重复即是否进入循坏
那个图灵班看来是指望不上了,太懒了。😴
int sum (int n)
{ int a=0;
while(n>0){
a+=(n%10) *(n%10);
n /=10;
}
return a;
}
bool isHappy(int n){
int sta[10001];
memset(sta,0,10001);
long long int a=0;
if (n ==