結果

問題 No.2275 →↑↓
ユーザー natoriusannatoriusan
提出日時 2023-07-31 17:27:54
言語 F#
(F# 4.0)
結果
AC  
実行時間 393 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 8,594 ms
コンパイル使用メモリ 192,520 KB
実行使用メモリ 62,848 KB
最終ジャッジ日時 2024-04-18 17:29:49
合計ジャッジ時間 12,992 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 340 ms
35,208 KB
testcase_01 AC 336 ms
35,208 KB
testcase_02 AC 329 ms
34,744 KB
testcase_03 AC 335 ms
34,688 KB
testcase_04 AC 332 ms
34,736 KB
testcase_05 AC 332 ms
34,596 KB
testcase_06 AC 376 ms
60,204 KB
testcase_07 AC 374 ms
55,680 KB
testcase_08 AC 384 ms
62,584 KB
testcase_09 AC 393 ms
62,848 KB
testcase_10 AC 391 ms
62,848 KB
testcase_11 AC 389 ms
62,720 KB
testcase_12 AC 392 ms
62,608 KB
testcase_13 AC 384 ms
62,720 KB
testcase_14 AC 391 ms
62,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (288 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let n = stdin.ReadLine () |> int
let a = stdin.ReadLine().Split " " |> Array.map int


if a.Length > 2 then
    [|
        for i in 0..a.Length-2 ->
            min a.[i] a.[i+1] |> int64
    |] |> Array.reduce (fun prev x -> prev * x % 998244353L)
else
    (Array.min a |> int64) % 998244353L
|> printfn "%d"
0