9 条题解

  • 1
    @ 2024-5-19 15:02:15

    joker题 👎

    • 1
      @ 2024-5-19 15:01:47

      joker 👎

      • -1
        @ 2023-12-10 9:00:42
        #include <bits/stdc++.h>
        using namespace std;
        long long n;
        long long arr[10005];
        long long f(int g){
        	arr[1]=1,arr[2]=2,arr[3]=3,arr[4]=4;
        	int a=2;
        	for(int i=5;i<=n;i++){
        		arr[i]=arr[i-1]+arr[i-3];
        	}
        	return arr[n];
        }
        int main(){
        	cin>>n;
        	cout<<f(n);
        	return 0 ;
        }
        
        • -1
          @ 2023-12-3 12:04:58

          #include <bits/stdc++.h> using namespace std; long long n; long long arr[10005]; int f(int g){ arr[1]=1,arr[2]=2,arr[3]=3,arr[4]=4; int a=2; for(int i=5;i<=100;i++){ arr[i]=arr[i-1]+a; a+=1; } return arr[n]; } int main(){ cin>>n; cout<<f(n); return 0; }

          • -1
            @ 2023-12-3 12:00:22
            #include <bits/stdc++.h>
            using namespace std;
            long long n;
            long long arr[10005];
            int f(int g){
            	arr[1]=1,arr[2]=2,arr[3]=3,arr[4]=4;
            	int a=2;
            	for(int i=5;i<=100;i++){
            		arr[i]=arr[i-1]+a;
            		a+=1;
            	}
            	return arr[n];
            }
            int main(){
            	cin>>n;
            	cout<<f(n);
                return 0;
            }
            
            • -1
              @ 2023-12-3 12:00:21

              #include <bits/stdc++.h> using namespace std; int main(){ int n,arr[20]; arr[1]=3,arr[2]=6,arr[3]=6; cin>>n; for(int i=4;i<=n;i++){ arr[i]=arr[i-1]+2*arr[i-2]; } cout<<arr[n]<<endl; return 0; }

              • -1
                @ 2023-12-3 12:00:14

                #include <bits/stdc++.h> using namespace std; long long n; long long arr[10005]; int f(int g){ arr[1]=1,arr[2]=2,arr[3]=3,arr[4]=4; int a=2; for(int i=5;i<=100;i++){ arr[i]=arr[i-1]+a; a+=1; } return arr[n]; } int main(){ cin>>n; cout<<f(n); return 0; }

                • -1
                  @ 2023-12-3 11:59:00

                  #include<bits/stdc++.h> using namespace std; int main(){

                  return 0; }

                  • -1
                    @ 2023-12-3 11:55:44

                    sb

                    • 1

                    信息

                    ID
                    350
                    时间
                    1000ms
                    内存
                    256MiB
                    难度
                    8
                    标签
                    递交数
                    38
                    已通过
                    7
                    上传者