結果

問題 No.1904 Never giving up!
ユーザー 👑 colognecologne
提出日時 2022-04-16 11:26:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,796 KB
実行使用メモリ 71,452 KB
最終ジャッジ日時 2023-08-26 16:59:41
合計ジャッジ時間 1,925 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
70,964 KB
testcase_01 AC 67 ms
71,040 KB
testcase_02 AC 67 ms
71,236 KB
testcase_03 AC 71 ms
71,432 KB
testcase_04 AC 66 ms
71,312 KB
testcase_05 AC 68 ms
71,308 KB
testcase_06 WA -
testcase_07 AC 67 ms
71,220 KB
testcase_08 AC 67 ms
71,452 KB
testcase_09 AC 67 ms
71,432 KB
testcase_10 WA -
testcase_11 AC 66 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

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