結果
問題 | No.201 yukicoderじゃんけん |
ユーザー | yun_app |
提出日時 | 2016-05-12 12:15:37 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 58 ms / 5,000 ms |
コード長 | 1,004 bytes |
コンパイル時間 | 2,277 ms |
コンパイル使用メモリ | 74,800 KB |
実行使用メモリ | 50,372 KB |
最終ジャッジ日時 | 2024-04-15 15:16:49 |
合計ジャッジ時間 | 4,027 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 53 ms
50,228 KB |
testcase_01 | AC | 56 ms
50,208 KB |
testcase_02 | AC | 54 ms
49,948 KB |
testcase_03 | AC | 54 ms
50,372 KB |
testcase_04 | AC | 55 ms
50,232 KB |
testcase_05 | AC | 54 ms
49,976 KB |
testcase_06 | AC | 54 ms
50,288 KB |
testcase_07 | AC | 54 ms
50,156 KB |
testcase_08 | AC | 55 ms
50,248 KB |
testcase_09 | AC | 56 ms
50,004 KB |
testcase_10 | AC | 55 ms
50,328 KB |
testcase_11 | AC | 55 ms
50,024 KB |
testcase_12 | AC | 56 ms
50,076 KB |
testcase_13 | AC | 56 ms
49,996 KB |
testcase_14 | AC | 55 ms
50,236 KB |
testcase_15 | AC | 58 ms
50,120 KB |
testcase_16 | AC | 58 ms
50,020 KB |
testcase_17 | AC | 57 ms
50,056 KB |
testcase_18 | AC | 57 ms
49,948 KB |
testcase_19 | AC | 58 ms
50,332 KB |
ソースコード
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] lines = br.readLine().split(" "); String aname = lines[0]; String apoint = lines[1]; lines = br.readLine().split(" "); String bname = lines[0]; String bpoint = lines[1]; if(apoint.equals(bpoint)){ System.out.println(-1); }else{ System.out.println(compare(apoint,bpoint)<0?bname:aname); } } public static int compare(String a,String b){ if(a.length() != b.length()){ return a.length() - b.length(); }else{ return a.compareTo(b); } } }