結果

問題 No.63 ポッキーゲーム
ユーザー sasakki
提出日時 2016-05-21 10:26:06
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 191 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-24 05:09:19
合計ジャッジ時間 1,419 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%ld %d", &l, &k);
      |   ^~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
 
  long int l;
  int k;

  scanf("%ld %d", &l, &k);

  int eat = l / (2*k);

  if( l % (2*k) == 0){
    eat--;
  }

  printf("%d\n", eat*k);

 
  return 0;
}
0