結果
問題 | No.547 未知の言語 |
ユーザー |
|
提出日時 | 2018-01-26 22:05:51 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 118 ms / 2,000 ms |
コード長 | 664 bytes |
コンパイル時間 | 4,203 ms |
コンパイル使用メモリ | 76,724 KB |
実行使用メモリ | 53,500 KB |
最終ジャッジ日時 | 2024-06-26 02:58:37 |
合計ジャッジ時間 | 8,231 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
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 = i; break; } } System.out.println((cnt + 1) + "\n" + str1[cnt] + "\n" + str2[cnt]); } catch (IOException e) { e.printStackTrace(); } } }