摘要:
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 阅读全文