09 2022 档案
摘要:class Solution: def sortSentence(self, s: str) -> str: words = s.split() li = ['']*len(words) for i in words: li[int(i[-1])-1]=i[0:-1] return " ".join
阅读全文
摘要:class Solution: def sumBase(self, n: int, k: int) -> int: tag = True quotient = n//k #商 remainder = n%k #余数 while tag: if quotient >= k: remainder+=qu
阅读全文
摘要:class Solution: def minOperations(self, logs: List[str]) -> int: result=0 for i in range(0,len(logs)): if logs[i]=='../': if result>0: result-=1 elif
阅读全文
摘要:class Solution: def reorderSpaces(self, text: str) -> str: count=text.count(' ') #字符串中空格的数量 li=text.split() #默认以【空格、tab、换行、回车以及formfeed】为分隔符,将字符串分割为一个
阅读全文

浙公网安备 33010602011771号