結果
| 問題 | No.1904 Never giving up! |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2022-10-25 21:07:19 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 301 bytes |
| 記録 | |
| コンパイル時間 | 356 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 53,632 KB |
| 最終ジャッジ日時 | 2026-03-25 01:42:25 |
| 合計ジャッジ時間 | 1,265 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
ntuda