結果

問題 No.78 クジ付きアイスバー
ユーザー testestesttestestest
提出日時 2016-06-08 12:42:37
言語 C90
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 106 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-04-17 09:42:48
合計ジャッジ時間 10,376 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,656 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 3,568 ms
5,376 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
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%=n)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%=n)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%=n)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%=n)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%=n)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%=n)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%=n)s?s--:c++,s+=b[p++]-48;c=!printf("%d",c);}
      |                                ^~~~~
main.c:1:32: note: include ‘<stdio.h>’ or provide a declaration of �

ソースコード

diff #

char b[60];c,s,p;main(n,k){for(scanf("%d%d%s",&n,&k,b);k--;p%=n)s?s--:c++,s+=b[p++]-48;c=!printf("%d",c);}
0