102393: [AtCoder]ABC239 D - Prime Sum Game

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $400$ points

Problem Statement

Takahashi and Aoki are playing a game.

  • First, Takahashi chooses an integer between $A$ and $B$ (inclusive) and tells it to Aoki.
  • Next, Aoki chooses an integer between $C$ and $D$ (inclusive).
  • If the sum of these two integers is a prime, then Aoki wins; otherwise, Takahashi wins.

When the two players play optimally, which player will win?

Constraints

  • $1 \leq A \leq B \leq 100$
  • $1 \leq C \leq D \leq 100$
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

$A$ $B$ $C$ $D$

Output

If Takahashi wins when the two players play optimally, print Takahashi; if Aoki wins, print Aoki.


Sample Input 1

2 3 3 4

Sample Output 1

Aoki

For example, if Takahashi chooses $2$, Aoki can choose $3$ to make the sum $5$, which is a prime.


Sample Input 2

1 100 50 60

Sample Output 2

Takahashi

If they play optimally, Takahashi always wins.


Sample Input 3

3 14 1 5

Sample Output 3

Aoki

Input

题意翻译

高桥和青木玩下面这个游戏。开始时定下四个正整数 $a,b,c,d$ (这四个数由输入给出),然后两人开始选数。高桥先选定一个正整数 $x$ ( $a≤x≤b$ ),青木再选定一个正整数 $y$ ( $c≤y≤d$ )。如果 $x+y$ 的值是质数则青木获胜,否则高桥获胜。当双方都采取最佳策略时,问谁会获胜?若高桥获胜输出`Takahashi`,若青木获胜输出`Aoki`。

Output

得分:400分 部分 问题描述 Takahashi 和 Aoki 正在玩一个游戏。 - 首先,Takahashi 选择一个在 $A$ 和 $B$(包括两者)之间的整数,并告诉 Aoki。 - 接下来,Aoki 选择一个在 $C$ 和 $D$(包括两者)之间的整数。 - 如果这两个整数的和是一个素数,那么 Aoki 获胜;否则,Takahashi 获胜。 当两名玩家最优地玩游戏时,哪位玩家会获胜? 部分 约束 - $1 \leq A \leq B \leq 100$ - $1 \leq C \leq D \leq 100$ - 输入中的所有值都是整数。 部分 输入 输入格式如下,从标准输入给出: $A$ $B$ $C$ $D$ 部分 输出 如果两名玩家最优地玩游戏时 Takahashi 获胜,打印 Takahashi;如果 Aoki 获胜,打印 Aoki。 部分 样例输入 1 2 3 3 4 部分 样例输出 1 Aoki 例如,如果 Takahashi 选择 $2$,Aoki 可以选择 $3$ 使和为 $5$,这是一个素数。 部分 样例输入 2 1 100 50 60 部分 样例输出 2 Takahashi 如果他们最优地玩游戏,Takahashi 总是获胜。 部分 样例输入 3 3 14 1 5 部分 样例输出 3 Aoki

加入题单

算法标签: