結果
| 問題 |
No.3070 Collecting Coins Speedrun 2
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-03-21 21:54:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 2,000 ms |
| コード長 | 266 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 81,920 KB |
| 最終ジャッジ日時 | 2025-03-21 21:54:56 |
| 合計ジャッジ時間 | 3,182 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
N = int(input())
C = list(map(int, input().split()))
MOD = 998244353
if 0 <= C[0] and 0 <= C[-1]:
print(pow(2, N-1, MOD))
elif C[0] < 0 and C[-1] <= 0:
print(pow(2, N-1, MOD))
elif 0 in C:
print(pow(2, N-2, MOD)*3%MOD)
else:
print(pow(2, N-1, MOD))
detteiuu