結果

問題 No.2118 遺伝的有限集合の数え上げ
ユーザー shobonvipshobonvip
提出日時 2022-11-08 17:59:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 71,700 KB
最終ジャッジ日時 2023-09-29 07:33:51
合計ジャッジ時間 6,100 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,368 KB
testcase_01 AC 73 ms
71,660 KB
testcase_02 AC 70 ms
71,692 KB
testcase_03 AC 76 ms
71,508 KB
testcase_04 AC 70 ms
71,368 KB
testcase_05 AC 71 ms
71,600 KB
testcase_06 AC 71 ms
71,480 KB
testcase_07 AC 73 ms
71,640 KB
testcase_08 AC 72 ms
71,364 KB
testcase_09 AC 73 ms
71,380 KB
testcase_10 AC 72 ms
71,400 KB
testcase_11 AC 72 ms
71,380 KB
testcase_12 AC 72 ms
71,492 KB
testcase_13 AC 69 ms
71,436 KB
testcase_14 AC 70 ms
71,472 KB
testcase_15 AC 70 ms
71,488 KB
testcase_16 AC 72 ms
71,328 KB
testcase_17 AC 74 ms
71,380 KB
testcase_18 AC 71 ms
71,700 KB
testcase_19 AC 71 ms
71,464 KB
testcase_20 AC 71 ms
71,700 KB
testcase_21 AC 71 ms
71,468 KB
testcase_22 AC 71 ms
71,608 KB
testcase_23 AC 70 ms
71,336 KB
testcase_24 AC 71 ms
71,636 KB
testcase_25 AC 70 ms
71,312 KB
testcase_26 AC 71 ms
71,240 KB
testcase_27 AC 71 ms
71,576 KB
testcase_28 AC 72 ms
71,488 KB
testcase_29 AC 70 ms
71,584 KB
testcase_30 AC 68 ms
71,416 KB
testcase_31 AC 70 ms
71,320 KB
testcase_32 AC 70 ms
71,240 KB
testcase_33 AC 71 ms
71,316 KB
testcase_34 AC 71 ms
71,476 KB
testcase_35 AC 72 ms
71,316 KB
testcase_36 AC 70 ms
71,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = []
s.append("{}")

for i in range(1, 32):
	v = []
	for j in range(8):
		if i>>j&1:
			v.append(s[j])
	s.append("{" + ",".join(v) + "}")

n = int(input())
v = []
for i in range(32):
	if n>>i&1:
		v.append(s[i])

print("{" + ",".join(v) + "}")
0