cp-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kobejean/cp-library

:heavy_check_mark: cp_library/bit/pack/pack_sm_fn.py

Required by

Verified with

Code

import cp_library.__header__
import cp_library.bit.__header__
import cp_library.bit.pack.__header__
def pack_sm(N: int): s=N.bit_length(); return s,(1<<s)-1
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
             https://kobejean.github.io/cp-library               
'''


def pack_sm(N: int): s=N.bit_length(); return s,(1<<s)-1
Back to top page