結果
| 問題 |
No.2742 Car Flow
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-04-20 10:59:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 204 bytes |
| コンパイル時間 | 374 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 101,248 KB |
| 最終ジャッジ日時 | 2024-10-12 06:36:43 |
| 合計ジャッジ時間 | 5,376 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 45 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
A = A + [A[0]]
cnt = 0
for i in range(N):
if A[i] == 0 and A[i + 1] == 1:
cnt += 1
mod = 998244353
print(cnt * pow(N, mod - 2, mod) % mod)
rlangevin