Python题解 | #杨辉三角的变形#
杨辉三角的变形
https://www.nowcoder.com/practice/8ef655edf42d4e08b44be4d777edbf43
while True:
try:
n = int(input())
if n == 1 or n == 2:
print(-1)
else:
if n % 2 != 0:
print(2)
elif n % 4 == 0:
print(3)
else:
print(4)
except:
break
查看5道真题和解析