Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- public class Main {
- public static void main(String[] args) throws Exception {
- BufferedReader r =new BufferedReader(new InputStreamReader(System.in));
- long t=Long.parseLong(r.readLine());
- while(t-->0)
- {
- String[] value=r.readLine().split(" ");
- double gold=Integer.parseInt(value[0]);
- double diamond=Integer.parseInt(value[1]);
- double coal=Integer.parseInt(value[2]);
- double total=gold+diamond+coal;
- if(total!=0){
- double diamondChance=100*(diamond/total);
- if(diamondChance>50)
- {System.out.println("Yes");}
- else
- {System.out.println("No");}
- }
- else
- {System.out.println("No");}
- }
- }
- }
Add Comment
Please, Sign In to add comment