結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー koukonko
提出日時 2015-12-17 14:25:28
言語 Java
(openjdk 26.0.2.1)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 29 ms / 5,000 ms
+ 744µs
コード長 522 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,462 ms
コンパイル使用メモリ 82,880 KB
実行使用メモリ 40,524 KB
最終ジャッジ日時 2026-08-16 06:17:12
合計ジャッジ時間 3,841 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));

		try {
			int n = Integer.parseInt(read.readLine());
			String s = read.readLine();
			String t = read.readLine();

			int ans = 0;
			for (int i = 0; i < n; ++i) {
				if (s.charAt(i) != t.charAt(i)) {
					++ans;
				}
			}

			System.out.println(ans);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0