結果
問題 | No.1904 Never giving up! |
ユーザー | chineristAC |
提出日時 | 2022-04-15 21:31:09 |
言語 | PyPy3 (7.3.13) |
結果 |
AC
|
実行時間 | 105 ms / 2,000 ms |
コード長 | 512 bytes |
コンパイル時間 | 1,991 ms |
コンパイル使用メモリ | 86,700 KB |
実行使用メモリ | 75,088 KB |
最終ジャッジ日時 | 2023-08-26 07:34:55 |
合計ジャッジ時間 | 2,669 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 99 ms
75,088 KB |
testcase_01 | AC | 103 ms
75,016 KB |
testcase_02 | AC | 104 ms
74,652 KB |
testcase_03 | AC | 101 ms
74,784 KB |
testcase_04 | AC | 103 ms
74,796 KB |
testcase_05 | AC | 103 ms
74,872 KB |
testcase_06 | AC | 101 ms
74,436 KB |
testcase_07 | AC | 105 ms
74,888 KB |
testcase_08 | AC | 102 ms
74,660 KB |
testcase_09 | AC | 102 ms
74,648 KB |
testcase_10 | AC | 103 ms
74,716 KB |
testcase_11 | AC | 99 ms
74,600 KB |
ソースコード
import sys,random,bisect from collections import deque,defaultdict from heapq import heapify,heappop,heappush from itertools import cycle, permutations from math import log,gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) N = int(input()) A = li() cnt = [0] * (N+1) g1 = [1] * (N+1) for i in range(1,N+1): g1[i] = i * g1[i-1] for a in A: cnt[a] += 1 res = g1[N] for i in range(1,N+1): res //= g1[cnt[i]] print(res)