5 条题解

  • 1
    @ 2024-5-14 19:45:25

    这是题目:


    image


    这是代码:


    image

    • 1
      @ 2024-5-1 21:19:41

      牢底们,这一题太 简单了,学过C++的谁不会啊喂,以至于我格式都乱了(乐乐乐)

      #include<iostream> 
      using namespace std; 
      int main(){
          int n,a[105],minn=10000; 
          cin>>n; 
          for(int i=1;i<=n;i++){
              cin>>a[i]; 
              if(a[i]<minn){
                  minn=a[i];
              }
          }
          cout<<minn; 
          return 0;
      }
      
      • @ 2024-5-1 21:20:11

        需要我剖析一下这一题吗,大家留个回复

    • 0
      @ 2024-5-16 22:45:54

      秒了

      #include <bits/stdc++.h> 
      using namespace std;
      #define ll long long
      #define s string
      #define co cout
      #define ci cin
      #define re return
      ll n,a[105];
      int main(){
          ios::sync_with_stdio(0);
          cin.tie(0);
          cout.tie(0);
          cin>>n;
          for(ll i=1;i<=n;i++){
              cin>>a[i];
          }
          sort(a+1,a+n+1);
          cout<<a[1];
          return 0;
      }
      
      • 0
        @ 2024-5-5 10:14:58
        #include<iostream> 
        using namespace std; 
        int main(){
            int n,n[120],minn=19283;//minn越多越好 
            cin>>n; 
            for(int i=1;i<=n;i++)
            {
                cin>>a[i]; 
                if(a[i]<minn)
                {
                    minn=a[i];
                }
            }
            cout<<minn; 
            return 0;
        }
        
      • -1
        @ 2022-12-16 20:32:14
        #include <iostream>//hetao3097453
        using namespace std;
        int a[101];
        int main()
        {
            int n,minn = 9999;
            cin >> n;
            for(int i = 1;i <= n;i++)
            {
                cin >> a[i];
            }
            for(int i = 1;i <= n;i++)
            {
                minn = min(minn,a[i]);
            }
            cout << minn;  
            return 0;
        }
        
        
        • 1

        信息

        ID
        1304
        时间
        1000ms
        内存
        256MiB
        难度
        2
        标签
        递交数
        58
        已通过
        37
        上传者