結果
問題 |
No.2742 Car Flow
|
ユーザー |
![]() |
提出日時 | 2025-04-21 01:57:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 208 bytes |
コンパイル時間 | 376 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 14,300 KB |
最終ジャッジ日時 | 2025-04-21 01:57:16 |
合計ジャッジ時間 | 4,986 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 50 |
ソースコード
import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) from collections import Counter C=Counter(A) v=min(C[0],C[1]) mod=998244353 ANS=v*pow(N,mod-2,mod)%mod print(ANS)