L1-031. 到底是不是太胖了

来源:互联网 发布:网络教育学位证书 编辑:程序博客网 时间:2024/04/28 01:02

//AC

#include <iostream>#include <cstdlib>#include <stdio.h>#include <algorithm>#include <math.h>#include <string.h>#include <queue>#include <stack>#include <vector>#include <map>#include <set>typedef long long ll;using namespace std;double zheng(float a,float b){    if(a>b){        return a-b;    }    else        return b-a;}int main(){    int t,H,W;    float B;    cin>>t;    while (t--) {        cin>>H>>W;        B=(H-100)*0.9;        if(zheng(W*0.5,B)<B*0.1){            printf("You are wan mei!\n");        }        else{            if(W*0.5>B){printf("You are tai pang le!\n");}             else printf("You are tai shou le!\n");        }            }    return 0;}


0 0