4 条题解
-
1
高精度的!!!
#include using namespace std; int a[10000]; int zf(int n) { a[0] = 1; for (int j = 0; j < n; j++) { int x = 0; for (int i = 0; i < 2000; i++) { a[i] = a[i] * 2 + x; x = a[i] / 10; a[i] = a[i] % 10; } } int x = 0; for (int i = 0; i < 2000; i++) { if (a[i] == 0 && a[i - 1] == 0 && a[i - 2] == 0) { x = i; break; } } x -= 3; a[0]--; for (int i = x; i >= 0; i--) { cout << a[i]; } return 1; } int main() { int n; cin >> n; zf(n); return 0; }
-
-1
#include<bits/stdc++.h> using namespace std; int a[10000]; int zf(int n) { a[0] = 1; for (int j = 0; j < n; j++) { int x = 0; for (int i = 0; i < 2000; i++) { a[i] = a[i] * 2 + x; x = a[i] / 10; a[i] = a[i] % 10; } } int x = 0; for (int i = 0; i < 2000; i++) { if (a[i] == 0 && a[i - 1] == 0 && a[i - 2] == 0) { x = i; break; } } x -= 3; a[0]--; for (int i = x; i >= 0; i--) { cout << a[i]; } return 1; } int main() { int n; cin >> n; zf(n); return 0; }
-
-3
#include<bits/stdc++.h> using namespace std; long long s=1; long long n; int main(){ cin>>n; for(int i=1;i<n;i++){ s=s*2+1; } cout<<s; } /// /// __ __ __ /// / / / /_ ______/ /________ /// / /_/ / / / / __ / ___/ __ \ /// / __ / /_/ / /_/ / / / /_/ / /// /_/ /_/\__, /\__,_/_/ \____/ /// /____/ ///
- 1
信息
- ID
- 1586
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- 递交数
- 181
- 已通过
- 35
- 上传者