結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-14 20:28:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 1,000 ms
コード長 415 bytes
コンパイル時間 3,858 ms
コンパイル使用メモリ 76,452 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-04-29 08:07:31
合計ジャッジ時間 8,302 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
40,288 KB
testcase_01 AC 122 ms
40,944 KB
testcase_02 AC 123 ms
41,456 KB
testcase_03 AC 123 ms
40,924 KB
testcase_04 AC 129 ms
41,168 KB
testcase_05 AC 127 ms
41,056 KB
testcase_06 AC 126 ms
40,872 KB
testcase_07 AC 126 ms
40,976 KB
testcase_08 AC 128 ms
40,864 KB
testcase_09 AC 124 ms
40,980 KB
testcase_10 AC 123 ms
40,860 KB
testcase_11 AC 109 ms
40,080 KB
testcase_12 AC 126 ms
41,148 KB
testcase_13 AC 123 ms
40,684 KB
testcase_14 AC 113 ms
39,816 KB
testcase_15 AC 125 ms
41,232 KB
testcase_16 AC 125 ms
41,168 KB
testcase_17 AC 117 ms
40,156 KB
testcase_18 AC 125 ms
41,096 KB
testcase_19 AC 125 ms
40,752 KB
testcase_20 AC 111 ms
39,960 KB
testcase_21 AC 125 ms
41,148 KB
testcase_22 AC 124 ms
40,972 KB
testcase_23 AC 123 ms
41,068 KB
testcase_24 AC 125 ms
41,116 KB
testcase_25 AC 110 ms
40,236 KB
testcase_26 AC 132 ms
41,188 KB
testcase_27 AC 132 ms
40,868 KB
testcase_28 AC 130 ms
41,012 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