結果
問題 |
No.734 Careful Engineer
|
ユーザー |
![]() |
提出日時 | 2018-09-28 21:56:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 934 bytes |
コンパイル時間 | 899 ms |
コンパイル使用メモリ | 92,996 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-12 06:41:04 |
合計ジャッジ時間 | 4,176 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 1 TLE * 1 -- * 8 |
ソースコード
#include <stdio.h> #include <algorithm> #include <iostream> #include <string> #include <vector> #include <functional> #include <map> #include <iomanip> #include <math.h> #include <stack> #include <queue> #include <bitset> #include <cstdlib> #include <tuple> #include <cctype> #include <ctype.h> #include <set> using namespace std; int main() { int i, j, k; long long a, b, c; cin >> a >> b >> c; a *= 60; c *= 3600; if (a <= b) { cout << -1 << endl; getchar(); getchar(); return 0; } long long x; x = c / a; long long yo = c % a; long long ama = x * b; if (c / a != 0) { //x++; } c += ama; while(true){ //if (c <= a*x) { if (c >= a*x) { c += b; x++; } else { break; } } /* long long num = 0; while (true) { if (yo > b * num) { num++; } else { break; } } */ //cout << x + num << endl; cout << x << endl; getchar(); getchar(); return 0; }