結果

問題 No.16 累乗の加算
ユーザー 👑 testestesttestestest
提出日時 2015-08-15 11:20:39
言語 C90
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 135 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 21,504 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-18 09:38:51
合計ジャッジ時間 2,615 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      | ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘q’ [-Wimplicit-int]
main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      |         ^
main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      |           ^
main.c:1:13: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      |             ^
main.c:1:60: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      |                                                            ^~~~
main.c: In function ‘main’:
main.c:1:60: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:74: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
      |                                                                          ^~~~
main.c:1:79: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
    1 | q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t)

ソースコード

diff #

q=1e6+3,s,c;m(long x){return x?(x%2?c:1)*(x=m(x/2))*x%q:1;}main(t){for(c=atoi(gets(&c));~scanf("%d",&t);s+=m(t));c=!printf("%d",s%q);}
0