結果
| 問題 | No.129 お年玉(2) |
| コンテスト | |
| ユーザー |
yn
|
| 提出日時 | 2015-08-27 22:29:46 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 35 ms / 5,000 ms |
| + 888µs | |
| コード長 | 249 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 12,800 KB |
| 最終ジャッジ日時 | 2026-10-01 03:44:40 |
| 合計ジャッジ時間 | 3,908 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
ソースコード
import math n = int(input()) m = int(input()) #配れる千円札の枚数 n = (n - n % 1000) // 1000 #余る千円札の枚数 surplus = n % m comb = math.factorial(m) // math.factorial(surplus) // math.factorial(m - surplus) print(comb % 10**9)
yn