#include<bits/stdc++.h>
using namespace std;
int main(){
	double c,cn=0;
	cin>>c;
	double h;
	for(int i=1;i<=c;i++){
		cin>>h;
		cn+=h;
	}
	double m=0;
	if(cn>100){
		m=cn-100;
		cn-=m;
		m/=0.9;
		cn+=m;
	}
	printf("%.2lf",cn);
}

3 条评论

  • @ 2025-7-10 19:48:24

    而不是打折

    • @ 2025-7-10 19:48:08

      @金泓镒 标题应该是打折优惠

      • @ 2025-7-10 15:33:21
        using namespace std;
        int main(){
            int n;
            cin>>n;
            int s=0;
            while(n!=0){
            	s+=n%10;
            	n/=10;
        	}
        	while(s>=10){
        		int x=s,h=0;
        		while(x!=0){
        			h+=x%10;
        			x/=10;
        		}
        		s=h;
        	}
        	cout<<s;
            return 0;
        }
        • 1

        信息

        ID
        116
        时间
        1000ms
        内存
        256MiB
        难度
        8
        标签
        递交数
        56
        已通过
        9
        上传者