結果

問題 No.63 ポッキーゲーム
ユーザー kachipan
提出日時 2023-06-23 11:22:51
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 329 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 16:28:44
合計ジャッジ時間 1,554 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main()
{
	int length = 0;
	int eatLength = 0;

	int eatCnt = 0;

	scanf("%d", &length);
	scanf("%d", &eatLength);

	while (true)
	{
		if (eatCnt + eatLength < length / 2)
		{
			eatCnt += eatLength;
		}
		else
		{
			printf("%d\n", eatCnt);
			return 0;
		}
	}
}

0