結果

問題 No.224 文字列変更(easy)
ユーザー tenten
提出日時 2020-11-11 08:42:44
言語 Java
(openjdk 23)
結果
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
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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