結果

問題 No.2118 遺伝的有限集合の数え上げ
ユーザー とりゐとりゐ
提出日時 2022-11-04 21:49:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 71,628 KB
最終ジャッジ日時 2023-09-26 00:11:38
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,472 KB
testcase_01 AC 67 ms
71,324 KB
testcase_02 AC 68 ms
71,128 KB
testcase_03 AC 65 ms
71,364 KB
testcase_04 AC 67 ms
71,128 KB
testcase_05 AC 66 ms
71,472 KB
testcase_06 AC 66 ms
71,408 KB
testcase_07 AC 66 ms
71,128 KB
testcase_08 AC 65 ms
71,272 KB
testcase_09 AC 66 ms
71,496 KB
testcase_10 AC 66 ms
71,392 KB
testcase_11 AC 65 ms
71,628 KB
testcase_12 AC 67 ms
71,272 KB
testcase_13 AC 67 ms
71,376 KB
testcase_14 AC 67 ms
71,216 KB
testcase_15 AC 67 ms
71,124 KB
testcase_16 AC 68 ms
71,496 KB
testcase_17 AC 66 ms
71,348 KB
testcase_18 AC 68 ms
71,276 KB
testcase_19 AC 68 ms
71,272 KB
testcase_20 AC 66 ms
71,128 KB
testcase_21 AC 66 ms
71,324 KB
testcase_22 AC 67 ms
71,428 KB
testcase_23 AC 68 ms
71,296 KB
testcase_24 AC 68 ms
71,128 KB
testcase_25 AC 68 ms
71,272 KB
testcase_26 AC 68 ms
71,500 KB
testcase_27 AC 68 ms
71,508 KB
testcase_28 AC 67 ms
71,572 KB
testcase_29 AC 68 ms
71,520 KB
testcase_30 AC 68 ms
71,436 KB
testcase_31 AC 67 ms
71,392 KB
testcase_32 AC 64 ms
71,540 KB
testcase_33 AC 66 ms
71,124 KB
testcase_34 AC 67 ms
71,388 KB
testcase_35 AC 68 ms
71,084 KB
testcase_36 AC 67 ms
71,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(n):
  if n==0:
    return '{}'
  res='{'
  for i in range(10):
    if (n>>i)&1:
      if len(res)!=1:
        res+=','
      res+=f(i)
  res+='}'
  return res

n=int(input())
ans='{'
for i in range(30):
  if (n>>i)&1:
    if len(ans)!=1:
      ans+=','
    ans+=f(i)

ans+='}'
print(ans)
0