結果

問題 No.420 mod2漸化式
コンテスト
ユーザー htkb
提出日時 2018-05-26 15:23:22
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 255 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,121 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 27,548 KB
最終ジャッジ日時 2026-03-17 18:17:41
合計ジャッジ時間 8,083 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 32 RE * 2 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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