結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-14 20:28:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 415 bytes
コンパイル時間 4,625 ms
コンパイル使用メモリ 73,892 KB
実行使用メモリ 57,580 KB
最終ジャッジ日時 2023-08-11 16:13:59
合計ジャッジ時間 9,787 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,632 KB
testcase_01 AC 130 ms
55,564 KB
testcase_02 AC 134 ms
55,544 KB
testcase_03 AC 128 ms
55,588 KB
testcase_04 AC 129 ms
55,832 KB
testcase_05 AC 128 ms
55,508 KB
testcase_06 AC 130 ms
55,452 KB
testcase_07 AC 128 ms
55,620 KB
testcase_08 AC 130 ms
57,580 KB
testcase_09 AC 129 ms
55,472 KB
testcase_10 AC 129 ms
55,584 KB
testcase_11 AC 130 ms
55,340 KB
testcase_12 AC 130 ms
55,576 KB
testcase_13 AC 129 ms
55,896 KB
testcase_14 AC 128 ms
55,708 KB
testcase_15 AC 127 ms
55,620 KB
testcase_16 AC 127 ms
55,444 KB
testcase_17 AC 125 ms
55,672 KB
testcase_18 AC 127 ms
55,588 KB
testcase_19 AC 129 ms
55,572 KB
testcase_20 AC 127 ms
55,712 KB
testcase_21 AC 135 ms
55,808 KB
testcase_22 AC 128 ms
55,712 KB
testcase_23 AC 129 ms
55,524 KB
testcase_24 AC 129 ms
55,724 KB
testcase_25 AC 129 ms
55,448 KB
testcase_26 AC 128 ms
55,332 KB
testcase_27 AC 132 ms
55,524 KB
testcase_28 AC 129 ms
55,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise81{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    String weekOne = sc.next();
    String weekTwo = sc.next();

    String twoWeeks = weekOne + weekTwo;
    String[] weekArray = twoWeeks.split("x");

    Arrays.sort(weekArray);

    System.out.println((weekArray.length == 0) ? 0 : weekArray[weekArray.length - 1].length());
  }
}
0