結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー tenten
提出日時 2020-11-11 08:42:44
言語 Java
(openjdk 26.0.2.1)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 71 ms / 5,000 ms
+ 243µs
コード長 433 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,275 ms
コンパイル使用メモリ 83,732 KB
実行使用メモリ 46,032 KB
最終ジャッジ日時 2026-08-23 11:30:15
合計ジャッジ時間 4,347 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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