結果

問題 No.224 文字列変更(easy)
ユーザー ぴろず
提出日時 2015-06-12 22:21:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 364 bytes
コンパイル時間 2,162 ms
コンパイル使用メモリ 74,916 KB
実行使用メモリ 41,512 KB
最終ジャッジ日時 2024-07-18 01:57:21
合計ジャッジ時間 6,260 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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