Algorithm
Problem Link : https://www.codechef.com/problems/BTRYHLTH
Problem
Apple considers any iPhone with a battery health of or above, to be in optimal condition.
Given that your iPhone has battery health, find whether it is in optimal condition.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- The first and only line of each test case contains an integer — the battery health.
Output Format
For each test case, output on a new line, YES
, if the battery is in optimal condition, and NO
otherwise.
You may print each character in uppercase or lowercase. For example, NO
, no
, No
and nO
, are all considered identical.
Constraints
Sample 1:
4 97 42 80 10
YES NO YES NO
Explanation:
Test case : The battery health is which is greater than equal to . Thus, the battery is in optimal condition.
Test case : The battery health is which is less than . Thus, the battery is not in optimal condition.
Test case : The battery health is which is greater than equal to . Thus, the battery is in optimal condition.
Test case : The battery health is which is less than . Thus, the battery is not in optimal condition.
Code Examples
AdvertisementsDemonstration
CodeChef solution BTRYHLTH - Battery Health solution Codechef in C,C++