結果
問題 | No.1904 Never giving up! |
ユーザー |
|
提出日時 | 2022-04-15 22:47:25 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-25 01:56:00 |
合計ジャッジ時間 | 1,292 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
import mathn = int(input())a = list(map(int,input().split()))a.sort()ans_u = []ans_d = []for idx,num in enumerate(a):same_n = 0for i in range(idx+1,n):if num == a[i]:same_n += 1ans_u.append(same_n + 1)ans_d.append(n-idx)ans = math.prod(ans_d) / math.prod(ans_u)print(int(ans))