結果

問題 No.1904 Never giving up!
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-04-15 21:28:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 71,560 KB
最終ジャッジ日時 2023-08-26 07:31:17
合計ジャッジ時間 1,986 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,268 KB
testcase_01 AC 71 ms
71,268 KB
testcase_02 AC 72 ms
71,324 KB
testcase_03 AC 71 ms
71,496 KB
testcase_04 AC 72 ms
71,312 KB
testcase_05 AC 71 ms
71,560 KB
testcase_06 AC 71 ms
71,456 KB
testcase_07 AC 71 ms
71,308 KB
testcase_08 AC 71 ms
71,416 KB
testcase_09 AC 71 ms
71,340 KB
testcase_10 AC 70 ms
71,416 KB
testcase_11 AC 71 ms
71,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from sys import stdin
import math

N = int(stdin.readline())

A = list(map(int,stdin.readline().split()))

dic = {}
for i in A:
    if i not in dic:
        dic[i] = 0
    dic[i] += 1

x = math.factorial(N)

for i in dic:
    x //= math.factorial(dic[i])

print (x)
0