0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ABC209 C - Not Equal から学んだ

Posted at

abc209_1.png
abc209_2.png
abc209_3.png

うむ。結局、階乗で行けるのでは?
樹形図としては並び替えれば行けるんじゃね?

。。行けた。

NotEqual.py
n = int(input())
C = list(map(int,input().split()))
C.sort()
score = 1
for i in range(n):
    score *= C[i]-i
    score %= (7+10**9)
print(score)

解説もそれっぽい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?