結果
| 問題 |
No.1904 Never giving up!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-15 21:59:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 588 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 58,624 KB |
| 最終ジャッジ日時 | 2024-12-25 00:36:00 |
| 合計ジャッジ時間 | 1,800 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
from collections import defaultdict
from math import factorial
N = int(input())
A = list(map(int, input().split()))
ans = factorial(N)
dic = defaultdict(int)
for i in A:
dic[i] += 1
for i in dic:
ans //= factorial(dic[i])
print(ans)