結果

問題 No.2275 →↑↓
ユーザー 👑 kakel-sankakel-san
提出日時 2023-07-07 21:13:50
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 1,412 ms
コンパイル使用メモリ 67,872 KB
実行使用メモリ 45,372 KB
最終ジャッジ日時 2023-09-28 22:05:12
合計ジャッジ時間 5,773 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,592 KB
testcase_01 AC 61 ms
19,452 KB
testcase_02 AC 60 ms
21,456 KB
testcase_03 AC 61 ms
23,592 KB
testcase_04 AC 61 ms
23,472 KB
testcase_05 AC 61 ms
21,528 KB
testcase_06 AC 141 ms
39,156 KB
testcase_07 AC 125 ms
36,764 KB
testcase_08 AC 156 ms
43,332 KB
testcase_09 AC 154 ms
41,344 KB
testcase_10 AC 155 ms
41,540 KB
testcase_11 AC 156 ms
41,516 KB
testcase_12 AC 157 ms
45,372 KB
testcase_13 AC 157 ms
41,476 KB
testcase_14 AC 154 ms
41,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        var mod = 998_244_353;
        var ans = 1L;
        for (var i = 1; i < n; ++i)
        {
            ans = ans * Math.Min(a[i - 1], a[i]) % mod;
        }
        WriteLine(ans);
    }
}
0