蒟蒻9分求助
查看原帖
蒟蒻9分求助
966040
HAPPY804楼主2024/5/24 17:24
n=int(input())
p=int(input())
a=1
b=1
c=0
if n==1 or n==2:
    c=1
else:   
    for x in range(n-2):
        c=a*b
        a=b
        b=c
print(c%p)
2024/5/24 17:24
加载中...