結果

問題 No.63 ポッキーゲーム
ユーザー Ytz_IchiYtz_Ichi
提出日時 2018-07-17 11:59:00
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 27,372 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-16 05:57:10
合計ジャッジ時間 2,383 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 0 ms
4,376 KB
testcase_04 AC 0 ms
4,376 KB
testcase_05 WA -
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 4 ms
4,380 KB
testcase_13 AC 189 ms
4,376 KB
testcase_14 AC 5 ms
4,380 KB
testcase_15 AC 5 ms
4,380 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 176 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 26 ms
4,376 KB
testcase_20 AC 3 ms
4,376 KB
testcase_21 AC 8 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:4:3: 警告: 関数 ‘scanf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    4 |   scanf("%d %d\n",&a,&b);
      |   ^~~~~
main.c:2:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
    1 | #include <stdlib.h>
  +++ |+#include <stdio.h>
    2 | int main() {
main.c:4:3: 警告: 組み込み関数 ‘scanf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d\n",&a,&b);
      |   ^~~~~
main.c:4:3: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:10:3: 警告: 関数 ‘printf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
   10 |   printf("%d\n",c);
      |   ^~~~~~
main.c:10:3: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:10:3: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
main.c:10:3: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

#include <stdlib.h>
int main() {
  int a,b,c;
  scanf("%d %d\n",&a,&b);
  a/=2;
  while(a>b){
    a-=b;
    c+=b;
  }
  printf("%d\n",c);
  return 0;
}
0