結果

問題 No.63 ポッキーゲーム
ユーザー hanorver
提出日時 2015-09-06 20:46:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 352 ms / 5,000 ms
コード長 254 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 53,980 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 04:54:58
合計ジャッジ時間 2,193 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

int main() {
	int length, e;
	std::cin >> length >> e;

	int count = 0;
	while (length != 0) {
		if (length <= e * 2) {
			length = 0;
		}else{
			length -= e * 2;
			count++;
		}
	}

	std::cout << count * e << std::endl;
	return 0;
}
0