結果
問題 |
No.3070 Collecting Coins Speedrun 2
|
ユーザー |
![]() |
提出日時 | 2025-03-21 22:19:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 88 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 82,172 KB |
実行使用メモリ | 83,200 KB |
最終ジャッジ日時 | 2025-03-21 22:19:31 |
合計ジャッジ時間 | 3,214 ms |
ジャッジサーバーID (参考情報) |
judge7 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
N=int(input()) C=list(map(int,input().split())) if N==1: print(1) exit() ans=1 if min(C)<0<max(C): ans*=2 elif min(C)>0: ans*=2 else: ans*=2 zero_count =0 if 0 in C: if min(C)<0<max(C): zero_count+=1 ans*=3 p=998244353 ans*=pow(2,max(0,N-2-zero_count),p) print(ans%p)