770. Convert Decimal to Octal Number
Given a non-negative decimal number N, convert it to its octal representation as a string.
Example 1:
Input:聽17
Output:聽21
Explanation: 17 in decimal is 21 in octal.
Example 2:
Input:聽45
Output: 55
Explanation: 45 in decimal is 55 in octal.
Now Your Turn!
Pick the correct output for the given inputInput: 511
Still unsure what the problem is asking ?
Let鈥檚 go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= N <= 109