結果
| 問題 | 
                            No.63 ポッキーゲーム
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-03-23 18:51:16 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 189 bytes | 
| コンパイル時間 | 2,099 ms | 
| コンパイル使用メモリ | 193,164 KB | 
| 最終ジャッジ日時 | 2025-02-20 13:27:32 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
   int L, K;
   cin >> L >> K;
   if(L%(2*K)==0){
    cout << L/2-K << endl;
   }else{
    cout << (L/(2*K))*K << endl;
   }
   
}