結果

問題 No.420 mod2漸化式
コンテスト
ユーザー pluto77
提出日時 2016-09-11 18:08:19
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 248 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 144 ms
コンパイル使用メモリ 77,392 KB
最終ジャッジ日時 2025-12-03 21:28:38
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#yuki_420
import math

x=int(raw_input())
if x==0:
 print 1,0
elif x>=32:
 print 0,0
else:
 res1=math.factorial(31)/math.factorial(31-x)/math.factorial(x)
 res2=math.factorial(30)/math.factorial(31-x)/math.factorial(x-1)
 print res1,(2**31-1)*res2
0