def octal(n):
if n < 8:
return str(n)
else:
return str(octal(n // 8)) + str(n % 8)
n = int(input())
print(octal(n))
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
def octal(n):
if n < 8:
return str(n)
else:
return str(octal(n // 8)) + str(n % 8)
n = int(input())
print(octal(n))