660-Remove-9
Sat 17 May 2025
https://leetcode.com/problems/remove-9
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def newInteger(self, n: int) -> int:
ans = []
while n:
ans.append(str(n % 9))
n //= 9
return ''.join(reversed(ans))
new Solution().newInteger()
Score: 5
Category: leetcode