結果

問題 No.1904 Never giving up!
ユーザー kohei2019
提出日時 2023-08-06 23:40:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 515 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2024-11-07 02:49:06
合計ジャッジ時間 1,739 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N = int(input())
ls = list(map(int,input().split()))

def perm(n):
    ret = 1
    for i in range(1,n+1):
        ret *= i
    return ret

cnt = collections.Counter(ls)

ans = perm(N)

for val in cnt.values():
    ans //= perm(val)

print(ans)
0