結果

問題 No.224 文字列変更(easy)
ユーザー yun_appyun_app
提出日時 2016-05-12 00:42:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 2,157 ms
コンパイル使用メモリ 72,820 KB
実行使用メモリ 49,624 KB
最終ジャッジ日時 2023-09-25 02:14:12
合計ジャッジ時間 4,161 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,088 KB
testcase_01 AC 45 ms
49,624 KB
testcase_02 AC 43 ms
49,084 KB
testcase_03 AC 43 ms
49,616 KB
testcase_04 AC 43 ms
49,084 KB
testcase_05 AC 43 ms
49,176 KB
testcase_06 AC 42 ms
49,240 KB
testcase_07 AC 43 ms
48,996 KB
testcase_08 AC 43 ms
49,448 KB
testcase_09 AC 43 ms
49,176 KB
testcase_10 AC 43 ms
49,112 KB
testcase_11 AC 44 ms
49,216 KB
testcase_12 AC 44 ms
49,300 KB
testcase_13 AC 43 ms
49,248 KB
testcase_14 AC 44 ms
49,188 KB
testcase_15 AC 44 ms
49,420 KB
testcase_16 AC 44 ms
49,268 KB
testcase_17 AC 45 ms
49,304 KB
testcase_18 AC 45 ms
49,192 KB
testcase_19 AC 45 ms
49,248 KB
testcase_20 AC 45 ms
49,112 KB
testcase_21 AC 45 ms
49,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

class Ideone{
    public static void main(String[] args) throws Exception{
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String s = br.readLine();
        String t = br.readLine();
        
        int ans = 0;
        for(int i=0;i<n;i++){
            if(s.charAt(i) != t.charAt(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }
}
0