結果

問題 No.63 ポッキーゲーム
ユーザー jin128
提出日時 2016-08-25 20:41:31
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 20,096 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 02:23:47
合計ジャッジ時間 887 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%d", &length);
      |   ^~~~~~~~~~~~~~~~~~~~
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |   scanf("%d", &pace);
      |   ^~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
  int length, pace, times;
//  printf("input length ; ");
  scanf("%d", &length);

//  printf("input pace ; ");
  scanf("%d", &pace);

  times = (length-1)/(2*pace);
  if(length % (2 * pace) == 0)
    times --;
  printf("%d\n", (length - 1)/pace);
  return 0;
}
0