結果
問題 | No.63 ポッキーゲーム |
ユーザー |
|
提出日時 | 2020-03-23 13:42:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 196 ms / 5,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 63,104 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 05:55:30 |
合計ジャッジ時間 | 1,931 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<iostream> using namespace std; int main() { int L, K; int ans = 0; cin >> L >> K; while(L > 0) { if(L - K * 2 <= 0) { cout << ans << endl; return 0; } else { ans += K; L -= K * 2; } } return 0; }