結果

問題 No.547 未知の言語
ユーザー jimanojimano
提出日時 2018-01-26 22:08:28
言語 Java19
(openjdk 21)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 674 bytes
コンパイル時間 3,410 ms
コンパイル使用メモリ 72,716 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2023-09-08 09:54:56
合計ジャッジ時間 7,340 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
53,928 KB
testcase_01 AC 92 ms
53,960 KB
testcase_02 AC 87 ms
53,508 KB
testcase_03 AC 96 ms
53,988 KB
testcase_04 AC 94 ms
52,144 KB
testcase_05 AC 96 ms
53,700 KB
testcase_06 AC 93 ms
53,952 KB
testcase_07 AC 97 ms
53,924 KB
testcase_08 AC 93 ms
53,936 KB
testcase_09 AC 90 ms
53,836 KB
testcase_10 AC 85 ms
53,956 KB
testcase_11 AC 85 ms
53,920 KB
testcase_12 AC 86 ms
53,728 KB
testcase_13 AC 85 ms
53,840 KB
testcase_14 AC 85 ms
54,144 KB
testcase_15 AC 86 ms
53,952 KB
testcase_16 AC 85 ms
53,692 KB
testcase_17 AC 84 ms
53,980 KB
testcase_18 AC 86 ms
53,988 KB
testcase_19 AC 88 ms
53,176 KB
testcase_20 AC 87 ms
54,024 KB
testcase_21 AC 90 ms
53,756 KB
testcase_22 AC 88 ms
52,784 KB
testcase_23 AC 86 ms
53,968 KB
testcase_24 AC 85 ms
53,708 KB
testcase_25 AC 86 ms
54,032 KB
testcase_26 AC 84 ms
52,784 KB
testcase_27 AC 85 ms
53,904 KB
testcase_28 AC 84 ms
53,580 KB
testcase_29 AC 83 ms
53,776 KB
testcase_30 AC 84 ms
53,912 KB
testcase_31 AC 85 ms
53,872 KB
testcase_32 AC 84 ms
53,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0547 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int length = Integer.parseInt(br.readLine());
			int cnt = 0;
			String[] str1 = br.readLine().split(" ");
			String[] str2 = br.readLine().split(" ");

			for (int i = 0; i < length; i++) {
				if (str1[i].equals(str2[i])) {
					cnt++;
				} else {
					break;
				}
			}
			System.out.println((cnt + 1) + "\n" + str1[cnt] + "\n" + str2[cnt]);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0