結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-09-13 11:26:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 127 ms / 5,000 ms |
| コード長 | 260 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 75,136 KB |
| 最終ジャッジ日時 | 2024-11-30 14:51:41 |
| 合計ジャッジ時間 | 4,710 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
ソースコード
n=int(input())
m=int(input())
amari = (n%(m*1000)) // 1000
mod=10**9
def nCk(n,k):
x,y=1,1
for i in range(n,n-k,-1):
x*=i
for i in range(k,0,-1):
y*=i
return x//y
if m <= amari:
print(1)
else:
print(nCk(m,amari)%mod)
lllllll88938494