結果

問題 No.224 文字列変更(easy)
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-30 17:08:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 668 bytes
コンパイル時間 3,840 ms
コンパイル使用メモリ 72,672 KB
実行使用メモリ 49,636 KB
最終ジャッジ日時 2023-09-25 02:24:01
合計ジャッジ時間 3,893 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,276 KB
testcase_01 AC 43 ms
49,120 KB
testcase_02 AC 42 ms
49,296 KB
testcase_03 AC 41 ms
49,160 KB
testcase_04 AC 41 ms
49,156 KB
testcase_05 AC 42 ms
49,156 KB
testcase_06 AC 42 ms
47,444 KB
testcase_07 AC 41 ms
49,144 KB
testcase_08 AC 41 ms
49,296 KB
testcase_09 AC 42 ms
49,340 KB
testcase_10 AC 42 ms
47,336 KB
testcase_11 AC 43 ms
49,244 KB
testcase_12 AC 43 ms
49,156 KB
testcase_13 AC 43 ms
49,176 KB
testcase_14 AC 42 ms
49,432 KB
testcase_15 AC 43 ms
49,184 KB
testcase_16 AC 42 ms
49,168 KB
testcase_17 AC 43 ms
49,156 KB
testcase_18 AC 43 ms
49,168 KB
testcase_19 AC 43 ms
49,636 KB
testcase_20 AC 43 ms
47,072 KB
testcase_21 AC 43 ms
49,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

import static java.lang.System.in;


public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int n = Integer.parseInt(reader.readLine());
        String S = reader.readLine();
        String T = reader.readLine();
        int changeCounter = 0;
        for (int i = 0; i < n; i++) {
            if(S.charAt(i)!=T.charAt(i)) {
                changeCounter+=1;
            }
        }
        System.out.println(changeCounter);
    }
}
0