結果

問題 No.1904 Never giving up!
ユーザー kohei2019kohei2019
提出日時 2023-08-06 23:40:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 614 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 53,888 KB
最終ジャッジ日時 2024-04-24 18:00:38
合計ジャッジ時間 2,242 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,504 KB
testcase_01 AC 42 ms
53,348 KB
testcase_02 AC 42 ms
53,248 KB
testcase_03 AC 42 ms
53,760 KB
testcase_04 AC 42 ms
53,760 KB
testcase_05 AC 44 ms
53,504 KB
testcase_06 AC 43 ms
53,248 KB
testcase_07 AC 43 ms
53,376 KB
testcase_08 AC 43 ms
53,504 KB
testcase_09 AC 43 ms
53,888 KB
testcase_10 AC 42 ms
53,760 KB
testcase_11 AC 43 ms
53,376 KB
権限があれば一括ダウンロードができます

ソースコード

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