/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 166 点
問題文
高橋君の家から駅までの道の長さは D メートルです。高橋君は分速 V メートルで歩きます。 D は V の倍数であることが保証されています。
高橋君は午前 0 時ちょうどから数えて T 分後に家を出ます。高橋君が駅に着くのは、午前 0 時から数えて何分後かを求めてください。
制約
- 1 \leq V \leq 1000
- 1 \leq D \leq 2000000000
- D は V の倍数
- 0 \leq T \leq 1000000000
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
D V T
- 1 行目には、道の長さ D 、歩く速さ V 、出発時刻 T がスペース区切りで与えられる。
出力
駅に着く時刻を、午前 0 時から数えた分数で 1 行に出力せよ。
入力例 1
600 60 480
出力例 1
490
入力例 2
100 100 0
出力例 2
1
入力例 3
2400 80 720
出力例 3
750
入力例 4
1897415289 497 462837069
出力例 4
466654806
入力例 5
1805490848 136 70662163
出力例 5
83937831
Score : 166 pts
Problem Statement
The length of the path from Takahashi's house to the station is D meters. Takahashi walks at a speed of V meters per minute. It is guaranteed that D is a multiple of V.
Takahashi leaves his house T minutes after 0:00 AM. Find how many minutes after 0:00 AM it will be when Takahashi arrives at the station.
Constraints
- 1 \leq V \leq 1000
- 1 \leq D \leq 2000000000
- D is a multiple of V
- 0 \leq T \leq 1000000000
- All input values are integers.
Input
The input is given from Standard Input in the following format:
D V T
- The first line contains the path length D, the walking speed V, and the departure time T, separated by spaces.
Output
Print, on a single line, the arrival time expressed as the number of minutes after 0:00 AM.
Sample Input 1
600 60 480
Sample Output 1
490
Sample Input 2
100 100 0
Sample Output 2
1
Sample Input 3
2400 80 720
Sample Output 3
750
Sample Input 4
1897415289 497 462837069
Sample Output 4
466654806
Sample Input 5
1805490848 136 70662163
Sample Output 5
83937831