当前位置:网站首页>Is l1-031 too fat (10 points)
Is l1-031 too fat (10 points)
2022-06-29 00:29:00 【Liabilities between persons^】
L1-031 Is it too fat (10 branch )
It is said that a person's standard weight should be his height ( Company : centimeter ) subtract 100、 Multiplied by 0.9 The kilogram obtained . The error between the real weight and the standard weight is 10% Inside is the perfect figure ( namely | True weight − Standard weight | < Standard weight ×10%). It is known that the market weight is twice the kilogram . Now give a group of people's height and actual weight , Please tell them if they are too fat or too thin .
Input format :
The first line of input gives a positive integer N(≤ 20). And then N That's ok , Each line gives two integers , They are the height of a person H(120 < H < 200; Company : centimeter ) And real weight W(50 < W ≤ 300; Company : Jin ), Separated by spaces .
Output format :
Output a line of conclusions for everyone : If it's the perfect body , Output You are wan mei!; If it's too fat , Output You are tai pang le!; Otherwise output You are tai shou le!.
sample input :
3
169 136
150 81
178 155
sample output :
You are wan mei!
You are tai shou le!
You are tai pang le!
AC Code
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<sstream>
using namespace std;
typedef long long ll;
const int N=100010;
int main()
{
int n;
cin >> n;
while(n -- )
{
double a, b;
cin >> a >> b;
a = (a - 100) * 0.9 * 2;
if(fabs(a - b) < a * 0.1)
cout << "You are wan mei!" << endl;
else if(b < a)
cout << "You are tai shou le!" << endl;
else
cout << "You are tai pang le!" << endl;
}
return 0;
}
边栏推荐
- Install MySQL on Windows platform (with Navicat premium 12 "using" tutorial)
- Haskell 配置 VS code 开发环境 (2022年6月)
- Daily practice: delete duplicates in the ordered array
- 点击劫持:X-Frame-Options未配置
- Single machine multi instance MySQL master-slave replication
- websocket-js连接如何携带token验证
- 旋轉接頭安裝使用注意事項
- Daily question 1: missing numbers
- Leetcode 178 Score ranking (June 27, 2022)
- How does the JVM bottom layer implement synchronized
猜你喜欢
随机推荐
JDBC连接、断开数据库的封装
Redis是什么
Reprint: VTK notes - clipping and segmentation - irregular closed loop clipping -vtkselectpolydata class (black mountain old demon)
Typescript -- Section 6 generic
每日一练:删除有序数组中的重复项
Test experience: how testers evolve from 0 to 1
MySQL high availability dual master synchronization
【LeetCode】21. Merge two ordered linked lists - go language solution
Reprint: VTK notes - clipping and segmentation - 3D curve or geometric cutting volume data (black mountain old demon)
JVM底层又是如何实现synchronized的
Typescript -- Section 1: basic types
With notes: insert sort --from WCC
be based on. NETCORE development blog project starblog - (13) add friendship link function
Sword finger offer 12 Path in matrix
Reading notes of English grammar new thinking Basic Edition 2 (I)
MNIST handwritten numeral recognition demo based on pytorch framework
Pinhole camera with added lens
请问同花顺上开户安全吗
Daily question 1: remove elements
Typescript -- Section 5: classes









