- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdtShop.java
More file actions
Latest commit
26 lines (24 loc) · 629 Bytes
/
Copy pathdtShop.java
File metadata and controls
26 lines (24 loc) · 629 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
importjava.util.*;
importjava.lang.String;
publicclassdtShop {
publicstaticvoidmain(String[] args) {
Scannersc = newScanner(System.in);
intn =sc.nextInt();
StringT1 = sc.nextLine();
intt[] = newint[3];
for(inti = 0; i < n; i++) {
t[i] = (int) T1.charAt(i);
}
StringT2 = sc.nextLine();
intj[] = newint[3];
for(inti = 0; i < n; i++) {
j[i] = (int) T2.charAt(i);
}
sc.close();
intminT = Math.min(t[1],Math.min(t[2],t[3]));
intminJ = Math.min(j[1],Math.min(j[2],j[3]));
if(minT+minJ >n ) System.out.println(-1);
else {
}
}
}