-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfifteen.java
More file actions
31 lines (24 loc) · 723 Bytes
/
fifteen.java
File metadata and controls
31 lines (24 loc) · 723 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
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String A=sc.next();
String B=sc.next();
int i= A.length();
int j=B.length();
int c=i+j;
System.out.println(c);
int k= A.compareTo(B);
if(k>0)
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}
System.out.println((A.toUpperCase()).charAt(0) + A.substring(1, A.length()) + " " + (B.toUpperCase()).charAt(0)+ B.substring(1, B.length()));
/* Enter your code here. Print output to STDOUT. */
}
}