0_0_16379217_24023.cpp:5:12: error: stray '#' in program
int main(){#ifndef ONLINE_JUDGE //freopen("testin.txt","r",stdin);#endif int n,i,s,a,p; fun(); while(scanf("%d",&n)!=EOF && n) { while(n++) { if(Judge(n)) //���������������continue continue; s=0;p=n; for(i=2;i*i<=p;i++) { if(p%i==0) { p/=i; a=sum(i); s+=a; while(p%i==0) { p/=i; s+=a; } } } if(p>1) s+=sum(p); if(sum(n)==s) { printf("%d\n",n); break; } } } return 0;}
^
0_0_16379217_24023.cpp: In function 'bool Judge(int)':
0_0_16379217_24023.cpp:4:15: error: a function-definition is not allowed here before '{' token
int sum(int a){ //�����ĸ���λ֮�� int s; s=0; while(a) { s+=a%10; a/=10; } return s;}
^
<command-line>:0:14: error: expected '}' at end of input
0_0_16379217_24023.cpp:5:20: note: in expansion of macro 'ONLINE_JUDGE'
int main(){#ifndef ONLINE_JUDGE //freopen("testin.txt","r",stdin);#endif int n,i,s,a,p; fun(); while(scanf("%d",&n)!=EOF && n) { while(n++) { if(Judge(n)) //���������������continue continue; s=0;p=n; for(i=2;i*i<=p;i++) { if(p%i==0) { p/=i; a=sum(i); s+=a; while(p%i==0) { p/=i; s+=a; } } } if(p>1) s+=sum(p); if(sum(n)==s) { printf("%d\n",n); break; } } } return 0;}
^
|