forked from deepanshumishra/JavaAndCPP_programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFLOW014.java
More file actions
30 lines (23 loc) · 842 Bytes
/
Copy pathFLOW014.java
File metadata and controls
30 lines (23 loc) · 842 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
27
28
29
30
package codechef_lib;
import java.util.Scanner;
public class FLOW014 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i=1;i<=t;i++) {
double h = sc.nextDouble();boolean h_t=false;
double cc = sc.nextDouble();boolean cc_t = false;
double ts = sc.nextDouble();boolean ts_t = false;
if(h>50) {h_t=true;}
if(cc<0.70) {cc_t=true;}
if(ts>5600) {ts_t=true;}
if(h_t && cc_t &&ts_t) {System.out.println("10");
}else if(h_t&&cc_t) {System.out.println("9");
}else if(ts_t&&cc_t) {System.out.println("8");
}else if(h_t&&ts_t) {System.out.println("7");
}else if(h_t||cc_t||ts_t) {System.out.println("6");
}else if(!h_t&&!cc_t&&!ts_t) {System.out.println("9");}
}
}
}