結果

問題 No.129 お年玉(2)
ユーザー roiti46roiti46
提出日時 2015-01-23 04:20:23
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 172 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 77,868 KB
実行使用メモリ 82,756 KB
最終ジャッジ日時 2023-09-05 03:59:31
合計ジャッジ時間 6,754 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 74 ms
76,504 KB
testcase_02 AC 74 ms
76,292 KB
testcase_03 AC 76 ms
76,188 KB
testcase_04 AC 75 ms
76,420 KB
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 WA -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 73 ms
76,280 KB
testcase_30 AC 75 ms
76,476 KB
testcase_31 AC 74 ms
76,556 KB
testcase_32 WA -
testcase_33 AC 74 ms
76,184 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 RE -
testcase_41 RE -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 RE -
testcase_48 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def perm(n,i):
    return 1 if i == 0 else n*perm(n-1,i-1)

N = int(raw_input())
M = int(raw_input())

R = (N-N/1000/M*1000*M)/1000
R = min(R,M-R)
print perm(M,R)/perm(R,R)
0