Raslboyy

Y

May 21st, 2021
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def dec_to_7(a: int):
  2.     ans = ''
  3.     while a > 0:
  4.         ans = str(a % 7) + ans
  5.         a //= 7
  6.     return ans
  7.  
  8.  
  9. a = int(input())
  10.  
  11. print(dec_to_7(a))
  12.  
Advertisement
Add Comment
Please, Sign In to add comment