We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 485358e commit 8c83023Copy full SHA for 8c83023
2501-3000/2864.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def maximumOddBinaryNumber(self, s: str) -> str:
3
+ n = s.count("1")-1
4
+ ans = "1"*n
5
+ ans += "0"*(len(s)-n-1)
6
+ ans += "1"
7
+ return ans
0 commit comments