結果
| 問題 |
No.1904 Never giving up!
|
| コンテスト | |
| ユーザー |
taiga0629kyopro
|
| 提出日時 | 2022-04-15 21:45:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 250 bytes |
| コンパイル時間 | 425 ms |
| コンパイル使用メモリ | 81,664 KB |
| 実行使用メモリ | 51,712 KB |
| 最終ジャッジ日時 | 2024-12-25 00:21:22 |
| 合計ジャッジ時間 | 1,256 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
from _collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
kai=[1]*22
for i in range(1,21):
kai[i]=kai[i-1]*i
ans=1
cnt=defaultdict(int)
for x in a:
cnt[x]+=1
for x in cnt:
ans*=kai[cnt[x]]
print(kai[n]//ans)
taiga0629kyopro