結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
shooooo
|
| 提出日時 | 2019-11-30 17:54:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 1,000 ms |
| コード長 | 328 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-21 03:23:30 |
| 合計ジャッジ時間 | 2,233 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
import math
x=int(input())
if x>=32:
l=[str(0),str(0)]
print(' '.join(l))
elif x==0:
l=[str(1),str(0)]
print(' '.join(l))
else:
ans=math.factorial(31)//math.factorial(x)//math.factorial(31-x)
ans2=(2**31-1)*(math.factorial(30)//math.factorial(x-1)//math.factorial(31-x))
l=[str(ans),str(ans2)]
print(' '.join(l))
shooooo