题干 C++实现 #include<iostream> using namespace std;int f0(int n); int f1(int n);int main() {int n;cin >> n;cout << f0(n) + f1(n);return 0; }int f0(int n) {//末尾为0的串if (n == 1) {return 1;}else {return f0(n - 1) + f1(n - 1);} } int f1(int n) {//末尾为1的串if (n == 1) {return 1;}else {return f0(n - 1);} }```