Created
October 20, 2017 13:15
-
-
Save whatalnk/31e93ce05e58e1dd868ac76407c12e5f to your computer and use it in GitHub Desktop.
AtCoder ARC 046 B - 石取り大作戦
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = gets.chomp.to_i | |
a, b = gets.chomp.split(" ").map(&:to_i) | |
if n <= a | |
puts "Takahashi" | |
else | |
if a == b | |
if n % (a + 1) == 0 | |
puts "Aoki" | |
else | |
puts "Takahashi" | |
end | |
else | |
if a > b | |
puts "Takahashi" | |
else | |
puts "Aoki" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment