結果

問題 No.63 ポッキーゲーム
ユーザー Shawn stayCShawn stayC
提出日時 2020-05-17 01:14:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 245 bytes
コンパイル時間 1,516 ms
コンパイル使用メモリ 166,208 KB
実行使用メモリ 8,736 KB
最終ジャッジ日時 2023-10-24 11:17:36
合計ジャッジ時間 10,328 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,788 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 4 ms
4,348 KB
testcase_10 AC 22 ms
4,348 KB
testcase_11 AC 2,003 ms
4,348 KB
testcase_12 AC 42 ms
4,348 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;

int main(){
	int L,K;
	cin>>L>>K;
	
	int ans=0;
	while(L>2*K){
		if(L%(2*K)!=0){
			ans++;
			L-=2*K;
		}
	}
	cout << ans*K << endl;
}
0