Created
July 3, 2023 02:38
-
-
Save nk4dev/67b122f317e54e20055e69dfeb0e56ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クラス名は必ずMainにする必要があります。 | |
import java.util.*; | |
public class Main { | |
public static void main(String args[] ) throws Exception { | |
Scanner sc = new Scanner(System.in); | |
String s = sc.next(); | |
String s2 = sc.next(); | |
String s3 = sc.next(); | |
int sleng = s.length(); | |
int sleng2 = s2.length(); | |
int sleng3 = s3.length(); | |
String result = sleng > sleng2 &&sleng > sleng3 ? s : sleng2 > sleng3 ? s2 :s3; | |
System.out.print(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment