#abc249a. A - Jogging

A - Jogging

Score : 100100 points

问题陈述

高桥和青木决定去慢跑。
高桥按照以下方式重复活动:“以 BB 米/秒的速度走 AA 秒,然后休息 CC 秒。”
青木按照以下方式重复活动:“以 EE 米/秒的速度走 DD 秒,然后休息 FF 秒。”
当从他们同时开始慢跑起经过了 XX 秒后,高桥和青木中哪一位会领先?

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Takahashi and Aoki decided to jog.
Takahashi repeats the following: "walk at BB meters a second for AA seconds and take a rest for CC seconds."
Aoki repeats the following: "walk at EE meters a second for DD seconds and take a rest for FF seconds."
When XX seconds have passed since they simultaneously started to jog, which of Takahashi and Aoki goes ahead?

Constraints

  • 1A,B,C,D,E,F,X1001 \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:

AA BB CC DD EE FF XX

Output

When XX 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 1010 seconds after they started to jog, they move as follows.

  • Takahashi walks for 44 seconds, takes a rest for 33 seconds, and walks again for 33 seconds. As a result, he advances a total of (4+3)×3=21(4 + 3) \times 3 = 21 meters.
  • Aoki walks for 66 seconds and takes a rest for 44 seconds. As a result, he advances a total of 6×2=126 \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

update @ 2024/3/10 10:38:26