提交时间:2023-11-11 10:01:20
运行 ID: 109715
#include <bits/stdc++.h> using namespace std; //long long dp[35]; int main(){ int n; cin>>n; if(n%2==0){ cout<<pow(2,n-1)<<endl; } else{ cout<<pow(2,n-1)+1<<endl; } return 0; // for(int i = 2;i<=n;i++){ // for(int j = 1;j<i;j++){ // dp[i]+=dp[j]+dp[i-j-1]; // } // } // cout<<dp[n]<<endl; // return 0; }