結果

問題 No.118 門松列(2)
ユーザー testestesttestestest
提出日時 2016-02-26 11:38:28
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 150 bytes
コンパイル時間 868 ms
コンパイル使用メモリ 21,032 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-23 20:15:39
合計ジャッジ時間 1,860 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,372 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 0 ms
4,372 KB
testcase_07 AC 0 ms
4,372 KB
testcase_08 AC 1 ms
4,372 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
4,372 KB
testcase_14 WA -
testcase_15 AC 1 ms
4,372 KB
testcase_16 WA -
testcase_17 AC 1 ms
4,372 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:14: warning: data definition has no type or storage class
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
      |              ^
main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
main.c:1:21: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
      |                     ^~~~
main.c: In function ‘main’:
main.c:1:21: warning: type of ‘k’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:33: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
      |                                 ^~~~
main.c:1:42: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
      |                                          ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
main.c:1:42: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
      |                                          ^~~~~
main.c:1:42: note: include ‘<stdio.h>’ or provide a declar

ソースコード

diff #

long a,b,c,i;x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<101;c+=i*i*i)a+=i=x[k++],b+=i*i;i=!printf("%d",(a*a*a-3*a*b+2*c)/6%(i=1e9+7));}
0