标签
- 条件语句、数学
题目地址
A - Jogging
- https://atcoder.jp/contests/abc249/tasks/abc249_a
问题描述
Problem Statement
Takahashi and Aoki decided to jog.
Takahashi repeats the following: “walk at Bmeters a second for Aseconds and take a rest for Cseconds.”
Aoki repeats the following: “walk at Emeters a second for Dseconds and take a rest for Fseconds.”
When Xseconds have passed since they simultaneously started to jog, which of Takahashi and Aoki goes ahead?
Constraints
- 1≤A,B,C,D,E,F,X≤100
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
A B C D E F X
<