| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148489 | kkk20110529 | 小明养猪的故事 | C++ | Wrong Answer | 0 MS | 280 KB | 364 | 2026-02-22 11:19:13 |
#include<bits/stdc++.h> using namespace std; int main(){ int T,a[10000]; cin >> T; for(int i = 0;i < T;i++){ cin >> a[i]; } for(int i = 0;i < T;i++){ int b = 1; int d = 1; for(int j = 1;j < a[i];j++){ b = b * 2; if(j >= 3){ d = d * 2; } } if(a[i] <= 2){ d = 0; } cout << b-d << "\n"; } return 0; }
------Input------
17 1 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
------Answer-----
1 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
------Your output-----
1 6 12 24 48 96 192 384 768 1536 3072 6144 12288 24576 49152 98304 196608