File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ import java .io .*;
2
+ public class Main {
3
+ public static void main (String [] args ) throws IOException {
4
+ File file = new File (args [0 ]);
5
+ BufferedReader br = new BufferedReader (new FileReader (file ));
6
+ String line ;
7
+ while ((line = br .readLine ()) != null ) {
8
+ String [] a = line .replace (" | " , " " ).split (" " );
9
+ int num = 0 ;
10
+ for (int i = 0 ; i < a [0 ].length (); i ++) {
11
+ if (a [0 ].charAt (i )!=a [1 ].charAt (i )) {
12
+ num ++;
13
+ }
14
+ }
15
+ if (num >6 ) System .out .println ("Critical" );
16
+ else if (num ==5 ||num ==6 ) System .out .println ("High" );
17
+ else if (num ==3 ||num ==4 ) System .out .println ("Medium" );
18
+ else if (num ==1 ||num ==2 ) System .out .println ("Low" );
19
+ else System .out .println ("Done" );
20
+ }
21
+ br .close ();
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments