結果

問題 No.224 文字列変更(easy)
ユーザー くわいくわい
提出日時 2015-11-02 18:09:08
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 960 ms / 5,000 ms
コード長 328 bytes
コンパイル時間 11,937 ms
コンパイル使用メモリ 244,520 KB
実行使用メモリ 63,112 KB
最終ジャッジ日時 2023-09-09 17:38:59
合計ジャッジ時間 34,348 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 928 ms
62,776 KB
testcase_01 AC 939 ms
63,060 KB
testcase_02 AC 927 ms
63,040 KB
testcase_03 AC 934 ms
62,988 KB
testcase_04 AC 931 ms
62,992 KB
testcase_05 AC 934 ms
62,800 KB
testcase_06 AC 934 ms
62,964 KB
testcase_07 AC 931 ms
62,748 KB
testcase_08 AC 934 ms
62,928 KB
testcase_09 AC 935 ms
63,112 KB
testcase_10 AC 930 ms
62,960 KB
testcase_11 AC 930 ms
62,988 KB
testcase_12 AC 931 ms
62,836 KB
testcase_13 AC 932 ms
62,828 KB
testcase_14 AC 937 ms
62,820 KB
testcase_15 AC 936 ms
63,016 KB
testcase_16 AC 935 ms
62,852 KB
testcase_17 AC 938 ms
63,044 KB
testcase_18 AC 955 ms
62,992 KB
testcase_19 AC 942 ms
62,984 KB
testcase_20 AC 945 ms
62,864 KB
testcase_21 AC 960 ms
62,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Problem224 {

  def proc(S: String, T: String): Int = {
    S.zip(T).count(p => p._1 != p._2)
  }

  def main(args: Array[String]) = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val S = sc.next()
    val T = sc.next()

    val result = proc(S, T)
    println(result)
  }
}
0