题解 | #小石的签到题#
小石的签到题
https://ac.nowcoder.com/acm/contest/26656/1047
首先可以打表猜结论
接下来采取反证法证明:
假设n>1时先手必败,即无论先手选几都必败,此时先手选走1,后手的下一次选x,是与先手选x等价的,由假设可知后手必败,所以先手必胜,与假设矛盾
n = int(input())
if n == 1 :
print("Yang")
else :
print("Shi")
小石的签到题
https://ac.nowcoder.com/acm/contest/26656/1047
n = int(input())
if n == 1 :
print("Yang")
else :
print("Shi")
相关推荐