結果

問題 No.16 累乗の加算
ユーザー 👑 testestesttestestest
提出日時 2015-08-15 11:17:27
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 137 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 09:38:45
合計ジャッジ時間 774 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!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:72: warning: implicit declaration of function ‘scanf’ [-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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!printf("%d",s%q);}
      |                                                                        ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    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(scanf("%d,%*d",&c);

ソースコード

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(scanf("%d,%*d",&c);~scanf("%d",&t);s+=m(t));t=!printf("%d",s%q);}
0