結果
問題 | No.257 N言っちゃダメゲーム (3) |
ユーザー | kotatsugame |
提出日時 | 2017-08-11 03:57:20 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 104 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 27,520 KB |
実行使用メモリ | 43,556 KB |
最終ジャッジ日時 | 2024-07-17 01:23:09 |
合計ジャッジ時間 | 6,750 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^ main.c:1:5: warning: return type defaults to 'int' [-Wimplicit-int] 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^~~~ main.c: In function 'main': main.c:1:5: warning: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:5: warning: type of 'k' defaults to 'int' [-Wimplicit-int] main.c:1:19: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^~~~~ main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:62: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);} | ^~~~~~ main.c:1:62: note: include '<stdio.h>' or provide a declaration of 'printf' m
ソースコード
a,b;main(n,k){for(scanf("%d%d",&n,&k),k++;a<n;scanf("%d",&a))printf("%d\n",b=!a&&n%k==1?0:a?b+k:~-n%k);}