提交时间:2023-10-04 10:26:25

运行 ID: 104865

#include<bits/stdc++.h> using namespace std; int main(){ int n,i,s = 1,a[1000]; cin>>n; for(i = 1;i <= n;i++){ if(i == 1){ a[1] = 3; }else if(i == 2){ a[2] = 7; }else{ a[i] = a[i - 1] * a[i - 2]; } s = a[i]; } cout<<s<<endl; }