結果
問題 | No.78 クジ付きアイスバー |
ユーザー |
👑 ![]() |
提出日時 | 2016-07-23 08:49:52 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 111 bytes |
コンパイル時間 | 602 ms |
コンパイル使用メモリ | 19,456 KB |
実行使用メモリ | 8,224 KB |
最終ジャッジ日時 | 2024-11-06 21:23:21 |
合計ジャッジ時間 | 32,705 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 TLE * 1 -- * 18 |
コンパイルメッセージ
main.c:1:12: warning: data definition has no type or storage class 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^ main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^ main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^ main.c:1:18: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^~~~ main.c: In function ‘main’: main.c:1:18: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:1:18: warning: type of ‘k’ defaults to ‘int’ [-Wimplicit-int] main.c:1:32: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} main.c:1:32: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 1 | char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);} | ^~~~~ main.c:1:32: note: include ‘<stdio.
ソースコード
char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p=++p<n?p:0)s?s--:c++,s+=b[p]-48;c=!printf("%d",c);}