結果
問題 | No.181 A↑↑N mod M |
ユーザー | 👑 testestest |
提出日時 | 2016-10-25 23:14:32 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 244 bytes |
コンパイル時間 | 578 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 03:41:08 |
合計ジャッジ時間 | 1,084 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,820 KB |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | AC | 0 ms
6,816 KB |
testcase_03 | AC | 0 ms
6,816 KB |
testcase_04 | AC | 0 ms
6,820 KB |
testcase_05 | AC | 1 ms
6,820 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 1 ms
6,816 KB |
testcase_10 | AC | 1 ms
6,816 KB |
testcase_11 | AC | 0 ms
6,820 KB |
testcase_12 | AC | 1 ms
6,816 KB |
testcase_13 | AC | 1 ms
6,820 KB |
testcase_14 | AC | 0 ms
6,816 KB |
testcase_15 | AC | 1 ms
6,820 KB |
testcase_16 | WA | - |
testcase_17 | AC | 0 ms
6,816 KB |
testcase_18 | AC | 0 ms
6,816 KB |
testcase_19 | AC | 0 ms
6,816 KB |
testcase_20 | AC | 1 ms
6,820 KB |
testcase_21 | AC | 0 ms
6,820 KB |
testcase_22 | AC | 0 ms
6,820 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 1 ms
6,816 KB |
testcase_26 | AC | 0 ms
6,816 KB |
testcase_27 | AC | 1 ms
6,816 KB |
testcase_28 | WA | - |
testcase_29 | AC | 1 ms
6,816 KB |
testcase_30 | AC | 0 ms
6,816 KB |
testcase_31 | AC | 1 ms
6,816 KB |
testcase_32 | AC | 1 ms
6,816 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | AC | 1 ms
6,816 KB |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | AC | 1 ms
6,816 KB |
testcase_40 | AC | 0 ms
6,820 KB |
testcase_41 | AC | 1 ms
6,816 KB |
testcase_42 | WA | - |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a){scanf("%d%d%d",&a,&n,&m);n=!printf("%d",f(a,n,m*2)%m);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a){scanf("%d%d%d",&a,&n,&m);n=!printf("%d",f(a,n,m*2)%m);} | ^ main.c:1:5: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a){scanf("%d%d%d",&a,&n,&m);n=!printf("%d",f(a,n,m*2)%m);} | ^ main.c: In function ‘p’: main.c:1:5: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c: At top level: main.c:1:68: warning: data definition has no type or storage class 1 | s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a){scanf("%d%d%d",&a,&n,&m);n=!printf("%d",f(a,n,m*2)%m);} | ^ main.c:1:68: warning: type defaults to ‘int’ in declaration of ‘r’ [-Wimplicit-int] main.c:1:70: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a)
ソースコード
s,i;p(m){i=1;for(s=m;m/++i;)for(s-=m%i?0:s/i;m%i<1;m/=i);return s;}r;g(a,n,m){for(r=1;n;n/=2)n&1?r=r*a%m:0,a=a*a%m;}f(a,n,m){return~-~-m*n?g(a%m,--n?n-1?f(a,n,p(m)):a:1,m),r:1;}n,m;main(a){scanf("%d%d%d",&a,&n,&m);n=!printf("%d",f(a,n,m*2)%m);}