結果
問題 | No.117 組み合わせの数 |
ユーザー | testestest |
提出日時 | 2016-12-05 11:11:31 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 236 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 21,888 KB |
実行使用メモリ | 17,152 KB |
最終ジャッジ日時 | 2024-05-05 20:17:27 |
合計ジャッジ時間 | 688 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルメッセージ
main.c:1:15: warning: data definition has no type or storage class 1 | long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;} | ^ main.c:1:15: warning: type defaults to ‘int’ in declaration of ‘P’ [-Wimplicit-int] main.c:1:23: warning: data definition has no type or storage class 1 | long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;} | ^ main.c:1:23: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:1:25: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] 1 | long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;} | ^ main.c:1:27: warning: type defaults to ‘int’ in declaration of ‘r’ [-Wimplicit-int] 1 | long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;} | ^ main.c:1:29: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;} | ^ main.c:1:77: warning: return type de
ソースコード
long f[1<<21];P=1e9+7;i,c,r;p(long a,int i){r=i?p(a*a%P,i/2)*(i%2?a:1)%P:1;}main(n){for(gets(f),*f=n;r++<2e6;f[r]=f[r-1]*r%P);for(;i=~scanf(" %c(%d,%d)",&c,&n,&r);printf("%d\n",n<r?0:f[n]*p(f[n-r]*(c%5?f[r]:1),P-2)%P))c&8&&(n+=r)&&n--;}