結果
問題 | No.201 yukicoderじゃんけん |
ユーザー | t8m8⛄️ |
提出日時 | 2015-05-03 23:25:15 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 159 ms / 5,000 ms |
コード長 | 1,147 bytes |
コンパイル時間 | 3,592 ms |
コンパイル使用メモリ | 78,844 KB |
実行使用メモリ | 53,892 KB |
最終ジャッジ日時 | 2024-07-05 16:28:50 |
合計ジャッジ時間 | 6,981 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No0201 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { String a = in.next(); String x = in.next(); in.next(); String b = in.next(); String y = in.next(); in.next(); if (x.length() != y.length()) { out.println(x.length() > y.length() ? a : b); return; } for (int i=0; i<x.length(); i++) { if (x.charAt(i) != y.charAt(i)) { out.println(x.charAt(i) > y.charAt(i) ? a : b); return; } } out.println("-1"); } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); in.close(); out.close(); } static void trace(Object... o) { System.out.println(deepToString(o));} }