結果

問題 No.1904 Never giving up!
ユーザー titan23titan23
提出日時 2022-06-16 22:35:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 792 ms
コンパイル使用メモリ 82,336 KB
実行使用メモリ 59,264 KB
最終ジャッジ日時 2024-04-16 12:11:14
合計ジャッジ時間 2,262 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
53,760 KB
testcase_01 AC 47 ms
53,888 KB
testcase_02 AC 52 ms
59,264 KB
testcase_03 AC 48 ms
53,632 KB
testcase_04 AC 48 ms
53,632 KB
testcase_05 AC 48 ms
54,144 KB
testcase_06 AC 48 ms
53,376 KB
testcase_07 AC 49 ms
53,376 KB
testcase_08 AC 49 ms
53,632 KB
testcase_09 AC 50 ms
53,376 KB
testcase_10 AC 50 ms
54,272 KB
testcase_11 AC 53 ms
59,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
input = lambda: sys.stdin.readline().rstrip()
from collections import Counter

##################

n = int(input())
A = list(map(int, input().split()))
ans = math.factorial(n)
for v in Counter(A).values():
  ans //= math.factorial(v)
print(ans)
0