結果

問題 No.224 文字列変更(easy)
ユーザー tentententen
提出日時 2020-11-11 08:42:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 433 bytes
コンパイル時間 2,169 ms
コンパイル使用メモリ 74,068 KB
実行使用メモリ 41,352 KB
最終ジャッジ日時 2024-07-22 18:18:55
合計ジャッジ時間 6,176 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,052 KB
testcase_01 AC 136 ms
41,352 KB
testcase_02 AC 130 ms
40,800 KB
testcase_03 AC 130 ms
40,828 KB
testcase_04 AC 132 ms
40,936 KB
testcase_05 AC 130 ms
40,872 KB
testcase_06 AC 128 ms
40,932 KB
testcase_07 AC 132 ms
41,036 KB
testcase_08 AC 135 ms
41,080 KB
testcase_09 AC 133 ms
41,192 KB
testcase_10 AC 129 ms
40,900 KB
testcase_11 AC 133 ms
41,044 KB
testcase_12 AC 140 ms
41,080 KB
testcase_13 AC 133 ms
40,868 KB
testcase_14 AC 130 ms
41,124 KB
testcase_15 AC 131 ms
41,004 KB
testcase_16 AC 133 ms
41,304 KB
testcase_17 AC 139 ms
41,288 KB
testcase_18 AC 142 ms
41,208 KB
testcase_19 AC 142 ms
40,792 KB
testcase_20 AC 134 ms
41,352 KB
testcase_21 AC 137 ms
40,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();
        int count = 0;
        for (int i = 0; i < n; i++) {
            if (s[i] != t[i]) {
                count++;
            }
        }
        System.out.println(count);
    }
}
0