Skip to content

Commit b33d90c

Browse files
committed
Time: 5111 ms (8.51%), Space: 17.7 MB (88.3%) - LeetHub
1 parent ec79567 commit b33d90c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution:
2+
def nextBeautifulNumber(self, n: int) -> int:
3+
for i in range(n+1, 1224445):
4+
count = Counter(str(i))
5+
if all(count[d] == int(d) for d in count):
6+
return i

0 commit comments

Comments
 (0)