結果
問題 | No.734 Careful Engineer |
ユーザー | aguroshou |
提出日時 | 2018-09-28 21:31:43 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 1,952 bytes |
コンパイル時間 | 628 ms |
コンパイル使用メモリ | 83,864 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-18 00:03:36 |
合計ジャッジ時間 | 1,311 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 |
ソースコード
#include<iostream> #include <algorithm> #include<string> #include <bitset> #include <vector> #include <functional> #include <climits> #include <iomanip> #include <utility> #include <stack> #include <queue> #include <math.h> #include <iomanip> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <numeric> using namespace std; using ll = long long; int main() { ll a = 0, b = 0, c = 0, d = 0, e = 0; string s, t, z, y; ll n, m, h, w, X; ll k; ll insuusyurui[1000] = {}; ll insuukazu[1000] = {}; ll memo[4000] = {}; ll memo2[4000] = {}; cin >> a; cin >> b; cin >> c; if (a*60<=b) { cout << -1 << endl; return 0; } while (a*d*60<(b*d)+c*3600) { if (a*(d+10000) * 60<(b*(d + 10000)) + c * 3600) { d += 10000; } else { d++; } } cout << d << endl; //cout << sum << endl; //cout << endl; return 0; } //memcpy(x, visited, sizeof(ll)*n); //void kansuu(ll num, ll visited[10]) {} //kansuu(1, zz); //cout << setprecision(15) << v << endl; //int temp; //for (int i = 0; i < n - 1; i++) { // for (int j = n - 1; j > i; j--) { // if (w[j - 1] < w[j]) { /* 前の要素の方が大きかったら */ // temp = w[j]; /* 交換する */ // w[j] = w[j - 1]; // w[j - 1] = temp; // } // } //} // //ll insuusyurui[1000] = {}; //ll insuukazu[1000] = {}; //ll memo[4000] = {}; //ll memo2[4000] = {}; //cin >> n; //cin >> m; //a = 2; //// √n ≧ a ( n ≧ a * a ) の間ループ処理 //while (n >= a * a) { // // a で割り切れたら、a は素因数 // // そして、割られる数を a で割る // // a で割り切れなかったら、 a を 1 増加させる // if (n % a == 0) { // printf("%d * ", a); // insuukazu[c]++; // n /= a; // } // else { // a++; // //if (insuukazu[c] != 0) // { // c++; // //cout << c << endl; // // } // } //} //printf("%d\n", n); //for (int i = 0; i < c; i++) //{ // //cout << insuukazu[i] << endl; //} // //cout << "Yes" << endl;