90pts WA#4
查看原帖
90pts WA#4
916579
GoodLuckCat楼主2023/12/30 10:45
#include<iostream>
using namespace std;
int main()
{
    long long x;
    cin>>x;
    char a,b;
    cin>>a>>b;
    if(a>b)swap(a,b);
    int aa=a-65,bb=b-65;
    if((aa==1||bb==1)&&(aa!=2&&bb!=2))cout<<x/5*4;
    if((aa==2||bb==2)&&(aa!=1&&bb!=1))cout<<x/10*7;
    if(aa==1&&bb==2)cout<<x/5*3;
}

44 号测试点错了,其余都对。就是用数字表示菜名,在后三个 if 中,11 表示 B 菜,22 表示 C 菜。

2023/12/30 10:45
加载中...