-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday-26-nested-logic.java
More file actions
31 lines (29 loc) · 880 Bytes
/
day-26-nested-logic.java
File metadata and controls
31 lines (29 loc) · 880 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
31
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int actRetD = sc.nextInt();
int actRetM = sc.nextInt();
int actRetY = sc.nextInt();
int expRetD = sc.nextInt();
int expRetM = sc.nextInt();
int expRetY = sc.nextInt();
int fine = 0;
if (actRetD <= expRetD) {
System.out.println(fine);
} else if (actRetM == expRetM) {
fine = 15 * (actRetD - expRetD);
System.out.println(fine);
} else if (actRetY == expRetY) {
fine = 500 * (actRetM - expRetM);
System.out.println(fine);
} else {
fine = 10000;
System.out.println(fine);
}
}
}