結果
問題 | No.420 mod2漸化式 |
ユーザー |
![]() |
提出日時 | 2022-06-24 19:56:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 1,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-08 16:12:10 |
合計ジャッジ時間 | 2,687 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
x=int(input()) if x>31: print(0,0) exit() if x==0: print(1,0) exit() cnt=1 for d in range(31,31-x,-1): cnt*=d for d in range(1,x+1): cnt//=d cur=1 for d in range(30,30-(x-1),-1): cur*=d for d in range(1,x): cur//=d ans=0 for d in range(31): ans+=cur*(2**d) print(cnt,ans)