1 条题解

  • 0
    @ 2024-10-4 14:14:49
    #include<bits/stdc++.h>
    using namespace std;
    int main() {
    	int a,b,j=0,o=1,d=0,x=9999;
    	cin>>a;
    	for(int i=0;i<a;i++){
    		cin>>b;
    		if(b%2==1){
    			j+=b;
    		}
    		if(b%2==0){
    			o=o*b%47;
    		}
    		if(b>d){
    			d=b;
    		}
    		if(b<x){
    			x=b;
    		}
    	}
    	cout<<j<<endl<<o%47<<endl<<d<<" "<<x;
    	return 0;
    }
    

    信息

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