結果

問題 No.78 クジ付きアイスバー
ユーザー testestesttestestest
提出日時 2016-07-23 08:49:52
言語 C90
(gcc 11.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 111 bytes
コンパイル時間 891 ms
コンパイル使用メモリ 19,200 KB
実行使用メモリ 8,220 KB
最終ジャッジ日時 2024-04-24 13:14:30
合計ジャッジ時間 33,184 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 0 ms
5,376 KB
testcase_04 AC 0 ms
5,376 KB
testcase_05 AC 508 ms
5,376 KB
testcase_06 AC 1,315 ms
5,376 KB
testcase_07 AC 521 ms
5,376 KB
testcase_08 AC 800 ms
5,376 KB
testcase_09 AC 2,653 ms
5,376 KB
testcase_10 AC 1,378 ms
5,376 KB
testcase_11 AC 690 ms
5,376 KB
testcase_12 AC 2,297 ms
5,376 KB
testcase_13 AC 2,457 ms
5,376 KB
testcase_14 AC 2,467 ms
5,376 KB
testcase_15 AC 967 ms
5,376 KB
testcase_16 AC 1,741 ms
5,376 KB
testcase_17 AC 2,037 ms
5,376 KB
testcase_18 AC 2,065 ms
5,376 KB
testcase_19 AC 3,214 ms
5,376 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.

ソースコード

diff #

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);}
0