-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDay26.java
28 lines (24 loc) · 871 Bytes
/
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
import java.util.*;
public class Day26 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int actualDay = sc.nextInt();
int actualMonth = sc.nextInt();
int actualYear = sc.nextInt();
int expectedDay = sc.nextInt();
int expectedMonth = sc.nextInt();
int expectedYear = sc.nextInt();
int fine;
if (actualYear > expectedYear) {
fine = 10000;
} else if (actualMonth > expectedMonth && (actualYear >= expectedYear)) {
fine = 500 * (actualMonth - expectedMonth);
} else if (actualDay > expectedDay && (actualMonth >= expectedMonth) && (actualYear >= expectedYear)) {
fine = 15 * (actualDay - expectedDay);
} else {
fine = 0;
}
System.out.println(fine);
sc.close();
}
}