結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2020-02-04 16:21:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 191 ms / 5,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 1,516 ms |
コンパイル使用メモリ | 166,836 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 07:24:37 |
合計ジャッジ時間 | 3,050 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int l,k; int ans = 0; cin >> l >> k; while(1){ if(l > 2*k){ l -= 2*k; ans += k; }else{ //ans += l; break; } } cout << ans << endl; return 0; }