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

HackerRank "Kitty and Katty"的更多相关文章

  1. [css]我要用css画幅画(八) - Hello Kitty

    接着之前的[css]我要用css画幅画(七) - 哆啦A梦,这次画的是Hello Kitty. /* 开始前先说点废话, 一转眼就2016年了,过完年后一直没更新博客,无他,就是懒得动. 这一转眼,一 ...

  2. 使用 CSS3 绘制 Hello Kitty

    偶然间看到了 SegmentFault 上的一篇文章,感觉这个 Hello Kitty 画的还不错,心血来潮也用 CSS3 画了个 Hello Kitty,现在在这里记录一下详细的绘制过程.想要源码. ...

  3. 日常小测:颜色 && Hackerrank Unique_colors

    题目传送门:https://www.hackerrank.com/challenges/unique-colors 感谢hzq大神找来的这道题. 考虑点分治(毕竟是路经统计),对于每一个颜色,它的贡献 ...

  4. HackerRank "Square Subsequences" !!!

    Firt thought: an variation to LCS problem - but this one has many tricky detail. I learnt the soluti ...

  5. HackerRank "Minimum Penalty Path"

    It is about how to choose btw. BFS and DFS. My init thought was to DFS - TLE\MLE. And its editorial ...

  6. HackerRank "TBS Problem" ~ NPC

    It is marked as a NPC problem. However from the #1 code submission (https://www.hackerrank.com/Charl ...

  7. HackerRank Extra long factorials

    传送门 今天在HackerRank上翻到一道高精度题,于是乎就写了个高精度的模板,说是模板其实就只有乘法而已. Extra long factorials Authored by vatsalchan ...

  8. HackerRank "Lucky Numbers"

    Great learning for me:https://www.hackerrank.com/rest/contests/master/challenges/lucky-numbers/hacke ...

  9. HackerRank "Playing with numbers"

    This is 'Difficult' - I worked out it within 45mins, and unlocked HackerRank Algorithm Level 80 yeah ...

随机推荐

  1. poj1192 最优连通子集(树形dp)

    题目链接:poj1192 最优连通子集 求一棵无向树的最大子树和..类似于求最大子段和的办法,树形dp. dp[i][0]:以i为根,不包括 i 结点的子树最大权 dp[i][1]:以i为根,包括 i ...

  2. svn用法:摘自http://wh-vip-126-com200907043220.iteye.com/blog/424642

    下载最新版本svn(http://www.visualsvn.com/server/ ) 1.安装SVN 2.创建user与repository 3.Eclipse下配置SVN插件    3.1帮助- ...

  3. freemarker if elseif

    FreeMarker模板 if, else, elseif 指令 : if, else, elseif 语法 <#if condition> ... <#elseif conditi ...

  4. set集合类型

    set表示一个集合,相当于C#中的Hashtable,不同的地方在于,所有的值共用一个key. 相关操作如下图.

  5. hdu 4747 Mex

    http://acm.hdu.edu.cn/showproblem.php?pid=4747 设我们输入的数组为 a[],我们需要从 1 到 n 遍历, 假设遍历到 i 时, 遍历的过程中用b[j]表 ...

  6. ionic本质

    ionic本质一开发工具,ionic项目目录里在大堆东西,一堆插件(plugins),还有一堆npm包(node_modules),其实都是骗人的-( ̄▽ ̄-)~ 什么nodejs,npm只是为了解决 ...

  7. [转]解决ubuntu下面putty不能连接RS232串口(USB2COM线)

    http://m.blog.csdn.net/blog/wuyanrobert_tjsd/33045255 最后还是sudo了,感觉注销后没有加入dialout组

  8. Array 、 Dictionary 、 Object 3大数据结构 以及 for ... in for each的研究

    Array:存储方式-------索引存储 (要求key是大于等于0的整数) Dictionary.Object:存储方式---------索引存储 区别:可以说它们的 key 都 对应 各自的引用, ...

  9. c#新手之1-如何组织类及相互调用

    不知道这个文章的名字起的对不对,姑且这么叫吧.我在这之前用c语言写程序几乎很少用函数调用来解决问题,都是用全局变量然后面向过程对数据做简单的处理,这就造成了我在学习c@之后仍有这个毛病,好点的时候有个 ...

  10. Android Studio项目目录结构

    在Android Studio中,提供了以下几种项目结构类型 我们一般常用的有以下两种结构: Project 结构类型 app/build/ app模块build编译输出的目录 app/build.g ...