結果
| 問題 | No.2118 遺伝的有限集合の数え上げ |
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2022-11-04 21:45:02 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-18 19:28:42 |
| 合計ジャッジ時間 | 2,463 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
ソースコード
from functools import lru_cache
@lru_cache(maxsize=None)
def main(n):
s = ["{"]
for i in range(n.bit_length()):
if n&1<<i: s.append(main(i)); s.append(",")
if s[-1] == ",": s.pop()
s.append("}")
return "".join(s)
print(main(int(input())))
ニックネーム