結果

問題 No.224 文字列変更(easy)
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-06-23 16:41:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 866 bytes
コンパイル時間 3,410 ms
コンパイル使用メモリ 73,664 KB
実行使用メモリ 55,964 KB
最終ジャッジ日時 2023-09-25 02:03:12
合計ジャッジ時間 7,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,916 KB
testcase_01 AC 131 ms
55,808 KB
testcase_02 AC 126 ms
55,704 KB
testcase_03 AC 126 ms
55,520 KB
testcase_04 AC 126 ms
55,460 KB
testcase_05 AC 124 ms
55,688 KB
testcase_06 AC 127 ms
55,908 KB
testcase_07 AC 128 ms
55,492 KB
testcase_08 AC 127 ms
55,328 KB
testcase_09 AC 125 ms
55,600 KB
testcase_10 AC 126 ms
55,648 KB
testcase_11 AC 129 ms
55,880 KB
testcase_12 AC 126 ms
55,348 KB
testcase_13 AC 127 ms
55,964 KB
testcase_14 AC 128 ms
55,328 KB
testcase_15 AC 126 ms
55,408 KB
testcase_16 AC 128 ms
55,764 KB
testcase_17 AC 131 ms
55,888 KB
testcase_18 AC 140 ms
55,464 KB
testcase_19 AC 131 ms
55,180 KB
testcase_20 AC 130 ms
55,912 KB
testcase_21 AC 136 ms
55,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No0224 {
    
    static final Scanner in = new Scanner(System.in);
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() {
        int n = in.nextInt();
        String s = in.next();
        String t = in.next();
        int cnt = 0;
        for (int i=0; i<n; i++) {
        	if (s.charAt(i) != t.charAt(i)) cnt++;
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        in.close();
        out.close();
    }

    static void trace(Object... o) { System.out.println(Arrays.deepToString(o));}
}
0