結果
問題 |
No.547 未知の言語
|
ユーザー |
|
提出日時 | 2017-09-19 18:55:23 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 162 ms / 2,000 ms |
コード長 | 756 bytes |
コンパイル時間 | 4,040 ms |
コンパイル使用メモリ | 79,076 KB |
実行使用メモリ | 54,392 KB |
最終ジャッジ日時 | 2024-06-26 02:44:21 |
合計ジャッジ時間 | 9,415 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
package yukicoder; import java.util.Scanner; public class No547 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String tmp; String[] s; int n = sc.nextInt(); s = new String[n]; for(int i = 0; i < n; i++) { s[i] = sc.next(); } int resultNum = 0; String resultS = null, resultT = null; for(int i = 0; i < n; i++) { tmp = sc.next(); if( !s[i].equals(tmp) ) { resultNum = i + 1; resultS = s[i]; resultT = tmp; } } System.out.println(resultNum); System.out.println(resultS); System.out.println(resultT); } }