結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2020-04-12 18:04:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 1,000 ms |
コード長 | 293 bytes |
コンパイル時間 | 335 ms |
コンパイル使用メモリ | 82,468 KB |
実行使用メモリ | 54,040 KB |
最終ジャッジ日時 | 2024-09-22 04:18:02 |
合計ジャッジ時間 | 2,995 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
import math x=int(input()) if x==0: print(' '.join(['1','0'])) elif x>31: print(' '.join(['0','0'])) else: cnt=math.factorial(31)//math.factorial(x)//math.factorial(31-x) tot=(2**31-1)*math.factorial(30)//math.factorial(x-1)//math.factorial(31-x) print(' '.join([str(cnt),str(tot)]))