11 条题解

  • 6
    @ 2024-3-22 17:13:16
    #include<bits/stdc++.h> 
    using namespace std; 
    int main(){ 
        int i,n,x,max,min; 
        cin>>n; 
        cin>>x; 
        max=x; 
        min=x; 
        for(i=2;i<=n;i++){ 
            cin>>x; 
            if(x>max){ 
                max=x; } 
            else 
                if(x<min){ 
                    min=x; } 
        } cout<<min; 
    }
    
    • 3
      @ 2024-3-17 10:37:27
      #include<bits/stdc++.h> 
      using namespace std; 
      int main(){ 
          int i,n,x,max,min; 
          cin>>n; 
          cin>>x; 
          max=x; 
          min=x; 
          for(i=2;i<=n;i++){ 
              cin>>x; 
              if(x>max){ 
                  max=x; } 
              else 
                  if(x<min){ 
                      min=x; } 
          } cout<<min; 
      }
      
      • 1
        @ 2024-7-16 14:37:28
        #include<iostream>
        using namespace std;
        
        int main()
        {
            int n;
            cin >> n;
            int da = 2000;
            for(int i = 0; i < n ;i++)
            {
                int shu;
                cin >> shu;
                if(shu < da)
                {
                    da = shu;
                }
            }
            cout << da;
            return 0;
        }
        

        加油^_^

        • 1
          @ 2024-4-6 19:53:05
          #include<bits/stdc++.h> 
          using namespace std; 
          int main(){ 
              int i,n,x,max,min; 
              cin>>n; 
              cin>>x; 
              max=x; 
              min=x; 
              for(i=2;i<=n;i++){ 
                  cin>>x; 
                  if(x>max){ 
                      max=x;
                      } 
                  else 
                      if(x<min){ 
                          min=x;
                          } 
              }
              cout<<min;
              return 0; 
          }
          
          • 1
            @ 2024-3-24 16:52:17
            #include<bits/stdc++.h> 
            using namespace std; 
            int main(){ 
                int b; 
                cin>>b;
            	int a,s=0,d,i;
            	cin>>a;
            	d=a; 
                for(i=1;i<b;i++){ 
                    cin>>a;
                    if(d>a){
                    	d=a;
            		}
                    }
            		cout<<d;
            		return 0;
            		}
            
            • 1
              @ 2024-3-24 11:17:27
              #include<bits/stdc++.h>
              using namespace std;
              int main(){
              	int a[1001],min,n;
              	cin>>n;
              	for(int i=1;i<=n;i++)
              	cin>>a[i];
              	min=a[1];
              	for(int i=2;i<=n;i++)
              	if(min>a[i]){
              		min=a[i];
              	}
              	cout<<min;
              	return 0; 
              }
              
              • 0
                @ 2024-3-17 15:20:40

                #include<bits/stdc++.h> using namespace std; int main(){ int i,n,x,max,min; cin>>n; cin>>x; max=x; min=x; for(i=2;i<=n;i++){ cin>>x; if(x>max){ max=x; } else if(x<min){ min=x; } } cout<<min; }

                • 0
                  @ 2024-3-17 10:37:07

                  #include<bits/stdc++.h> using namespace std; int main(){ int i,n,x,max,min; cin>>n; cin>>x; max=x; min=x; for(i=2;i<=n;i++){ cin>>x; if(x>max){ max=x; } else if(x<min){ min=x; } } cout<<min; return 0; }

                  • 0
                    @ 2024-3-17 10:28:59

                    #include<bits/stdc++.h> using namespace std; int main(){ int i,n,x,max,min; cin>>n; cin>>x; max=x; min=x; for(i=2;i<=n;i++){ cin>>x; if(x>max){ max=x; } else if(x<min){ min=x; } } cout<<min; return 0; }

                    • -1
                      @ 2024-4-10 17:27:05

                      #include<bits/stdc++.h> using namespace std; int main(){ int i,n,x,max,min; cin>>n; cin>>x; max=x; min=x; for(i=2;i<=n;i++){ cin>>x; if(x>max){ max=x; } else if(x<min){ min=x; } } cout<<min; }

                      • 1

                      信息

                      ID
                      645
                      时间
                      1000ms
                      内存
                      125MiB
                      难度
                      5
                      标签
                      (无)
                      递交数
                      609
                      已通过
                      252
                      上传者