結果

問題 No.1904 Never giving up!
ユーザー kyskys
提出日時 2022-04-15 22:44:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 71,832 KB
最終ジャッジ日時 2023-08-26 08:24:22
合計ジャッジ時間 2,037 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,572 KB
testcase_01 AC 88 ms
71,504 KB
testcase_02 AC 87 ms
71,608 KB
testcase_03 AC 81 ms
71,588 KB
testcase_04 AC 89 ms
71,368 KB
testcase_05 AC 83 ms
71,760 KB
testcase_06 AC 82 ms
71,604 KB
testcase_07 AC 84 ms
71,628 KB
testcase_08 AC 87 ms
71,420 KB
testcase_09 AC 80 ms
71,832 KB
testcase_10 AC 81 ms
71,592 KB
testcase_11 AC 80 ms
71,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
from math import factorial
import sys
input = sys.stdin.readline
def iinput(): return int(input())
def sinput(): return input().rstrip()
def i0input(): return int(input()) - 1
def linput(): return list(input().split())
def liinput(): return list(map(int, input().split()))
def miinput(): return map(int, input().split())
def li0input(): return list(map(lambda x: int(x) - 1, input().split()))
def mi0input(): return map(lambda x: int(x) - 1, input().split())
INF = 10**20
MOD = 1000000007

N = iinput()
A = liinput()
ans = factorial(N)

ctr = Counter(A)
for c in ctr.values():
    ans //= factorial(c)

print(ans)
0