結果

問題 No.547 未知の言語
ユーザー samplelpmassamplelpmas
提出日時 2017-07-30 18:48:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 666 bytes
コンパイル時間 4,919 ms
コンパイル使用メモリ 71,700 KB
実行使用メモリ 57,640 KB
最終ジャッジ日時 2023-09-08 09:20:34
合計ジャッジ時間 7,490 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,864 KB
testcase_01 AC 120 ms
55,696 KB
testcase_02 AC 122 ms
55,860 KB
testcase_03 AC 122 ms
55,992 KB
testcase_04 AC 124 ms
56,160 KB
testcase_05 AC 126 ms
55,996 KB
testcase_06 AC 122 ms
55,652 KB
testcase_07 AC 126 ms
56,016 KB
testcase_08 AC 123 ms
55,676 KB
testcase_09 AC 127 ms
57,640 KB
testcase_10 AC 124 ms
55,716 KB
testcase_11 AC 125 ms
55,668 KB
testcase_12 AC 123 ms
55,676 KB
testcase_13 AC 124 ms
55,712 KB
testcase_14 AC 125 ms
55,552 KB
testcase_15 AC 124 ms
55,716 KB
testcase_16 AC 126 ms
55,588 KB
testcase_17 AC 126 ms
55,548 KB
testcase_18 AC 130 ms
56,044 KB
testcase_19 AC 124 ms
55,732 KB
testcase_20 AC 122 ms
55,352 KB
testcase_21 AC 130 ms
55,588 KB
testcase_22 AC 128 ms
55,360 KB
testcase_23 AC 124 ms
55,792 KB
testcase_24 AC 126 ms
56,044 KB
testcase_25 AC 125 ms
55,584 KB
testcase_26 AC 126 ms
55,676 KB
testcase_27 AC 126 ms
55,820 KB
testcase_28 AC 123 ms
55,748 KB
testcase_29 AC 127 ms
55,828 KB
testcase_30 AC 123 ms
55,884 KB
testcase_31 AC 123 ms
55,672 KB
testcase_32 AC 125 ms
55,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        String[] S = new String[N];
        String[] T = new String[N];

        for (int i = 0; i < N; i++) {
            S[i] = sc.next();
        }

        for (int i = 0; i < N; i++) {
            T[i] = sc.next();
        }

        for (int i = 0; i < N; i++) {

            if (!S[i].equals(T[i])) {

                System.out.println(i + 1);
                System.out.println(S[i]);
                System.out.println(T[i]);
                break;

            }

        }

    }

}
0