結果

問題 No.988 N×Mマス計算(総和)
ユーザー natoriusannatoriusan
提出日時 2023-08-01 17:10:43
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 441 bytes
コンパイル時間 9,651 ms
コンパイル使用メモリ 198,208 KB
実行使用メモリ 62,364 KB
最終ジャッジ日時 2024-04-19 16:25:16
合計ジャッジ時間 13,892 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
35,164 KB
testcase_01 AC 296 ms
35,276 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 300 ms
35,540 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 297 ms
35,688 KB
testcase_08 AC 303 ms
35,292 KB
testcase_09 AC 304 ms
35,416 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 325 ms
45,824 KB
testcase_14 WA -
testcase_15 AC 317 ms
39,756 KB
testcase_16 AC 332 ms
49,792 KB
testcase_17 AC 339 ms
52,444 KB
testcase_18 AC 324 ms
47,744 KB
testcase_19 AC 333 ms
51,840 KB
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (236 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(1,5): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let [|n; m; k|] = stdin.ReadLine().Split " " |> Array.map int

let x = stdin.ReadLine().Split " "

let op = x.[0]
let b = x.[1..] |> Array.map int64
let a =
    [|
        for _ in 0..n-1 ->
            stdin.ReadLine () |> int64
    |]
    
if op = "+" then
    ((a |> Array.sum |> ((*)(int64 m))) + (b |> Array.sum |> ((*)(int64 n)))) % (int64 k)
else
    ((a |> Array.sum |> int64) * (b |> Array.sum |> int64)) % (int64 k)
|> printfn "%d"
0