Thank you very much!

Code: Select all

```
[cpp]
/*
#include<iostream.h>
#include<fstream.h>
ofstream out("es_10006.out");
int notprime[65000];
int prime[6505];
int num[100];
int cal(int a,int k,int n)
//return a^k(mod n)
{
int ans=a;
if(k==1) return a;
if(k%2){
return (a*cal((a*a)%n,k/2,n))%n;
}else{
return cal((a*a)%n,k/2,n);
}
}
void main()
{
int tot;
int i,j;
for(i=1;i<65000;i++) notprime[i]=0;
prime[0]=2;
tot=1;
for(i=3;i<65000;i+=2){
if(!notprime[i]){
prime[tot++]=i;
for(j=3;j<=65000/i;j+=2){
notprime[i*j]=1;
}
}
}
int n,a;
tot=0;
for(n=3;n<65000;n++){
if(!notprime[n]) continue;
for(a=2;a<n;a++){
if(cal(a,n,n)!=a) break;
}
if(a==n) num[tot++]=n;
}
out<<tot<<endl;
for(i=0;i<tot;i++){
out<<num[i]<<endl;
}
}
*/
#include<iostream.h>
int num[11]={561,1105,1729,2465,2821,6601,8911,10585,15841,29341,41041};
void main()
{
int n;
int i;
while(1){
cin>>n;
if(!n) break;
for(i=0;i<11;i++) if(num[i]==n) break;
if(i==11) cout<<n<<" is normal."<<endl;
else cout<<"The number "<<n<<" is a Carmichael number."<<endl;
}
}
[/cpp]
```