AtCoder Beginner Contest 210
翻译中…
Problem Statement
翻译中…
We have a deck of $N$ cards.
Each of these cards is good or bad.
翻译中…
Using this deck, Takahashi and Aoki will play a game against each other. In the game, the players alternately draw the topmost card and eat it. The player who first gets to eat a bad card loses the game. (Here, it is guaranteed that the deck contains at least one bad card.)
翻译中…
You are given a string $S$ consisting of 0 and 1. For each $i = 1, 2, \ldots, N$,
翻译中…
- if the
$i$-th character of$S$is0, it means that the$i$-th card from the top of the deck is good; - if the
$i$-th character of$S$is1, it means that the$i$-th card from the top of the deck is bad.
翻译中…
Which player will lose when Takahashi goes first in the game?
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10^5$$N$is an integer.$S$is a string of length$N$consisting of0and1.$S$contains at least one occurrence of1.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
S
翻译中…
Output
翻译中…
Print the name of the player who will lose when Takahashi goes first in the game: Takahashi or Aoki.
翻译中…
样例
Input #1
5
00101
Output #1
Takahashi
First, Takahashi will eat a good card. Next, Aoki will eat a good card. Then, Takahashi will eat a bad card.
Thus, Takahashi will be the first to eat a bad card, so we should print `Takahashi`.
Input #2
3
010
Output #2
Aoki
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。