結果

問題 No.224 文字列変更(easy)
ユーザー yagi2yagi2
提出日時 2017-04-21 11:16:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 154 ms / 5,000 ms
コード長 457 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 71,956 KB
実行使用メモリ 56,536 KB
最終ジャッジ日時 2023-09-25 02:23:33
合計ジャッジ時間 5,786 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,844 KB
testcase_01 AC 151 ms
55,884 KB
testcase_02 AC 118 ms
55,752 KB
testcase_03 AC 118 ms
55,968 KB
testcase_04 AC 119 ms
56,048 KB
testcase_05 AC 120 ms
55,920 KB
testcase_06 AC 121 ms
55,412 KB
testcase_07 AC 120 ms
55,476 KB
testcase_08 AC 119 ms
55,452 KB
testcase_09 AC 120 ms
55,652 KB
testcase_10 AC 120 ms
55,884 KB
testcase_11 AC 122 ms
55,956 KB
testcase_12 AC 120 ms
56,536 KB
testcase_13 AC 119 ms
55,680 KB
testcase_14 AC 120 ms
55,824 KB
testcase_15 AC 122 ms
56,048 KB
testcase_16 AC 123 ms
55,328 KB
testcase_17 AC 153 ms
55,716 KB
testcase_18 AC 154 ms
56,152 KB
testcase_19 AC 154 ms
55,912 KB
testcase_20 AC 153 ms
56,240 KB
testcase_21 AC 142 ms
56,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Objects;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        String[] S = sc.next().split("");
        String[] T = sc.next().split("");

        int cnt = 0;
        for (int i = 0; i < N; i++) {
            if (!Objects.equals(S[i], T[i])) cnt++;
        }

        System.out.println(cnt);
    }
}
0