結果

問題 No.1066 #いろいろな色 / Red and Blue and more various colors (Easy)
ユーザー c-yanc-yan
提出日時 2020-06-02 18:30:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 288 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 702 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 76,976 KB
最終ジャッジ日時 2023-08-15 21:45:27
合計ジャッジ時間 5,869 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,320 KB
testcase_01 AC 70 ms
71,344 KB
testcase_02 AC 71 ms
71,336 KB
testcase_03 AC 72 ms
71,064 KB
testcase_04 AC 74 ms
71,300 KB
testcase_05 AC 72 ms
71,280 KB
testcase_06 AC 75 ms
71,272 KB
testcase_07 AC 71 ms
71,328 KB
testcase_08 AC 208 ms
76,920 KB
testcase_09 AC 76 ms
75,648 KB
testcase_10 AC 288 ms
76,892 KB
testcase_11 AC 130 ms
76,692 KB
testcase_12 AC 120 ms
76,760 KB
testcase_13 AC 129 ms
76,912 KB
testcase_14 AC 133 ms
76,648 KB
testcase_15 AC 224 ms
76,612 KB
testcase_16 AC 106 ms
76,912 KB
testcase_17 AC 115 ms
76,976 KB
testcase_18 AC 220 ms
76,692 KB
testcase_19 AC 127 ms
76,852 KB
testcase_20 AC 76 ms
75,644 KB
testcase_21 AC 181 ms
76,788 KB
testcase_22 AC 82 ms
76,500 KB
testcase_23 AC 75 ms
71,304 KB
testcase_24 AC 72 ms
71,308 KB
testcase_25 AC 270 ms
76,616 KB
testcase_26 AC 246 ms
76,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def r():return input().split()
N,_=map(int,r())
t=[0]*(N+2)
t[0]=1
for a in map(int,r()):
	for i in range(N,-1,-1):
		t[i]=(t[i]*(a-1)+t[i-1])%998244353
for b in map(int,r()):
	print(t[b])
0