結果

問題 No.224 文字列変更(easy)
ユーザー jimanojimano
提出日時 2018-01-13 21:47:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 609 bytes
コンパイル時間 3,324 ms
コンパイル使用メモリ 72,128 KB
実行使用メモリ 49,636 KB
最終ジャッジ日時 2023-09-25 02:32:52
合計ジャッジ時間 5,053 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,216 KB
testcase_01 AC 44 ms
49,132 KB
testcase_02 AC 43 ms
49,428 KB
testcase_03 AC 43 ms
49,028 KB
testcase_04 AC 43 ms
49,028 KB
testcase_05 AC 43 ms
49,028 KB
testcase_06 AC 44 ms
49,248 KB
testcase_07 AC 43 ms
49,172 KB
testcase_08 AC 44 ms
49,088 KB
testcase_09 AC 43 ms
49,544 KB
testcase_10 AC 44 ms
49,020 KB
testcase_11 AC 44 ms
49,460 KB
testcase_12 AC 43 ms
49,192 KB
testcase_13 AC 42 ms
49,112 KB
testcase_14 AC 42 ms
47,220 KB
testcase_15 AC 44 ms
49,096 KB
testcase_16 AC 43 ms
49,020 KB
testcase_17 AC 43 ms
49,096 KB
testcase_18 AC 43 ms
49,636 KB
testcase_19 AC 42 ms
49,288 KB
testcase_20 AC 43 ms
49,564 KB
testcase_21 AC 43 ms
49,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

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

/**
 * 文字列変更(easy)
 */
public class No0224 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			char[] s = br.readLine().toCharArray();
			char[] t = br.readLine().toCharArray();
			int cnt = 0;

			for (int i = 0; i < n; i++) {
				if (s[i] != t[i])
					cnt++;
			}
			System.out.println(cnt);

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0