不少题目都是实现吧10进制数转换成x进制数,实际上都是一个套路,下面是7进制的,想换成什么进制,把7替换成相应数字即可,输出的是字符串 16,32进制这种有特殊要求的转不了,其他的应该通用 class Solution(object): def convertToBase7(self, num): """ :type num: int :rtype: str """ if num == 0: return 0 else: res = '' n =…
C - Pashmak and Buses Codeforces Round #261 (Div. 2) C. Pashmak and Buses time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently Pashmak has been employed in a transportation company. The…