結果
問題 | No.118 門松列(2) |
ユーザー | 👑 testestest |
提出日時 | 2016-02-26 11:51:47 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 150 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 13:55:41 |
合計ジャッジ時間 | 1,052 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 0 ms
6,944 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | AC | 1 ms
6,944 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
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: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<100;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<100;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<100;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<100;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<100;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 declaration of ‘scanf’ main.c:1:50: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 1 | long a,b,c,i,x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<100;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));} |
ソースコード
long a,b,c,i,x[101];main(k){for(gets(x);~scanf("%d",&i);x[i]++);for(;k<100;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));}