This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long lld;
lld f(int n){
if(n < 3) return 1;
n -= 2;
lld r = (1LL<<n);
if(n>3) r -= (1LL<<(n-3));
return r;
}
int main(){
int n;
while(~scanf("%d", &n))
printf("%lld\n", f(n));
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |