-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathDragon.java
More file actions
26 lines (24 loc) · 716 Bytes
/
Copy pathDragon.java
File metadata and controls
26 lines (24 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//problem: https://codeforces.com/problemset/problem/1337/B
import java.util.Scanner;
public class Dragon{
public static void main(String[] args){
Scanner sObj = new Scanner(System.in);
int nos = sObj.nextInt();
for(int i=0; i<nos; i++){
int hp = sObj.nextInt();
int halfSpell = sObj.nextInt();
int lightning = sObj.nextInt();
while(hp>20 && halfSpell > 0){
hp = hp/2 + 10;
halfSpell--;
}
hp -= lightning*10;
if(hp <= 0){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
}
}