結果

問題 No.2275 →↑↓
ユーザー shotoyooshotoyoo
提出日時 2023-04-21 21:27:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 779 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 101,888 KB
最終ジャッジ日時 2024-04-24 07:36:25
合計ジャッジ時間 2,411 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
54,144 KB
testcase_01 AC 47 ms
54,144 KB
testcase_02 AC 47 ms
54,144 KB
testcase_03 AC 47 ms
54,016 KB
testcase_04 AC 47 ms
54,016 KB
testcase_05 AC 47 ms
54,016 KB
testcase_06 AC 104 ms
101,888 KB
testcase_07 AC 88 ms
92,032 KB
testcase_08 AC 120 ms
100,224 KB
testcase_09 AC 122 ms
100,096 KB
testcase_10 AC 120 ms
100,224 KB
testcase_11 AC 119 ms
100,608 KB
testcase_12 AC 119 ms
100,096 KB
testcase_13 AC 120 ms
100,480 KB
testcase_14 AC 120 ms
100,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()]
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

M = 998244353
n = int(input())
a = list(map(int, input().split()))
ans = 1
for i in range(n-1):
    ans *= min(a[i], a[i+1])
    ans %= M
print(ans%M)
0