forked from rajatgoyal715/Hackerrank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibraryFine.java
More file actions
30 lines (28 loc) · 780 Bytes
/
LibraryFine.java
File metadata and controls
30 lines (28 loc) · 780 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
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int ad = s.nextInt();
int am = s.nextInt();
int ay = s.nextInt();
int ed = s.nextInt();
int em = s.nextInt();
int ey = s.nextInt();
if(ay>ey)
System.out.println(10000);
else if(ay==ey){
if(am>em)
System.out.println(500*(am-em));
else if(am==em){
if(ad>ed)
System.out.println(15*(ad-ed));
else
System.out.println(0);
}
else
System.out.println(0);
}
else
System.out.println(0);
}
}