-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day26.java
40 lines (36 loc) · 1.09 KB
/
Day26.java
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
31
32
33
34
35
36
37
38
39
40
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner scan = new Scanner(System.in) ;
int Dreturn = scan.nextInt(), Mreturn = scan.nextInt(), Yreturn = scan.nextInt();
int DDue = scan.nextInt(), MDue = scan.nextInt(), YDue = scan.nextInt();
int fine ;
if(Yreturn < YDue){
fine = 0 ;
}
else if( Yreturn > YDue){
fine = 10000 ;
}
else{
if(Mreturn < MDue){
fine = 0 ;
}
else if(Mreturn > MDue){
fine = Mreturn - MDue ;
fine *= 500 ;
}
else{
if(Dreturn > DDue){
fine = Dreturn - DDue ;
fine *= 15 ;
}
else{
fine = 0 ;
}
}
}
System.out.println(fine) ;
}
}