結果
| 問題 | No.63 ポッキーゲーム |
| コンテスト | |
| ユーザー |
hamray
|
| 提出日時 | 2017-11-17 03:39:30 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 682 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 94,808 KB |
| 実行使用メモリ | 9,844 KB |
| 最終ジャッジ日時 | 2026-09-29 18:14:58 |
| 合計ジャッジ時間 | 2,402 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 2 |
ソースコード
#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; int cnt = 0;
if(L % 2 != 0) {
leng = (L+1) / 2;
while(true){
if(leng < K) break;
leng -= K;
cnt++;
}
if(L % K != 0){
cout << cnt * K << endl;
}else{
cout << (cnt-1) * K << endl;
}
}else{
leng = L/2;
while(true){
if(leng <= K) break;
leng -= K;
cnt++;
}
cout << cnt * K << endl;
}
return 0;
}
hamray