結果
| 問題 |
No.741 AscNumber(Easy)
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-04 09:58:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 336 bytes |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-20 06:59:58 |
| 合計ジャッジ時間 | 3,130 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 55 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(read())
MOD = 10**9 + 7
def comb(N,K):
# K is small
num = 1
den = 1
for i in range(K):
num *= (N-i)
den *= (1+i)
return num // den
answer = comb(N+9, 9) % MOD
print(answer)
maspy