8.10 第七场 Smzzl with Tropical Taste
8.10 第七场 Smzzl with Tropical Taste
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1683 Accepted Submission(s): 898
Problem Description
A boy, whose ID is smzzl, loves drinking Black Ice Tea(BIT), especially the tropical taste one.
The shop owner knows that, and she prepares a swimming pool so that there would be enough space for her to store BIT. When the boy knows that the owner prepared a swimming pool, he starts to drink in the swimming pool. While the owner is pouring BIT into the swimming pool, the boy is drinking it, too.
Assuming that there are V liters of BIT in the swimming pool, the speed the owner pours BIT is qV liters per second, and the speed the boy drinks BIT is pV liters per second. Note that V changes as the time goes.
Now, the owner wants to know whether the following statement is true:
For any G>0, there exists a T>0, for any t>T, the boy drinks more than G liters of BIT after t seconds.
Input
The input consists of multiple test cases.
The first line contains an integer T (1≤T≤100) – the number of test cases.
For each test case, there are two decimals p,q (0<p,q<104, they have at most 4 decimal places) in a single line, p,q are mentioned in the statement. You may regard the initial volume of BIT as 1 liter, and the swimming pool can contain infinity volume of BIT.
Output
For each test case, output a sentence in a single line.
If the statement is true, output ‘N0 M0R3 BL4CK 1CE TEA!’.
If the statement is false, output ‘ENJ0Y YOURS3LF!’
Sample Input
2
1.1 2.2
2.05 1.4
Sample Output
N0 M0R3 BL4CK 1CE TEA!
ENJ0Y YOURS3LF!
大概题意:
给出到饮料的速度与喝饮料的速度,判断池子中饮料的量是否递增
思路:
比较倒饮料与喝饮料速度大小即可
代码:
//
// Created by Black on 2021/8/10.
//
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
double drink, pour;
int t;
cin >> t;
while (t--) {
scanf("%lf %lf", &drink, &pour);
// cin >> drink >> pour;
if (drink <= pour) {
cout << "N0 M0R3 BL4CK 1CE TEA!" << endl;
} else {
cout << "ENJ0Y YOURS3LF!" << endl;
}
}
return 0;
}
//
// v = pour * v - drink * v
//
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效