結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-19 19:56:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 391 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 113,828 KB |
| 最終ジャッジ日時 | 2024-06-29 21:12:41 |
| 合計ジャッジ時間 | 4,593 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 |
| other | -- * 35 |
ソースコード
from scipy.special import comb
def main():
x = int(input())
if x > 31:
print(0, 0)
return
if x == 0:
print(0, 0)
return
patterns = comb(31, x, exact=True)
if x == 1 or x == 31:
sum_ = 2**31 - 1
else:
sum_ = (2**31 - 1) * comb(30, x-1, exact=True)
print(patterns, sum_)
if __name__ == "__main__":
main()