結果
| 問題 |
No.1904 Never giving up!
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2022-10-25 21:05:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 284 bytes |
| コンパイル時間 | 576 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 54,272 KB |
| 最終ジャッジ日時 | 2024-07-03 17:56:10 |
| 合計ジャッジ時間 | 1,366 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 WA * 7 |
ソースコード
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(20)
ans = K
for x,c in D:
while c > 0:
ans *= N // c
c -= 1
N -= 1
print(ans//K)
ntuda