結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
|
提出日時 | 2020-09-24 17:06:44 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 176 ms / 5,000 ms |
コード長 | 1,014 bytes |
コンパイル時間 | 2,181 ms |
コンパイル使用メモリ | 74,548 KB |
実行使用メモリ | 41,628 KB |
最終ジャッジ日時 | 2024-06-28 04:59:28 |
合計ジャッジ時間 | 5,786 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import java.util.*;public class Main {public static void main(String[] args) throws Exception {Scanner sc = new Scanner(System.in);String[] p1 = sc.nextLine().split(" ",0);String[] p2 = sc.nextLine().split(" ",0);String name1 = p1[0];String point1 = p1[1];String hand1 = p1[2];String name2 = p2[0];String point2 = p2[1];String hand2 = p2[2];if(point1.length() > point2.length()) {System.out.println(name1);}else if(point2.length() > point1.length()) {System.out.println(name2);}else {if(point1.compareTo(point2) < 0) {System.out.println(name2);}else if(point1.compareTo(point2) > 0) {System.out.println(name1);}else {System.out.println(-1);}}}}