結果

問題 No.2742 Car Flow
ユーザー KudeKude
提出日時 2024-04-21 10:48:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 161 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 80,896 KB
最終ジャッジ日時 2024-04-21 10:49:25
合計ジャッジ時間 4,822 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
80,640 KB
testcase_01 AC 68 ms
80,640 KB
testcase_02 AC 68 ms
80,512 KB
testcase_03 AC 63 ms
80,384 KB
testcase_04 AC 63 ms
80,640 KB
testcase_05 AC 61 ms
80,384 KB
testcase_06 AC 61 ms
80,256 KB
testcase_07 AC 61 ms
80,384 KB
testcase_08 AC 63 ms
80,256 KB
testcase_09 AC 62 ms
80,640 KB
testcase_10 AC 55 ms
73,472 KB
testcase_11 AC 57 ms
75,520 KB
testcase_12 AC 54 ms
72,064 KB
testcase_13 AC 50 ms
68,992 KB
testcase_14 AC 51 ms
67,456 KB
testcase_15 AC 41 ms
58,624 KB
testcase_16 AC 68 ms
80,384 KB
testcase_17 AC 63 ms
80,768 KB
testcase_18 AC 42 ms
59,008 KB
testcase_19 AC 63 ms
80,512 KB
testcase_20 AC 47 ms
64,000 KB
testcase_21 AC 46 ms
62,976 KB
testcase_22 AC 58 ms
75,648 KB
testcase_23 AC 61 ms
78,592 KB
testcase_24 AC 52 ms
68,608 KB
testcase_25 AC 62 ms
77,696 KB
testcase_26 AC 69 ms
80,896 KB
testcase_27 AC 49 ms
64,768 KB
testcase_28 AC 51 ms
66,688 KB
testcase_29 AC 41 ms
57,472 KB
testcase_30 AC 60 ms
77,696 KB
testcase_31 AC 45 ms
62,464 KB
testcase_32 AC 58 ms
78,208 KB
testcase_33 AC 64 ms
75,904 KB
testcase_34 AC 49 ms
66,688 KB
testcase_35 AC 47 ms
62,592 KB
testcase_36 AC 42 ms
57,728 KB
testcase_37 AC 48 ms
64,512 KB
testcase_38 AC 59 ms
75,904 KB
testcase_39 AC 43 ms
60,416 KB
testcase_40 AC 36 ms
52,096 KB
testcase_41 AC 35 ms
52,096 KB
testcase_42 AC 40 ms
51,712 KB
testcase_43 AC 37 ms
51,712 KB
testcase_44 AC 37 ms
51,584 KB
testcase_45 AC 36 ms
51,456 KB
testcase_46 AC 39 ms
51,584 KB
testcase_47 AC 37 ms
51,712 KB
testcase_48 AC 36 ms
51,712 KB
testcase_49 AC 35 ms
51,712 KB
testcase_50 AC 36 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n = int(input())
c1 = sum(map(int, input().split()))
c0 = n - c1
if c0 > c1:
    c0, c1 = c1, c0
print(c0 * c1 * pow(n * c1, mod - 2, mod) % mod)
0