标签:self lis http res sel loading rgba class elf
?这是啥算法题。。
逐个判断写个循环即可
class Solution: def fizzBuzz(self, n: int) -> List[str]: result = [] for i in range(1,n+1): if i % 3 == 0 and i % 5 == 0 : result.append(‘FizzBuzz‘) elif i%3==0: result.append(‘Fizz‘) elif i%5==0: result.append(‘Buzz‘) else: result.append(str(i)) return result
标签:self lis http res sel loading rgba class elf
原文地址:https://www.cnblogs.com/cbachen/p/14867481.html