2 条题解

  • 1
    @ 2024-11-24 11:27:21
    #include <iostream>
    using namespace std;
    int main() {
        int x, y;
    	cin >> x >> y ;
    	if(x==y){
    		cout << x*90 ; 
    	}	else if(x>y){
    		cout << y*90+(x-y)*60 ;
    	}   else if(x<y){
    	    cout << x*90+(y-x)*40 ;
    	} 
    	return 0;
    }
    
    • 0
      @ 2026-8-6 19:50:46

      #include<bits/stdc++.h> using namespace std; int main(){ int x,y; cin >> x >> y; if (x == y){ cout << x * 90; }else if(x > y){ cout << y * 90 + 60 * (x - y); }else { cout << x * 90 + 40 * (y - x); } return 0; }

      • 1

      信息

      ID
      4394
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      (无)
      递交数
      103
      已通过
      24
      上传者