結果

問題 No.63 ポッキーゲーム
ユーザー mtmtmtmtmt
提出日時 2021-02-05 13:24:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3,244 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 78,264 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-02 04:28:22
合計ジャッジ時間 11,984 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <vector>
#include <map>
#include <utility>
#include <list>
#include <math.h>
#include <algorithm>
using namespace std;

int main(){
    double l,k;
    int ans=0;
    cin>>l>>k;
    l/=2;
    for(int i=0;i<l;i+=k)
    {
        if(i<l)
        {
            ans=max(ans,i);
        }
    }
    cout<<ans<<endl;
    return 0;
}
0