結果
問題 |
No.129 お年玉(2)
|
ユーザー |
![]() |
提出日時 | 2015-01-16 23:50:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 35,044 KB |
最終ジャッジ日時 | 2024-06-22 12:51:25 |
合計ジャッジ時間 | 12,690 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 45 |
ソースコード
import sys #sys.setrecursionlimit(n) import heapq import re import bisect import random import math import itertools from collections import defaultdict, deque from copy import deepcopy from decimal import * n = int(input()) m = int(input()) def nCm(n, m): return math.factorial(n) // (math.factorial(m) * (math.factorial(n - m))) s = n s -= n // (m * 1000) * 1000 * 9 ss = s // 1000 if ss > 0: print(nCm(m,ss) % 1000000000) else: print(1)