結果

問題 No.987 N×Mマス計算(基本)
ユーザー ichibanshiboriichibanshibori
提出日時 2020-06-19 23:34:08
言語 F#
(F# 4.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 654 bytes
コンパイル時間 5,316 ms
コンパイル使用メモリ 157,488 KB
実行使用メモリ 25,008 KB
最終ジャッジ日時 2023-09-16 15:49:36
合計ジャッジ時間 8,348 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
20,908 KB
testcase_01 AC 89 ms
22,912 KB
testcase_02 AC 92 ms
22,956 KB
testcase_03 AC 92 ms
22,940 KB
testcase_04 AC 91 ms
22,876 KB
testcase_05 AC 90 ms
22,992 KB
testcase_06 AC 90 ms
22,896 KB
testcase_07 AC 91 ms
22,912 KB
testcase_08 AC 91 ms
24,996 KB
testcase_09 AC 90 ms
22,844 KB
testcase_10 AC 90 ms
24,952 KB
testcase_11 AC 91 ms
24,896 KB
testcase_12 AC 92 ms
23,024 KB
testcase_13 AC 90 ms
22,924 KB
testcase_14 AC 91 ms
22,964 KB
testcase_15 AC 91 ms
23,036 KB
testcase_16 AC 92 ms
25,008 KB
testcase_17 AC 91 ms
22,984 KB
testcase_18 AC 92 ms
24,968 KB
testcase_19 AC 92 ms
22,844 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let () =
    let n, m = stdin.ReadLine().Split() |> fun arr -> (int arr.[0], int arr.[1])
    let opBarr = stdin.ReadLine().Split()
    let op = match opBarr.[0] with
             | "+" -> ( + )
             | "*" -> ( * )
             | _ -> failwith "illegal op"
    let bArr = opBarr.[1..] |> Array.map int64
    let aArr =
        seq {
            for i in 1..n -> stdin.ReadLine() |> int64
        }
        |> Seq.toArray
    seq {
        for i in 1..n ->
                seq {
                    for j in 1..m -> op aArr.[i - 1] bArr.[j - 1] |> string
                }
                |> String.concat " "

    }
    |> Seq.iter (printfn "%s")
0