結果
問題 |
No.1904 Never giving up!
|
ユーザー |
![]() |
提出日時 | 2022-10-25 21:07:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 174 ms |
コンパイル使用メモリ | 82,604 KB |
実行使用メモリ | 55,484 KB |
最終ジャッジ日時 | 2024-07-03 17:57:15 |
合計ジャッジ時間 | 1,275 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
from math import factorial from collections import Counter N = int(input()) A = list(map(int,input().split())) D = list(Counter(A).items()) D.sort(reverse= True) K = factorial(N) ans = K for x,c in D: while c > 0: ans *= N ans //= c c -= 1 N -= 1 print(int(ans//K))