結果

問題 No.2118 遺伝的有限集合の数え上げ
ユーザー tassei903tassei903
提出日時 2022-11-14 21:46:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 640 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,236 KB
実行使用メモリ 72,492 KB
最終ジャッジ日時 2023-10-14 04:47:08
合計ジャッジ時間 7,920 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
72,492 KB
testcase_01 AC 102 ms
72,228 KB
testcase_02 AC 107 ms
72,420 KB
testcase_03 AC 102 ms
72,400 KB
testcase_04 AC 105 ms
72,340 KB
testcase_05 AC 103 ms
72,348 KB
testcase_06 AC 103 ms
72,376 KB
testcase_07 AC 101 ms
72,204 KB
testcase_08 AC 103 ms
72,344 KB
testcase_09 AC 102 ms
72,188 KB
testcase_10 AC 104 ms
72,288 KB
testcase_11 AC 103 ms
72,400 KB
testcase_12 AC 102 ms
72,340 KB
testcase_13 AC 104 ms
72,396 KB
testcase_14 AC 102 ms
72,340 KB
testcase_15 AC 101 ms
72,400 KB
testcase_16 AC 101 ms
72,200 KB
testcase_17 AC 103 ms
72,348 KB
testcase_18 AC 101 ms
72,304 KB
testcase_19 AC 104 ms
72,240 KB
testcase_20 AC 103 ms
72,400 KB
testcase_21 AC 107 ms
72,400 KB
testcase_22 AC 104 ms
72,384 KB
testcase_23 AC 103 ms
72,336 KB
testcase_24 AC 103 ms
72,464 KB
testcase_25 AC 102 ms
72,340 KB
testcase_26 AC 100 ms
72,396 KB
testcase_27 AC 104 ms
72,336 KB
testcase_28 AC 105 ms
72,192 KB
testcase_29 AC 103 ms
72,228 KB
testcase_30 AC 111 ms
72,192 KB
testcase_31 AC 101 ms
72,352 KB
testcase_32 AC 102 ms
72,188 KB
testcase_33 AC 101 ms
72,392 KB
testcase_34 AC 103 ms
72,260 KB
testcase_35 AC 104 ms
72,188 KB
testcase_36 AC 104 ms
72,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n = ni()

from functools import lru_cache
@lru_cache(maxsize=None)

def saiki(n):
    if n == 0:
        return "{}"
    ans = set()
    z = 0
    while n:
        if n&1:
            ans.add(saiki(z))
        z += 1
        n//=2

    return "{"+",".join(list(ans))+"}"
print(saiki(n))
0