HackerRank "Kitty and Katty"
2024-10-10 06:31:13
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")
最新文章
- MPMoviePlayerController属性,方法,通知整理
- 数学的东西(BZOJ1951)
- 【USACO 3.1】Score Inflation(完全背包)
- 锋利的jQuery-1-- :的用法
- Rust 中的继承与代码复用
- [Oracle]Oracle数据库任何用户密码都能以sysdba角色登入
- Spring3之JDBC
- RPM的基础命令/yum基本命令
- Android 输入法键盘和activity页面遮挡问题解决
- mac下安装配置java jdk,maven,resin
- 读书笔记-你不知道的JS中-promise
- Pyharm中关于“warning: Debugger speedups using cython not found”问题的解决
- 【mysql】mysql 调优之 ——执行计划 explain
- @meda媒体查询
- Asp.Net MVC4中的全局过滤器
- [转]Oracle 中计算时间间隔的SQL 语句
- fiddler的inspectors传入的参数乱码
- 多线程之线程间协作的两种方式:wait、notify、notifyAll和Condition
- Python获取每一位的数字,并返回到列表
- java Web服务实现方案(REST+SOAP+XML-RPC)简述及比较