結果

問題 No.1904 Never giving up!
ユーザー cologne
提出日時 2022-04-16 11:26:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 81,408 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2024-12-25 16:00:05
合計ジャッジ時間 1,764 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    *A, = map(int, input().split())

    def f(x):
        a = 1
        for i in range(1, x+1):
            a *= i
        return a

    ans = f(N)

    for i in range(1, N):
        ans //= f(A.count(i))

    print(ans)


if __name__ == '__main__':
    main()
0