結果
| 問題 |
No.3070 Collecting Coins Speedrun 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-22 08:10:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 213 bytes |
| コンパイル時間 | 481 ms |
| コンパイル使用メモリ | 82,492 KB |
| 実行使用メモリ | 82,048 KB |
| 最終ジャッジ日時 | 2025-03-22 08:10:57 |
| 合計ジャッジ時間 | 4,018 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 6 |
ソースコード
from bisect import *
n=int(input())
a=list(map(int,input().split()))
mod=998244353
if 0 in a:
place=bisect_left(a,0)
print((pow(2,place-2,mod)*pow(2,n-place-1,mod)*3*2)%mod)
else:
print(pow(2,n-1,mod))