9 条题解
-
2
#include #include <math.h> #include #include <stdio.h> #include #include #include #include <string.h> #include using namespace std; #define LL long long const int N = 1e6 + 10; const int INF = 0x3f3f3f3f; int a[N],len,x; int main() { cin >> n; a[++len]=1; while(n--) { for(int i = 1; i <= len;i++) { a[i] = a[i]*2+x; x = a[i]/10; a[i] %= 10; } if(x) a[++len]=x; x = 0; } for(int i = len;i >= 1;i--) { cout <<a[i]; }
return 0;
}
信息
- ID
- 1194
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- 递交数
- 584
- 已通过
- 156
- 上传者