結果

問題 No.3070 Collecting Coins Speedrun 2
ユーザー ルク
提出日時 2025-03-21 22:10:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 90,880 KB
最終ジャッジ日時 2025-03-21 22:10:15
合計ジャッジ時間 3,044 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
pos = []
neg = []
mod = 998244353
zero = False
a = list(map(int, input().split()))
for i in a:
    if i > 0:
        pos.append(i)
    elif i < 0:
        neg.append(i)
    else:
        zero = True
ans = pow(2, len(pos)-1, mod)*pow(2, len(neg)-1, mod)*2 % mod
if zero:
    ans *= 3
print(ans % mod)
0