結果
| 問題 | No.1336 Union on Blackboard |
| コンテスト | |
| ユーザー |
👑 terry_u16
|
| 提出日時 | 2021-01-15 21:57:08 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 448 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 82,296 KB |
| 実行使用メモリ | 64,572 KB |
| 最終ジャッジ日時 | 2026-09-30 10:01:59 |
| 合計ジャッジ時間 | 3,311 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 31 |
ソースコード
tests = int(input())
def pow(a, p):
result = 1
while p > 0:
if p & 1 == 1:
result *= a
result %= 998244353
p >>= 1
a = a * a % 998244353
return result
def inv(a):
return pow(a, 998244351)
for _ in range(tests):
n = int(input())
a = map(int, input().split())
current = 0
for ai in a:
current = (current + ai + current * ai) % 998244353
print(current)
terry_u16