結果

問題 No.734 Careful Engineer
ユーザー ats5515
提出日時 2018-09-28 21:26:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-20 00:43:12
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int A, B, C;
	cin >> A >> B >> C;
	A = 60 * A;
	C = 60 * 60 * C;
	if (A <= B) {
		cout << -1 << endl;
		return 0;
	}
	//xA >= Bx + C
	int x = max((int)1, (C / (A - B)) - 3);
	while (x*A < B*x + C) {
		x++;
	}
	cout << x << endl;
}
0