結果

問題 No.420 mod2漸化式
ユーザー htkb
提出日時 2018-05-26 15:23:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 22,068 KB
最終ジャッジ日時 2024-06-28 18:10:27
合計ジャッジ時間 4,627 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 32 RE * 2 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial
x = int(input())

if x == 0:
    print(1, 0)
    exit()

n = factorial(30) // factorial(x-1) // factorial(30-x+1)
total = 0
for i in range(31):
    total += 2**i * n
print(factorial(31) // factorial(x) // factorial(31-x), total)
0