結果
問題 |
No.3070 Collecting Coins Speedrun 2
|
ユーザー |
|
提出日時 | 2025-03-23 12:19:26 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 481 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 92,636 KB |
最終ジャッジ日時 | 2025-03-23 12:19:31 |
合計ジャッジ時間 | 4,566 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 18 RE * 14 |
ソースコード
N = int(input()) C = list(map(int,input().split())) MOD = 998244353 if N==1: ans = 1 else: cnt = 0 for i in range(N): if C[i]<0: cnt += 1 else:break if 0 not in C: ans = pow(2,N-1,MOD) elif k==0 or k==N-1: ans = pow(2,N,MOD) else: ans = 3*pow(2,N-2,MOD) print(ans)