24 条题解

  • 1
    @ 2026-4-26 11:02:54

    #include using namespace std;

    int main(){ int arr[47],i,k; cin>>k; arr[0]=1; arr[1]=1; for(i=2;i<k;i++){ arr[i]=arr[i-1]+arr[i-2];

    }
    cout<<arr[k-1];
    
    return 0;
    

    }

    • 1
      @ 2026-4-19 10:47:26

      #incude<bits/stdc++.h> using namespace std int main(){ int m,n cin>>m>>n; int i,sum1=0 sum2=0 for(i=m

      }

      • 1
        @ 2026-4-19 9:39:59

        0192837465

        • 1
          #include<bits/stdc++.h>
          using namespace std;
          int main(){
              cout<<"Hello,World!";
              return 0;
          }
          

          点个赞再拿走吧

        • -1
          @ 2026-5-17 10:00:40

          #include<bits/stdc++.h>

          using namespace std;

          int main(){

          int arr[100],n,sum,a;
          
          cin>>n;
          
          sum=0;
          
          for(int i=0;i<n;i++){
          
          	cin>>arr[i];
          
          	sum=sum+arr[i];
          
          }
          
          a=sum/n;
          
          for(int i=0;i<n;i++){
          
          		if(arr[i]>a){
            
          			cout<<arr[i]<<" "<<i<<endl;
              
          	}
          
          }
          
          return 0;	
          

          }

          • -1
            @ 2026-5-17 9:08:44

            #include<bits/stdc++.h> #include sort

            • -1
              @ 2026-5-5 19:11:22

              www

              • -1
                @ 2025-11-26 17:23:21

                **SU </u>

                • -2
                  @ 2026-4-12 10:49:08

                  #include<bits/stdc++.h> using namespace std; string s; int main(){ while(getline(cin,s)){ string a(s.size(),' '); stack sta; for(int i=0;i<s.size();++i){ if(s[i]'(') { sta.push(i); } else if(s[i]')'){ if(sta.empty()){ a[i]='?'; } else{ sta.pop(); } } } while(!sta.empty()){ int i=sta.top(); sta.pop(); a[i]='$'; } cout<<s<<endl; cout<<a<<endl; } return 0; }

                  • -2
                    @ 2026-4-12 10:48:40

                    #include<bits/stdc++.h> using namespace std; string s; int a,m; int main(){ cin>>a; while(a--){ cin>>s; m=s.size()-1; bool flag=0; stack a; for(int i=0;i<=m;i++){ if(s[i]'('||s[i]'{'||s[i]'[') a.push(s[i]); else{ if(a.size()&&a.top()'('&&s[i]')'||a.size()&&a.top()'['&&s[i]==']')a.pop(); else{ flag=1; break; } }
                    } if(flag||a.size()) cout<<"No\n"; else cout<<"Yes\n"; } return 0; }

                    • -2
                      @ 2026-2-12 21:15:33

                      #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello,World!"; return 0; }

                      • -2
                        @ 2026-2-12 21:15:18

                        #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello,World!"; return 0; }

                        • -2
                          @ 2025-11-17 17:21:32

                          #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

                          • @ 2025-11-17 17:22:20

                            #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

                        • -2
                          @ 2025-9-28 17:26:10

                          6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

                          • -2
                            @ 2025-9-28 17:25:20
                            #include <iostream>
                            using namespace std;
                            int main(){
                            	cout << "Hello,World!";
                            	return 0;
                            }
                            
                            
                            • -3
                              @ 2025-11-17 17:27:27

                              #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

                              • -3
                                @ 2025-7-24 13:18:56
                                #include<iostream>
                                using namespace std;
                                int main() {
                                cout<<"Hello,World!";
                                
                                    return 0;
                                }
                                
                                
                                
                                • -3
                                  @ 2025-7-15 15:38:57

                                  #include using namespace std; int main(){ cout<<"Hello,World!"; return 0; }

                                  • -3
                                    @ 2025-3-15 8:48:47

                                    #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello,World!"; return 0; }

                                    • -4
                                      @ 2025-11-17 17:19:08

                                      ghddhgjhgjdghkfghkgfjkhgjg~~gfdk**gfsjdgkdgfhsggjckjgkjhgddhgdjhgjhgfjhgdjhgkfjkjjf*jfkhkjjkg</s>hgkjghkhf~~</strong></u>~~</em>*</u>~~

                                      信息

                                      ID
                                      2
                                      时间
                                      1000ms
                                      内存
                                      256MiB
                                      难度
                                      1
                                      标签
                                      递交数
                                      1127
                                      已通过
                                      217
                                      上传者