結果

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

ソースコード

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+1):
        ans //= f(A.count(i))

    print(ans)


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