結果

問題 No.224 文字列変更(easy)
ユーザー yagi2
提出日時 2017-04-21 11:16:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 457 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 75,140 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-07-18 02:22:03
合計ジャッジ時間 5,116 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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