結果

問題 No.547 未知の言語
ユーザー Grenache
提出日時 2017-07-28 22:22:36
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 791 bytes
コンパイル時間 4,070 ms
コンパイル使用メモリ 75,536 KB
実行使用メモリ 41,792 KB
最終ジャッジ日時 2024-06-26 02:07:29
合計ジャッジ時間 8,390 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder547 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		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();

			if (!s[i].equals(t[i])) {
				pr.println(i + 1);
				pr.println(s[i]);
				pr.println(t[i]);

				return;
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0