Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created October 20, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/31e93ce05e58e1dd868ac76407c12e5f to your computer and use it in GitHub Desktop.
Save whatalnk/31e93ce05e58e1dd868ac76407c12e5f to your computer and use it in GitHub Desktop.
AtCoder ARC 046 B - 石取り大作戦
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