-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolution.java
32 lines (25 loc) · 998 Bytes
/
Solution.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
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 scanner = new Scanner(System.in);
int actRetDay = scanner.nextInt();
int actRetMonth = scanner.nextInt();
int actRetYear = scanner.nextInt();
int expRetDay = scanner.nextInt();
int expRetMonth = scanner.nextInt();
int expRetYear = scanner.nextInt();
int fine = 0;
if (expRetYear < actRetYear) {
fine = 10000;
} else if (expRetYear == actRetYear) {
if (actRetMonth > expRetMonth) {
fine = (actRetMonth - expRetMonth) * 500;
} else if (actRetMonth == expRetMonth && actRetDay > expRetDay) {
fine = (actRetDay - expRetDay) * 15;
}
}
System.out.println(fine);
}
}