結果
| 問題 | 
                            No.63 ポッキーゲーム
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hamray
                         | 
                    
| 提出日時 | 2017-11-17 03:17:10 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 385 bytes | 
| コンパイル時間 | 720 ms | 
| コンパイル使用メモリ | 72,456 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-25 07:22:32 | 
| 合計ジャッジ時間 | 1,922 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 WA * 8 | 
ソースコード
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<algorithm>
#include<vector>
#include<math.h>
#include<stack>
using namespace std;
int main(void){
    long L, K; cin >> L >> K;
    long leng = L /2 + 1;
    int cnt = 0;
    while(true){
        if(leng <= K) break;
        leng -= K;
        cnt++;
    }
    cout << cnt * K << endl;
    return 0;
}
    
            
            
            
        
            
hamray