F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20613544_4818.cpp:4:23: error: stray '#' in program
     #define N 10000000#define MOD 1000000007#define LL long longusing namespace std;bool flag[N+5]={0};int prime[1000000],cnt=0;void Prime(){    for(int i=2;i<sqrt(N+1.0);i++){        if(flag[i])            continue;        for(int j=2;j*i<=N;j++)            flag[i*j]=true;    }    for(int i=2;i<=N;i++)        if(!flag[i])            prime[cnt++]=i;}int getsum(int n,int p){    int sum=0;    while(n){        sum+=n/p;        n/=p;    }    return sum;}LL PowMod(LL a, LL b){    LL ans=1;    while(b){        if(b&1)            ans=(ans*a)%MOD;        a=(a*a)%MOD;        b>
                       ^
0_0_20613544_4818.cpp:5:37: note: in expansion of macro 'N'
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
                                     ^
0_0_20613544_4818.cpp:4:45: error: stray '#' in program
     #define N 10000000#define MOD 1000000007#define LL long longusing namespace std;bool flag[N+5]={0};int prime[1000000],cnt=0;void Prime(){    for(int i=2;i<sqrt(N+1.0);i++){        if(flag[i])            continue;        for(int j=2;j*i<=N;j++)            flag[i*j]=true;    }    for(int i=2;i<=N;i++)        if(!flag[i])            prime[cnt++]=i;}int getsum(int n,int p){    int sum=0;    while(n){        sum+=n/p;        n/=p;    }    return sum;}LL PowMod(LL a, LL b){    LL ans=1;    while(b){        if(b&1)            ans=(ans*a)%MOD;        a=(a*a)%MOD;        b>
                                             ^
0_0_20613544_4818.cpp:5:37: note: in expansion of macro 'N'
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
                                     ^
0_0_20613544_4818.cpp:4:23: error: stray '#' in program
     #define N 10000000#define MOD 1000000007#define LL long longusing namespace std;bool flag[N+5]={0};int prime[1000000],cnt=0;void Prime(){    for(int i=2;i<sqrt(N+1.0);i++){        if(flag[i])            continue;        for(int j=2;j*i<=N;j++)            flag[i*j]=true;    }    for(int i=2;i<=N;i++)        if(!flag[i])            prime[cnt++]=i;}int getsum(int n,int p){    int sum=0;    while(n){        sum+=n/p;        n/=p;    }    return sum;}LL PowMod(LL a, LL b){    LL ans=1;    while(b){        if(b&1)            ans=(ans*a)%MOD;        a=(a*a)%MOD;        b>
                       ^
0_0_20613544_4818.cpp:5:101: note: in expansion of macro 'N'
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
                                                                                                     ^
0_0_20613544_4818.cpp:4:45: error: stray '#' in program
     #define N 10000000#define MOD 1000000007#define LL long longusing namespace std;bool flag[N+5]={0};int prime[1000000],cnt=0;void Prime(){    for(int i=2;i<sqrt(N+1.0);i++){        if(flag[i])            continue;        for(int j=2;j*i<=N;j++)            flag[i*j]=true;    }    for(int i=2;i<=N;i++)        if(!flag[i])            prime[cnt++]=i;}int getsum(int n,int p){    int sum=0;    while(n){        sum+=n/p;        n/=p;    }    return sum;}LL PowMod(LL a, LL b){    LL ans=1;    while(b){        if(b&1)            ans=(ans*a)%MOD;        a=(a*a)%MOD;        b>
                                             ^
0_0_20613544_4818.cpp:5:101: note: in expansion of macro 'N'
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
                                                                                                     ^
0_0_20613544_4818.cpp:5:5: error: expected unqualified-id before '>=' token
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
     ^
0_0_20613544_4818.cpp:5:13: error: expected declaration before '}' token
     >=1;    }    return ans;}LL fac[N+5];int a;int main(){    int n;    fac[1]=1;    for(int i=2;i<=N;i++)        fac[i]=(fac[i-1]*i)%MOD;    Prime();    while(scanf("%d",&n)!=EOF&&n){        LL ret=1;        for(int i=0;i<cnt&&prime[i]<=n;i++){            a=getsum(n,prime[i]);            if(a&1)                ret=(ret*prime[i])%MOD;        }        printf("%I64d\n",(fac[n]*PowMod(ret,MOD-2))%MOD);    }    return 0;}
             ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 18:27:20, Gzip enabled