結果

問題 No.23 技の選択
ユーザー SSRS
提出日時 2020-11-08 23:55:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 1,318 ms
コンパイル使用メモリ 167,084 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-22 15:47:50
合計ジャッジ時間 2,336 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
const int INF = 100000;
int main(){
  int H, A, D;
  cin >> H >> A >> D;
  double ans = INF;
  for (int i = 0; i <= (H + A - 1) / A; i++){
    ans = min(ans, i + (H - A * i + D - 1) / D * 1.5);
  }
  cout << ans << endl;
}
0