結果
| 問題 |
No.118 門松列(2)
|
| ユーザー |
👑 testestest
|
| 提出日時 | 2016-02-26 11:52:20 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 5,000 ms |
| コード長 | 150 bytes |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 20,864 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 08:01:52 |
| 合計ジャッジ時間 | 1,296 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
コンパイルメッセージ
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 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<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));}
|
ソースコード
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));}
testestest