結果
| 問題 | 
                            No.129 お年玉(2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yn
                         | 
                    
| 提出日時 | 2015-08-27 22:29:46 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 44 ms / 5,000 ms | 
| コード長 | 249 bytes | 
| コンパイル時間 | 194 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 12,032 KB | 
| 最終ジャッジ日時 | 2024-11-28 00:07:19 | 
| 合計ジャッジ時間 | 2,952 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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