結果

問題 No.224 文字列変更(easy)
ユーザー kenji_shioya
提出日時 2016-06-09 19:00:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 3,330 ms
コンパイル使用メモリ 77,488 KB
実行使用メモリ 54,316 KB
最終ジャッジ日時 2024-07-18 02:14:47
合計ジャッジ時間 7,198 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise72{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();

    String s = sc.next();
    String t = sc.next();

    char[] sArray = s.toCharArray();
    char[] tArray = t.toCharArray();

    int count = 0;

    for(int i = 0; i < n; i++){
      if(sArray[i] != tArray[i]){
        count++;
      }
    }
    System.out.println(count);
  }
}
0