結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-06-04 02:59:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 5,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 609 ms |
| コンパイル使用メモリ | 82,632 KB |
| 実行使用メモリ | 75,264 KB |
| 最終ジャッジ日時 | 2025-06-04 02:59:56 |
| 合計ジャッジ時間 | 4,606 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
ソースコード
def nck(n, k):
x = 1
for i in range(k):
x = x * (n - i) // (i + 1)
return x
MOD = 10**9
N = int(input())
M = int(input())
m = (N // 1000) % M
ans = nck(M, m) % MOD
print(ans)
norioc