3 条题解

  • 0
    @ 2023-8-24 11:12:10
    #include<bits/stdc++.h>
    using namespace std;
    int f(int n){
    	if(n==1||n==2) return 1;
    	else return f(n-1)+f(n-2);
    }
    
    int main(){
    	int n;
    	cin>>n;
    	cout<<f(n);
    	return 0;
    }
    // 
    //     	   __  __          __  
    //  	  / / / /_  ______/ /________ 
    //       / /_/ / / / / __  / ___/ __ \
    //  	/ __  / /_/ / /_/ / /  / /_/ /
    //     /_/ /_/\__, /\__,_/_/   \____/ 
    //           /____/                   
    // 
    

    信息

    ID
    1250
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    递交数
    153
    已通过
    57
    上传者