2023-07-06 23:09:49 +08:00

8 lines
167 B
Python

# 测试用例
assert int('1010', 2) == 10
assert int('FF', 16) == 255
assert int('77', 8) == 63
assert int('10', 10) == 10
assert int('10101', 2) == 21
print('PASS')