結果

問題 No.2742 Car Flow
ユーザー tassei903tassei903
提出日時 2024-04-12 00:07:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 97,088 KB
最終ジャッジ日時 2024-04-20 09:30:06
合計ジャッジ時間 5,310 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
95,956 KB
testcase_01 AC 73 ms
96,704 KB
testcase_02 AC 72 ms
95,564 KB
testcase_03 AC 73 ms
95,640 KB
testcase_04 AC 73 ms
96,960 KB
testcase_05 AC 72 ms
96,088 KB
testcase_06 AC 73 ms
96,516 KB
testcase_07 AC 73 ms
96,928 KB
testcase_08 AC 75 ms
96,572 KB
testcase_09 AC 73 ms
96,480 KB
testcase_10 AC 63 ms
84,792 KB
testcase_11 AC 65 ms
87,128 KB
testcase_12 AC 61 ms
81,128 KB
testcase_13 AC 55 ms
77,232 KB
testcase_14 AC 53 ms
74,836 KB
testcase_15 AC 41 ms
60,268 KB
testcase_16 AC 73 ms
97,088 KB
testcase_17 AC 72 ms
96,344 KB
testcase_18 AC 42 ms
60,472 KB
testcase_19 AC 72 ms
95,756 KB
testcase_20 AC 48 ms
69,768 KB
testcase_21 AC 47 ms
67,472 KB
testcase_22 AC 65 ms
88,172 KB
testcase_23 AC 69 ms
93,448 KB
testcase_24 AC 55 ms
76,816 KB
testcase_25 AC 69 ms
92,016 KB
testcase_26 AC 73 ms
96,072 KB
testcase_27 AC 49 ms
69,624 KB
testcase_28 AC 51 ms
72,736 KB
testcase_29 AC 41 ms
59,140 KB
testcase_30 AC 68 ms
91,584 KB
testcase_31 AC 47 ms
66,132 KB
testcase_32 AC 69 ms
92,184 KB
testcase_33 AC 65 ms
88,212 KB
testcase_34 AC 52 ms
73,624 KB
testcase_35 AC 48 ms
67,848 KB
testcase_36 AC 40 ms
58,216 KB
testcase_37 AC 49 ms
69,400 KB
testcase_38 AC 67 ms
89,284 KB
testcase_39 AC 45 ms
64,012 KB
testcase_40 AC 37 ms
52,864 KB
testcase_41 AC 39 ms
51,828 KB
testcase_42 AC 38 ms
54,080 KB
testcase_43 AC 38 ms
52,556 KB
testcase_44 AC 37 ms
52,944 KB
testcase_45 AC 38 ms
52,000 KB
testcase_46 AC 37 ms
52,352 KB
testcase_47 AC 38 ms
53,756 KB
testcase_48 AC 38 ms
52,336 KB
testcase_49 AC 38 ms
53,384 KB
testcase_50 AC 38 ms
52,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
N = int(input())
A = list(map(int, input().split()))
S = A.count(1)
if S * 2 <= N:
    print(S * pow(N, mod-2, mod) % mod)
else:
    print((N - S) * pow(N, mod-2, mod) % mod)
    
0