102490: [AtCoder]ABC249 A - Jogging
Description
Score : $100$ points
Problem Statement
Takahashi and Aoki decided to jog.
Takahashi repeats the following: "walk at $B$ meters a second for $A$ seconds and take a rest for $C$ seconds."
Aoki repeats the following: "walk at $E$ meters a second for $D$ seconds and take a rest for $F$ seconds."
When $X$ seconds have passed since they simultaneously started to jog, which of Takahashi and Aoki goes ahead?
Constraints
- $1 \leq A, B, C, D, E, F, X \leq 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$
Output
When $X$ seconds have passed since they simultaneously started to jog, if Takahashi goes ahead of Aoki, print Takahashi
; if Aoki goes ahead of Takahashi, print Aoki
; if they have advanced the same distance, print Draw
.
Sample Input 1
4 3 3 6 2 5 10
Sample Output 1
Takahashi
During the first $10$ seconds after they started to jog, they move as follows.
- Takahashi walks for $4$ seconds, takes a rest for $3$ seconds, and walks again for $3$ seconds. As a result, he advances a total of $(4 + 3) \times 3 = 21$ meters.
- Aoki walks for $6$ seconds and takes a rest for $4$ seconds. As a result, he advances a total of $6 \times 2 = 12$ meters.
Since Takahashi goes ahead, Takahashi
should be printed.
Sample Input 2
3 1 4 1 5 9 2
Sample Output 2
Aoki
Sample Input 3
1 1 1 1 1 1 1
Sample Output 3
Draw
Input
题意翻译
存在两个人散步。 前者速度 $ b $ 米每秒,每走 $ a $ 秒需要休息 $ c $ 秒。 后者速度 $ e $ 米每秒,每走 $ d $ 秒需要休息 $ f $ 秒。 求第 $ x $ 秒末时两者谁走的更远,前者更远输出 `Takahashi`,后者更远输出 `Aoki`,相同输出 `Draw`。Output
问题描述
高桥和青木决定慢跑。
高桥重复以下动作:“以$B$米/秒的速度走$A$秒,然后休息$C$秒。”
青木重复以下动作:“以$E$米/秒的速度走$D$秒,然后休息$F$秒。”
当他们同时开始慢跑后经过$X$秒,高桥和青木中谁走得更远?
约束
- $1 \leq A, B, C, D, E, F, X \leq 100$
- 输入中的所有值都是整数。
输入
输入格式如下:
$A$ $B$ $C$ $D$ $E$ $F$ $X$
输出
当他们同时开始慢跑后经过$X$秒,如果高桥走在青木前面,输出Takahashi
;如果青木走在高桥前面,输出Aoki
;如果他们走了相同的距离,输出Draw
。
样例输入1
4 3 3 6 2 5 10
样例输出1
Takahashi
在他们开始慢跑后的前10秒,他们的行动如下:
- 高桥走4秒,休息3秒,再走3秒。结果他总共走了$(4 + 3) \times 3 = 21$米。
- 青木走6秒,休息4秒。结果他总共走了$6 \times 2 = 12$米。
因为高桥走在前面,应该输出Takahashi
。
样例输入2
3 1 4 1 5 9 2
样例输出2
Aoki
样例输入3
1 1 1 1 1 1 1
样例输出3
Draw