結果

問題 No.224 文字列変更(easy)
ユーザー tsunabit
提出日時 2018-05-20 22:24:10
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 3,936 ms
コンパイル使用メモリ 78,184 KB
実行使用メモリ 54,464 KB
最終ジャッジ日時 2024-07-18 02:35:27
合計ジャッジ時間 7,724 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No224 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[] s = sc.nextLine().split("", 0);
        String[] t = sc.nextLine().split("", 0);
        int count = 0;
        for(int i = 0; i < n; i++) {
            if(!s[i].equals(t[i])) {
                count++;
            }
        }
        System.out.println(count);
    }
}
0