4 solutions

  • 0
    @ 2026-7-27 10:47:00
    #include<bits/stdc++.h>
    using namespace std;
    const int N=10010;
    int a[N];
    int main()
    {
    	int n;
    	cin>>n;
    	a[1]=0,a[2]=1;
    	for(int i=3;i<=n;i++)
    	{
    		a[i]=a[i-1]+a[i-2];
    	}
    	cout<<a[n];
    	return 0;
    }
    • 0
      @ 2026-1-17 10:26:53

      ''' ma,klncjvqfh'ofdwpxkla knsdjgvr3p2etqwfklsc,;vm dnbwepvgqfr'mcl EA$VKPJkfo[qe a'vmdrbwjo[5htwrml;DVBRWwwwwwwgm;sdddddd Rbwgpppppppppppppppppppppppppppppppppppppppppppppppppppppsjbfm fj rrrrrrrrrrrrrrrrrrr

      • -2
        @ 2025-2-22 11:36:18
        #include<bits/stdc++.h>
        using namespace std;
        int f(int x){
        	if(x==1) return 0;
        	if(x==2) return 1;
        	return f(x-1)+f(x-2);
        }
        int main()
        {
        	int n;
        	cin>>n;
        	cout<<f(n);
        	return 0;
        }
        
        • -6
          @ 2024-12-25 20:50:31

          有好心人发个题解码

          • 1

          Information

          ID
          936
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          90
          Accepted
          47
          Uploaded By