結果
| 問題 | No.2742 Car Flow |
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-04-20 10:48:53 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 97,664 KB |
| 最終ジャッジ日時 | 2026-04-28 18:02:11 |
| 合計ジャッジ時間 | 6,351 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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