結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-18 23:24:47 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 393 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-14 15:01:53 |
| 合計ジャッジ時間 | 2,157 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 WA * 4 RE * 40 |
ソースコード
n=input("")
n=int(n) # 入力されるデータ数
m=input("")
m=int(m)
if n<1000:
print("0")
exit(0)
MAX=1000000000
n=int(n/1000)
n=n%m
s1=1
s2=1
for i in range(n):
if m-i>0:
s1=s1*(m-i)
s1=s1%MAX
s2=s2*(i+1)
s2=s2%MAX
print(int(s1/s2)%MAX)