結果

問題 No.224 文字列変更(easy)
ユーザー guriceringuricerin
提出日時 2020-01-08 12:26:54
言語 F#
(.NET 7)
結果
AC  
実行時間 69 ms / 5,000 ms
コード長 927 bytes
コンパイル時間 4,384 ms
コンパイル使用メモリ 165,972 KB
実行使用メモリ 24,600 KB
最終ジャッジ日時 2023-09-25 02:52:54
合計ジャッジ時間 6,392 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
20,584 KB
testcase_01 AC 65 ms
22,484 KB
testcase_02 AC 65 ms
22,512 KB
testcase_03 AC 67 ms
22,516 KB
testcase_04 AC 64 ms
24,548 KB
testcase_05 AC 65 ms
22,444 KB
testcase_06 AC 64 ms
20,584 KB
testcase_07 AC 65 ms
22,548 KB
testcase_08 AC 65 ms
20,468 KB
testcase_09 AC 65 ms
22,484 KB
testcase_10 AC 65 ms
22,448 KB
testcase_11 AC 65 ms
22,420 KB
testcase_12 AC 66 ms
20,456 KB
testcase_13 AC 65 ms
22,552 KB
testcase_14 AC 66 ms
24,556 KB
testcase_15 AC 67 ms
22,524 KB
testcase_16 AC 65 ms
22,452 KB
testcase_17 AC 66 ms
22,584 KB
testcase_18 AC 65 ms
22,420 KB
testcase_19 AC 66 ms
20,664 KB
testcase_20 AC 69 ms
24,600 KB
testcase_21 AC 65 ms
22,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System
open System.Collections.Generic

[<AutoOpen>]
module Cin =
    let read f = stdin.ReadLine() |> f
    let reada f = stdin.ReadLine().Split() |> Array.map f
    let readChars() = read string |> Seq.toArray
    let readInts() = readChars() |> Array.map (fun x -> Convert.ToInt32(x.ToString()))

[<AutoOpen>]
module Cout =
    let writer = new IO.StreamWriter(new IO.BufferedStream(Console.OpenStandardOutput()))
    let print (s: string) = writer.Write s
    let println (s: string) = writer.WriteLine s
    let inline puts (s: ^a) = string s |> println

let solve() =
    let n = read int
    let a = readChars()
    let b = readChars()
    seq {
        for i in 0 .. n - 1 do
            if a.[i] <> b.[i] then yield ()
    }
    |> Seq.length
    |> puts
    ()

[<EntryPoint>]
let main _ =
    try
        solve()
    with e -> printfn "%s" (e.ToString())
    writer.Close()
    0 // return an integer exit code
0