結果

問題 No.420 mod2漸化式
ユーザー HachimoriHachimori
提出日時 2016-09-09 23:03:19
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 324 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 6,636 KB
実行使用メモリ 6,232 KB
最終ジャッジ日時 2023-08-25 23:18:39
合計ジャッジ時間 1,994 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,076 KB
testcase_01 AC 9 ms
6,164 KB
testcase_02 AC 9 ms
6,172 KB
testcase_03 AC 9 ms
6,064 KB
testcase_04 AC 9 ms
6,212 KB
testcase_05 AC 10 ms
6,132 KB
testcase_06 AC 9 ms
6,168 KB
testcase_07 AC 10 ms
6,212 KB
testcase_08 AC 12 ms
6,080 KB
testcase_09 AC 9 ms
6,216 KB
testcase_10 AC 10 ms
5,984 KB
testcase_11 AC 10 ms
6,064 KB
testcase_12 AC 10 ms
6,164 KB
testcase_13 AC 9 ms
6,020 KB
testcase_14 AC 10 ms
6,132 KB
testcase_15 AC 9 ms
6,160 KB
testcase_16 AC 9 ms
5,944 KB
testcase_17 AC 9 ms
6,024 KB
testcase_18 AC 10 ms
6,000 KB
testcase_19 AC 9 ms
6,016 KB
testcase_20 AC 9 ms
6,072 KB
testcase_21 AC 9 ms
6,028 KB
testcase_22 AC 9 ms
6,000 KB
testcase_23 AC 10 ms
6,196 KB
testcase_24 AC 9 ms
6,020 KB
testcase_25 AC 9 ms
6,076 KB
testcase_26 AC 10 ms
6,184 KB
testcase_27 AC 9 ms
6,028 KB
testcase_28 AC 9 ms
6,140 KB
testcase_29 AC 10 ms
6,012 KB
testcase_30 AC 9 ms
6,144 KB
testcase_31 AC 9 ms
6,036 KB
testcase_32 AC 10 ms
6,232 KB
testcase_33 AC 9 ms
6,120 KB
testcase_34 AC 9 ms
6,004 KB
testcase_35 AC 9 ms
6,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
#coding:utf8

def read():
    return input()


def bino(a, b):
    return 1 if b == 0 else bino(a - 1, b - 1) * a / b


def work(n):
    if n <= 31:
        print bino(31, n), 0 if n == 0 else bino(30, n - 1) * ((1 << 31) - 1)
    else:
        print 0, 0


if __name__ == "__main__":
    work(read())
0