HackerRank "Kitty and Katty"

It's more of a brain-teaser than a Game Theory problem..

#!/bin/python3

T = int(input().strip())
for a0 in range(T):
    n = int(input().strip())
    #
    #   The last left 2 blocks can always produce a winning state, given % 3:
    #   Think about the below cases
    #   equal: 0-0 1-1 2-1
    #   non-equal: 0-1, 1-2, 0-2
    if n == 1: 
        print ("Kitty")
    elif n & 1:
        print ("Katty")
    else:
        print ("Kitty")
原文地址:https://www.cnblogs.com/tonix/p/5394853.html