結果

問題 No.1904 Never giving up!
ユーザー ntudantuda
提出日時 2022-10-25 21:05:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 71,948 KB
最終ジャッジ日時 2023-09-16 18:16:05
合計ジャッジ時間 2,191 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,948 KB
testcase_01 AC 92 ms
71,716 KB
testcase_02 AC 94 ms
71,388 KB
testcase_03 AC 96 ms
71,788 KB
testcase_04 WA -
testcase_05 AC 93 ms
71,764 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
D = list(Counter(A).items())
D.sort(reverse= True)
K = factorial(20)
ans = K
for x,c in D:
    while c > 0:
        ans *= N // c
        c -= 1
        N -= 1
print(ans//K)
0