WonderfulD 题解分享 · 2024/4/4
切面条(结果填空) - 题解
```java public static void main(String[] args) throws IOException { int a = 1; int b = 1; int c = 1; for (int i = 0; i < 9; i++) { a = b; b = 2 * a; c = a + 1; } System.out.println(a + b + c); } ``` 找规律
查看全文
0 0 0 5
desert 题解分享 · 2024/4/7
切面条(结果填空) - 题解
有点找规律的感觉 ``` #include<bits/stdc++.h> using namespace std; int main() { cout << pow(2, 10) + 1; //2的10次方加1 return 0; } ```
0 0 0 2
zzh 题解分享 · 2024/4/5
切面条(结果填空) - 题解
``` #include <bits/stdc++.h> #include <cmath> using namespace std; int main(){ int n; while(cin >> n){ if(n == 0){ cout << 2; } else{ int num = pow(2,n) + 1; cout << num << endl; } } return 0; } ```
0 0 0 0