結果

問題 No.547 未知の言語
ユーザー fjafjafjafjafjafja
提出日時 2017-07-30 11:07:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 4,361 ms
コンパイル使用メモリ 74,040 KB
実行使用メモリ 58,748 KB
最終ジャッジ日時 2023-09-08 09:18:33
合計ジャッジ時間 11,276 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
57,036 KB
testcase_01 AC 165 ms
57,144 KB
testcase_02 AC 164 ms
56,856 KB
testcase_03 AC 164 ms
56,952 KB
testcase_04 AC 165 ms
57,204 KB
testcase_05 AC 165 ms
57,004 KB
testcase_06 AC 165 ms
57,020 KB
testcase_07 AC 163 ms
57,208 KB
testcase_08 AC 165 ms
56,852 KB
testcase_09 AC 168 ms
58,748 KB
testcase_10 AC 166 ms
56,736 KB
testcase_11 AC 170 ms
57,208 KB
testcase_12 AC 162 ms
57,204 KB
testcase_13 AC 164 ms
56,832 KB
testcase_14 AC 167 ms
57,172 KB
testcase_15 AC 170 ms
56,676 KB
testcase_16 AC 167 ms
57,052 KB
testcase_17 AC 181 ms
54,620 KB
testcase_18 AC 168 ms
57,116 KB
testcase_19 AC 166 ms
56,984 KB
testcase_20 AC 161 ms
56,828 KB
testcase_21 AC 168 ms
57,040 KB
testcase_22 AC 188 ms
57,336 KB
testcase_23 AC 169 ms
57,020 KB
testcase_24 AC 173 ms
56,880 KB
testcase_25 AC 172 ms
56,728 KB
testcase_26 AC 169 ms
57,188 KB
testcase_27 AC 171 ms
56,916 KB
testcase_28 AC 166 ms
57,036 KB
testcase_29 AC 167 ms
56,900 KB
testcase_30 AC 170 ms
56,824 KB
testcase_31 AC 169 ms
56,616 KB
testcase_32 AC 166 ms
57,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N547 {

	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();
		}
		int buf=-1;
		for(int i=0;i<N;i++)
		{
			T[i]=sc.next();
			if(!(S[i].equals(T[i])))
			{
				buf=i;
				i+=N;
			}
		}
		System.out.println(buf+1+"\n"+S[buf]+"\n"+T[buf]);
	}
}
0