結果

問題 No.1904 Never giving up!
ユーザー ShirotsumeShirotsume
提出日時 2022-04-15 21:33:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 348 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 71,672 KB
最終ジャッジ日時 2023-08-26 07:36:57
合計ジャッジ時間 1,929 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,328 KB
testcase_01 AC 70 ms
71,492 KB
testcase_02 AC 72 ms
71,368 KB
testcase_03 AC 72 ms
71,672 KB
testcase_04 AC 73 ms
71,476 KB
testcase_05 AC 73 ms
71,608 KB
testcase_06 AC 73 ms
71,556 KB
testcase_07 AC 70 ms
71,372 KB
testcase_08 AC 71 ms
71,564 KB
testcase_09 AC 72 ms
71,484 KB
testcase_10 AC 71 ms
71,444 KB
testcase_11 AC 71 ms
71,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

a = list(map(int,input().split()))
a.sort()
cnt = 1
b = []
now = a[0]
for i in range(1, n):
    if now != a[i]:
        b.append(cnt)
        now = a[i]
        cnt = 1
    else:
        cnt += 1
b.append(cnt)

ans = 1

for i in range(1, n + 1):
    ans *= i

for v in b:
    for i in range(1, v + 1):
        ans //= i
print(ans)
0