1 solutions

  • 0
    @ 2023-1-17 22:36:37
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a[110],n,mi;
    	cin >> n;
    	for(int i = 0; i < n; i++){
    		cin >> a[i];
    	}
    	mi = a[0];//查找最小的数
    	for(int i = 1; i < n; i++){
    		if(a[i] < mi){
    			mi = a[i];
    		}
    	} 
    	//输出除了最小数以外的数
    	for(int i = 0; i < n; i++){
    		if(a[i] != mi){
    			cout << a[i] << " ";
    		}
    	} 
    	return 0;
    }
    
    
    
    • 1

    Information

    ID
    553
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    4
    Uploaded By