40分求助
查看原帖
40分求助
1239074
woshiSBSBSBSB楼主2024/7/18 11:22
#include <iostream>
using namespace std;
int main(){
	long long x;
	int c;
	char a,b;
	cin>>x>>a>>b;
	if(a!='C'&&b=='B'||a=='B'&&b!='C'){
		c=1.0*x*0.8;
		cout<<c;
	}else if(a!='B'&&b=='C'||a=='C'&&b!='B'){
		c=1.0*x*0.7;
		cout<<c;
	}else if(a=='C'&&b=='B'||a=='B'&&b=='C'){
		c=1.0*x*0.6;
		cout<<c;
	}else if(a=='A'&&b=='A'){
		cout<<x;
	}
	return 0;
}
2024/7/18 11:22
加载中...