Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
EgoSay committed Oct 1, 2019
1 parent 12b3e84 commit 217f9ab
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 81~90/089.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
# @Author : adair_chan
# @Email : [email protected]
# @IDE : PyCharm


def encode(num):
s = str(num)
n = ""
for i in range(len(s)):
n += str((int(s[i]) + 5) % 10)
return int(n[::-1])


print(encode(1234))

0 comments on commit 217f9ab

Please sign in to comment.