結果
問題 | No.224 文字列変更(easy) |
ユーザー |
![]() |
提出日時 | 2017-01-10 23:15:37 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 5,000 ms |
コード長 | 644 bytes |
コンパイル時間 | 1,821 ms |
コンパイル使用メモリ | 75,380 KB |
実行使用メモリ | 41,456 KB |
最終ジャッジ日時 | 2024-07-18 02:20:09 |
合計ジャッジ時間 | 5,134 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); String s = in.next(); String t = in.next(); int count = 0; char[] s_to_c = s.toCharArray(); char[] t_to_c = t.toCharArray(); for(int i=0; i<n; i++) { if(s_to_c[i] != t_to_c[i]) { count++; } else { // nothing } } System.out.println(count); in.close(); } }