結果

問題 No.63 ポッキーゲーム
コンテスト
ユーザー mumucoder
提出日時 2018-10-28 17:54:22
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 203 ms / 5,000 ms
+ 222µs
コード長 343 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,364 ms
コンパイル使用メモリ 69,944 KB
実行使用メモリ 9,816 KB
最終ジャッジ日時 2026-09-26 13:51:51
合計ジャッジ時間 2,626 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>

int main(int argc, char *argv[]) {
	int pocky_length = 0;
	int eat_length = 0;

	std::cin >> pocky_length;
	std::cin >> eat_length;

	int count = 0;
	while (1) {
		pocky_length -= (eat_length * 2);
		count++;
		if (pocky_length <= 0) {
			break;
		}
	}

	std::cout << (eat_length * (count - 1)) << std::endl;
	return 0;
}
0