結果

問題 No.224 文字列変更(easy)
ユーザー mesh1nekomesh1neko
提出日時 2015-06-16 23:31:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 647 bytes
コンパイル時間 1,935 ms
コンパイル使用メモリ 71,292 KB
実行使用メモリ 51,884 KB
最終ジャッジ日時 2023-09-25 02:02:53
合計ジャッジ時間 3,911 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
48,860 KB
testcase_01 AC 49 ms
49,924 KB
testcase_02 AC 42 ms
49,136 KB
testcase_03 AC 43 ms
49,104 KB
testcase_04 AC 42 ms
49,300 KB
testcase_05 AC 43 ms
49,388 KB
testcase_06 AC 43 ms
48,916 KB
testcase_07 AC 43 ms
48,948 KB
testcase_08 AC 43 ms
49,088 KB
testcase_09 AC 44 ms
49,092 KB
testcase_10 AC 43 ms
49,624 KB
testcase_11 AC 43 ms
49,032 KB
testcase_12 AC 43 ms
49,212 KB
testcase_13 AC 43 ms
49,020 KB
testcase_14 AC 43 ms
49,212 KB
testcase_15 AC 43 ms
49,112 KB
testcase_16 AC 43 ms
48,868 KB
testcase_17 AC 48 ms
50,036 KB
testcase_18 AC 49 ms
50,144 KB
testcase_19 AC 48 ms
50,084 KB
testcase_20 AC 49 ms
49,928 KB
testcase_21 AC 49 ms
51,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String n = br.readLine();
        String S = br.readLine();
        String T = br.readLine();
                
        Integer convertCount = 0;
        
        if (!S.equals(T)) {
            for (int i = 0; i < Integer.parseInt(n); i++) {
                if (S.charAt(i) != T.charAt(i)) convertCount++;;
            }
        }
        System.out.println(convertCount);
    }
}
0