結果
問題 | No.2118 遺伝的有限集合の数え上げ |
ユーザー |
|
提出日時 | 2022-11-04 22:06:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2024-07-18 19:53:39 |
合計ジャッジ時間 | 2,988 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
dic = {} def dfs(x): if x == 0: return "{}" if x in dic: return dic[x] l = [] for i in range(20): if x >> i & 1: l.append(dfs(i)) out = "{" + ",".join(l) + "}" dic[x] = out return out n = int(input()) print(dfs(n))