結果

問題 No.224 文字列変更(easy)
ユーザー tsunabittsunabit
提出日時 2018-05-20 22:24:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 4,957 ms
コンパイル使用メモリ 76,852 KB
実行使用メモリ 56,532 KB
最終ジャッジ日時 2023-09-25 02:40:00
合計ジャッジ時間 8,413 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,248 KB
testcase_01 AC 128 ms
55,652 KB
testcase_02 AC 116 ms
55,952 KB
testcase_03 AC 116 ms
56,000 KB
testcase_04 AC 118 ms
56,224 KB
testcase_05 AC 117 ms
56,208 KB
testcase_06 AC 118 ms
55,636 KB
testcase_07 AC 119 ms
56,328 KB
testcase_08 AC 117 ms
56,532 KB
testcase_09 AC 117 ms
56,048 KB
testcase_10 AC 116 ms
55,444 KB
testcase_11 AC 119 ms
55,652 KB
testcase_12 AC 118 ms
56,232 KB
testcase_13 AC 116 ms
56,092 KB
testcase_14 AC 118 ms
55,656 KB
testcase_15 AC 116 ms
55,884 KB
testcase_16 AC 120 ms
55,880 KB
testcase_17 AC 126 ms
56,208 KB
testcase_18 AC 127 ms
54,048 KB
testcase_19 AC 129 ms
56,108 KB
testcase_20 AC 128 ms
56,324 KB
testcase_21 AC 129 ms
55,688 KB
権限があれば一括ダウンロードができます

ソースコード

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