1、先找规律:
-1 -1 (2 3 2 4) (2 3 2 4) (2 3 2 4) 循环
2、
def demo(temp): arr = [4, 2, 3, 2] if temp <= 2: return -1 return arr[(temp-2)%4] import sys for line in sys.stdin: a = line.split() for i in a: print(demo(int(i)))