結果

問題 No.224 文字列変更(easy)
ユーザー r.suzukir.suzuki
提出日時 2015-12-13 16:20:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 386 bytes
コンパイル時間 3,302 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 55,976 KB
最終ジャッジ日時 2023-09-25 02:10:16
合計ジャッジ時間 7,285 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,976 KB
testcase_01 AC 133 ms
55,880 KB
testcase_02 AC 128 ms
55,624 KB
testcase_03 AC 127 ms
55,380 KB
testcase_04 AC 128 ms
55,848 KB
testcase_05 AC 128 ms
55,812 KB
testcase_06 AC 125 ms
55,624 KB
testcase_07 AC 128 ms
55,612 KB
testcase_08 AC 126 ms
55,936 KB
testcase_09 AC 128 ms
55,676 KB
testcase_10 AC 127 ms
55,892 KB
testcase_11 AC 128 ms
55,492 KB
testcase_12 AC 127 ms
55,736 KB
testcase_13 AC 126 ms
55,832 KB
testcase_14 AC 128 ms
55,776 KB
testcase_15 AC 128 ms
55,456 KB
testcase_16 AC 127 ms
55,584 KB
testcase_17 AC 133 ms
55,464 KB
testcase_18 AC 129 ms
55,880 KB
testcase_19 AC 131 ms
55,716 KB
testcase_20 AC 132 ms
55,472 KB
testcase_21 AC 132 ms
55,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

public class No_224 {

	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int n = sc.nextInt();
		String S = sc.next();
		String T = sc.next();
		char Sc;
		char Tc;
		int count = 0;

		for (int i = 0; i < n; i++) {
			Sc = S.charAt(i);
			Tc = T.charAt(i);
			if (Sc != Tc) {
				count++;
			}
		}
		System.out.println(count);

	}

}
0