5 条题解

  • 1
    @ 2025-2-5 15:16:24
    #include <bits/stdc++.h>
    using namespace std;
    int n;
    int f(int x){
    	if(x==0) return 1;
    	if(x==1) return 1;
    	if(x==2) return 2;
    	if(x==3) return 2;
    	return f(x-2)+f(x-3);
    } 
    int main()
    {
    	cin>>n;
    	cout<<f(n);
    	return 0;
    }

    信息

    ID
    215
    时间
    1000ms
    内存
    64MiB
    难度
    10
    标签
    递交数
    4
    已通过
    4
    上传者