問題一覧 > 通常問題

No.734 Careful Engineer

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 235
作問者 : Tqk / テスター : ciel
お気に入りにしたユーザー ProblemId : 2392 / 自分の提出
問題文最終更新日: 2018-09-29 10:37:33
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 200 (順位表) の他の問題:

Problem Statement

A certain engineer takes $C$ hours to write a program that finishes $1$ task, which takes $A$ minutes by hand, in $B$ seconds.
If you want to finish $X$ of these tasks as quickly as possible, for $X$ at least what value should the program be written? If the program should not be written no matter how large $X$ is, print $-1$.

Correction 2018/09/28 22:12: If the time taken by hand and the time taken with the program are equal, the program is written.

Input

$A$ $B$ $C$

$\cdot$ $1 \le A,B,C \le 10^{9}$
$\cdot$ All inputs are integers.

Output

Print one integer.

Sample

Sample 1
Input
3 3 3
Output
62

Since $A=180$[seconds], $B=3$[seconds], and $C=10800$[seconds],
the time taken through the $61$st task is $61\times180=10980$ seconds by hand and $10800+61\times3=10983$ seconds with the program.
Similarly, the time taken through the $62$nd task is $11160$ seconds by hand and $10986$ seconds with the program, so the program should be written when there are at least $62$ tasks.

Sample 2
Input
30 3 3
Output
7

Task $6$: by hand $10800s$, with the program $10818s$
Task $7$: by hand $12600s$, with the program $10821s$
Therefore, the program should be written when there are at least $7$ tasks.

Sample 3
Input
1 70 1
Output
-1

Doing the tasks by hand finishes them faster than running the program, so the program should not be written.

Sample 4
Input
180 8100 85885
Output
114514

The program should be written when there are at least $114514$ tasks.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。