小石的签到题
小石的签到题
https://ac.nowcoder.com/acm/contest/5505/D
模拟发现除了1输之外,其他全都能赢。
可以选1然后把失败丢给对面。
import java.util.*; import java.math.*; import java.io.IOException; import java.io.InputStreamReader; import java.io.StreamTokenizer; import java.io.OutputStreamWriter; import java.io.BufferedReader; import java.io.PrintWriter; public class Main { public static void main(String args[])throws IOException { StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in))); PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); in.nextToken(); int n = (int)in.nval; if(n==1) out.print("Yang"); else{ out.print("Shi"); } out.flush(); } }