Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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")

 

posted on 2016-04-15 11:53  Tonix  阅读(265)  评论(0)    收藏  举报