結果

問題 No.224 文字列変更(easy)
ユーザー bellbell
提出日時 2021-02-16 16:02:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 153 ms / 5,000 ms
コード長 441 bytes
コンパイル時間 2,102 ms
コンパイル使用メモリ 71,572 KB
実行使用メモリ 56,840 KB
最終ジャッジ日時 2023-10-11 04:13:13
合計ジャッジ時間 6,669 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,692 KB
testcase_01 AC 153 ms
56,840 KB
testcase_02 AC 122 ms
56,836 KB
testcase_03 AC 122 ms
56,284 KB
testcase_04 AC 122 ms
56,056 KB
testcase_05 AC 121 ms
56,036 KB
testcase_06 AC 122 ms
56,052 KB
testcase_07 AC 122 ms
56,224 KB
testcase_08 AC 122 ms
55,752 KB
testcase_09 AC 121 ms
56,360 KB
testcase_10 AC 119 ms
54,136 KB
testcase_11 AC 124 ms
56,356 KB
testcase_12 AC 121 ms
55,996 KB
testcase_13 AC 121 ms
55,828 KB
testcase_14 AC 121 ms
56,072 KB
testcase_15 AC 122 ms
55,840 KB
testcase_16 AC 121 ms
56,184 KB
testcase_17 AC 152 ms
56,408 KB
testcase_18 AC 153 ms
56,496 KB
testcase_19 AC 145 ms
56,448 KB
testcase_20 AC 153 ms
56,764 KB
testcase_21 AC 149 ms
56,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        String [] s=sc.next().split("");
        String [] t=sc.next().split("");
        int count=0;

        for(int i=0; i<n; i++){
            if(!(s[i].equals(t[i]))){
                count++;
            }
        }
        System.out.println(count);
        sc.close();
	}
}

0