Codechef•Aug 02, 2025
Battery Health
Hazrat Ali
Codechef
Apple considers any iPhone with a battery health of 80% or above, to be in optimal condition.
Given that your iPhone has X% battery health, find whether it is in optimal condition.
Input Format
- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case contains an integer X — 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
- 1≤T≤100
- 0≤X≤100
Sample 1:
Input
4 97 42 80 10
Output
YES NO YES NO
Solution
t = int(input())
for _ in range(t):
x = int(input())
if x > 79:
print("YES")
else:
print("NO")