pat-天梯賽-L1-031 到底是不是太胖了(10 )
阿新 • • 發佈:2019-02-15
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<cstring> #include <vector> #include <cmath> #include <iomanip> #define ll long long using namespace std; int main() { int n,sg,tz; double bz,zstz; cin>>n; while(n--){ cin>>sg>>tz; zstz = tz/2.0; bz = (sg-100)*0.9; if(fabs(zstz-bz)<bz *0.1) cout<<"You are wan mei!"<<endl; else if(zstz>bz)//之前這裡寫成zstz>=bz*1.1,zstz<=bz*0.9,有一個測試點沒過 cout<<"You are tai pang le!"<<endl; else if(zstz<bz) cout<<"You are tai shou le!"<<endl; } return 0; }