結果

問題 No.224 文字列変更(easy)
ユーザー ぴろずぴろず
提出日時 2015-06-12 22:21:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 364 bytes
コンパイル時間 2,889 ms
コンパイル使用メモリ 71,552 KB
実行使用メモリ 51,792 KB
最終ジャッジ日時 2023-09-25 01:54:44
合計ジャッジ時間 7,339 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
39,072 KB
testcase_01 AC 130 ms
39,588 KB
testcase_02 AC 123 ms
39,132 KB
testcase_03 AC 126 ms
39,572 KB
testcase_04 AC 126 ms
51,792 KB
testcase_05 AC 122 ms
39,108 KB
testcase_06 AC 124 ms
39,548 KB
testcase_07 AC 124 ms
39,316 KB
testcase_08 AC 125 ms
39,284 KB
testcase_09 AC 124 ms
38,924 KB
testcase_10 AC 125 ms
39,376 KB
testcase_11 AC 127 ms
39,084 KB
testcase_12 AC 126 ms
39,604 KB
testcase_13 AC 124 ms
39,436 KB
testcase_14 AC 124 ms
39,732 KB
testcase_15 AC 124 ms
39,676 KB
testcase_16 AC 124 ms
39,012 KB
testcase_17 AC 129 ms
39,212 KB
testcase_18 AC 128 ms
39,468 KB
testcase_19 AC 130 ms
39,656 KB
testcase_20 AC 130 ms
39,452 KB
testcase_21 AC 130 ms
39,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no224;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		char[] s = sc.next().toCharArray();
		char[] t = sc.next().toCharArray();
		int dist = 0;
		for(int i=0;i<n;i++) {
			if (s[i] != t[i]) {
				dist++;
			}
		}
		System.out.println(dist);
	}

}
0