#45732: 測資#32


yp11351280@yphs.tp.edu.tw (810-43韓睿哲)

學校 : 臺北市私立延平高級中學
編號 : 276272
來源 : [203.72.178.1]
最後登入時間 :
2025-10-07 16:36:49

正確:E 0.00

我:E 0.01

????????

#include<bits/stdc++.h>
using namespace std;
int main(){
double a,b;
char c;
while(cin>>a>>b>>c){
if(c=='U'){
    if(a/30.9-b>=0)
    cout<<fixed<<setprecision(2)<<"U"<<" "<<a/30.9-b<<endl;
    else
    cout<<"No Money"<<endl;
}
if(c=='E'){
    if(a/34.5-b>=0)
    cout<<fixed<<setprecision(2)<<"E"<<" "<<(double)a/34.5-b<<endl;
    else
    cout<<"No Money"<<endl;
}
if(c=='J'){
    if(a/0.28-b>=0)
    cout<<fixed<<setprecision(2)<<"J"<<" "<<a/0.28-b<<endl;
    else
    cout<<"No Money"<<endl;
}
if(c=='T'){
    if(a-b>=0)
    cout<<fixed<<setprecision(2)<<"T"<<" "<<a-b<<endl;
    else
    cout<<"No Money"<<endl;
}
if(a-b>0&&a-b<0.5||a-b==0.5) cout<<0.00;
}
return 0;
}