結果

問題 No.2275 →↑↓
ユーザー natoriusan
提出日時 2023-07-31 17:27:54
言語 F#
(F# 4.0)
結果
AC  
実行時間 403 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 6,631 ms
コンパイル使用メモリ 184,336 KB
実行使用メモリ 63,200 KB
最終ジャッジ日時 2024-10-10 10:48:49
合計ジャッジ時間 13,450 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (232 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