結果
| 問題 |
No.2742 Car Flow
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-04-20 10:48:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 238 bytes |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 82,628 KB |
| 実行使用メモリ | 100,812 KB |
| 最終ジャッジ日時 | 2024-10-12 06:23:58 |
| 合計ジャッジ時間 | 4,394 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 48 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
A = A + [A[0]]
for i in range(N):
if A[i] == A[i + 1] == 1:
print(0)
exit()
A.pop()
cnt = A.count(1)
mod = 998244353
print(cnt * pow(N, mod - 2, mod) % mod)
rlangevin