結果

問題 No.224 文字列変更(easy)
ユーザー koukonkokoukonko
提出日時 2015-12-17 14:25:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 522 bytes
コンパイル時間 2,184 ms
コンパイル使用メモリ 71,228 KB
実行使用メモリ 49,420 KB
最終ジャッジ日時 2023-09-25 02:09:51
合計ジャッジ時間 4,182 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,080 KB
testcase_01 AC 44 ms
49,076 KB
testcase_02 AC 42 ms
49,316 KB
testcase_03 AC 43 ms
48,968 KB
testcase_04 AC 43 ms
48,924 KB
testcase_05 AC 42 ms
49,100 KB
testcase_06 AC 42 ms
48,952 KB
testcase_07 AC 43 ms
48,956 KB
testcase_08 AC 42 ms
49,068 KB
testcase_09 AC 42 ms
49,196 KB
testcase_10 AC 44 ms
48,924 KB
testcase_11 AC 44 ms
48,940 KB
testcase_12 AC 42 ms
48,908 KB
testcase_13 AC 41 ms
49,108 KB
testcase_14 AC 41 ms
49,420 KB
testcase_15 AC 42 ms
49,060 KB
testcase_16 AC 42 ms
49,340 KB
testcase_17 AC 43 ms
49,176 KB
testcase_18 AC 43 ms
49,356 KB
testcase_19 AC 42 ms
49,152 KB
testcase_20 AC 43 ms
49,352 KB
testcase_21 AC 43 ms
49,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));

		try {
			int n = Integer.parseInt(read.readLine());
			String s = read.readLine();
			String t = read.readLine();

			int ans = 0;
			for (int i = 0; i < n; ++i) {
				if (s.charAt(i) != t.charAt(i)) {
					++ans;
				}
			}

			System.out.println(ans);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0