3 solutions

  • 1
    @ 2025-8-6 21:19:39

    #include <bits/stdc++.h> using namespace std; double x, y; int main() { cin >> x >> y; if (x <= 6000) { cout << fixed << setprecision(2) << max(x * 0.85, x - 500) - y; } else { cout << fixed << setprecision(2) << max(x * 0.9, x - 1000) - y; } return 0; }

    • 0
      @ 2025-8-26 9:05:57

      #include<bits/stdc++.h> using namespace std; int main(){ double a,b; cin>>a>>b; if(a<=6000){ if(a0.15>=500){ printf("%.2lf",a-500-b); } else printf("%.2lf",a0.85-b); } else{ if(a0.1>=1000){ printf("%.2lf",a-1000-b); } else printf("%.2lf",a0.9-b); } return 0;

      • 0
        @ 2025-8-6 23:00:26
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
        	int x,y;
        	cin>>x>>y;
        	double h=0;
        	if(x<=6000){
        		double a=x*0.15;
        		if(a>500){
        			a=500;
        		}	
        	h=x-a-y;	
        	}else{
        		double b=x*0.1;
        		if(b>1000){
        			b=1000;
        		}
        		h=x-b-y;
        	} 
        	
        	printf("%.2lf",h);
        ```
        
        
        ```
        • 1

        Information

        ID
        1083
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        8
        Tags
        (None)
        # Submissions
        103
        Accepted
        16
        Uploaded By