8 lines
167 B
Python
Raw Normal View History

2023-03-17 14:28:10 +08:00
# 测试用例
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')