| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 8688 | 季洁 | 小明的烦恼 | C++ | Wrong Answer | 0 | 0 MS | 244 KB | 251 | 2020-11-01 20:05:21 |
#include<bits/stdc++.h> using namespace std; int fun(int a){ int f=1; for(int i=2;i<=a;i++){ if(i%2==0) f=f*2+1; else f=f*2-1; } return f; } int main(){ int n,x; cin>>n; for(int i=1;i<=n;i++){ cin>>x; cout<<fun(x); } }