結果

問題 No.63 ポッキーゲーム
コンテスト
ユーザー Maeda
提出日時 2025-03-03 17:18:05
言語 C
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 361 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 136 ms
コンパイル使用メモリ 37,568 KB
最終ジャッジ日時 2026-02-22 12:50:19
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

void main(){
	int total = 0;
	int inputTotal = scanf("%d",&total);
	if(inputTotal == 2){
		printf("totalの入力ミス\n");
	}
	int eat = 0;
	int inputEat = scanf("%d",&eat);
	if(inputEat == 2){
		printf("eatの入力ミス\n");
	}
	int count = 0;
	while(total > eat*2){
        count++;
		total -= eat*2;
	}
    printf("%d\n",count*eat);
}
0