結果

問題 No.1904 Never giving up!
ユーザー n_nan_na
提出日時 2022-04-16 16:05:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 71,424 KB
最終ジャッジ日時 2023-08-26 19:04:43
合計ジャッジ時間 1,991 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,424 KB
testcase_01 AC 62 ms
71,192 KB
testcase_02 AC 60 ms
70,980 KB
testcase_03 AC 63 ms
71,144 KB
testcase_04 AC 63 ms
71,036 KB
testcase_05 AC 65 ms
71,424 KB
testcase_06 AC 64 ms
71,360 KB
testcase_07 AC 64 ms
71,200 KB
testcase_08 AC 61 ms
71,264 KB
testcase_09 AC 64 ms
71,404 KB
testcase_10 AC 63 ms
71,020 KB
testcase_11 AC 62 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())
A = list(map(int, input().split()))

cnt = [0]*(N+1)
for v in A:
    cnt[v] += 1

T = math.factorial(N)
B = 1
for n in cnt:
    B *= math.factorial(n)

print(T//B)
    


0