結果

問題 No.1904 Never giving up!
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2022-04-15 21:45:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,452 KB
最終ジャッジ日時 2023-08-26 07:44:22
合計ジャッジ時間 1,961 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,348 KB
testcase_01 AC 73 ms
71,328 KB
testcase_02 AC 72 ms
71,100 KB
testcase_03 AC 73 ms
70,928 KB
testcase_04 AC 71 ms
71,328 KB
testcase_05 AC 72 ms
71,348 KB
testcase_06 AC 72 ms
71,116 KB
testcase_07 AC 71 ms
71,452 KB
testcase_08 AC 71 ms
71,284 KB
testcase_09 AC 73 ms
71,252 KB
testcase_10 AC 72 ms
71,412 KB
testcase_11 AC 72 ms
71,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from _collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
kai=[1]*22
for i in range(1,21):
    kai[i]=kai[i-1]*i

ans=1
cnt=defaultdict(int)
for x in a:
    cnt[x]+=1
for x in cnt:
    ans*=kai[cnt[x]]
print(kai[n]//ans)

0