結果

問題 No.23 技の選択
ユーザー たこしたこし
提出日時 2015-11-13 20:10:15
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 903 bytes
コンパイル時間 726 ms
コンパイル使用メモリ 90,572 KB
実行使用メモリ 4,560 KB
最終ジャッジ日時 2023-10-11 15:48:25
合計ジャッジ時間 2,248 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,372 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,372 KB
testcase_07 AC 2 ms
4,372 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 2 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 1 ms
4,372 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,372 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 2 ms
4,372 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <queue>
#include <complex>

#define INF 100000000
#define INF_INT_MAX 2147483647
#define INF_LL_MAX 9223372036854775807
#define EPS 1e-10
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long

using namespace std;

int H, A, D;

int main(){

	cin >> H >> A >> D;
	double ans = INF;
	for (int a = 0; a < H / A + 1; a++){
		if (H - a*A > 0)
			ans = min(ans, (double)(a + ((H - a*A) / D + 1) * 1.5));
		else
			ans = min(ans, (double)a);
	}

	cout << ans << endl;

	return 0;

}
0