23
Zhao Xin
https://www.haoohaoo.com
Last seen 1 year ago
Member for 10 years, 9 months, 8 days
Difficulty Normal
I love coding!
Oh, good, but a little bit too complex ;)
Simple is better than complex - the Zen of Python
加油!
More
Did you mean?
```python
def to_encrypt(text, delta):
cypher = string.ascii_lowercase[delta:] + string.ascii_lowercase[:delta]
transtable = str.maketrans(string.ascii_lowercase, cypher)
return text.translate(transtable)
```
More
almost the same with me:
from datetime import date
def checkio(a, b):
return sum([1 for i in range((b-a).days+1) if (a.weekday()+i)%7>4])
More
for probe_try in previous :
probe_row = probe_try[0]
probe_col = probe_try[1]
dist = probe_try[2]
can be write as:
for probe_y, probe_x, distance in previous:
More
I can not understand all the sulotions including yours :(
I used AStar to treat this qustion as a maze.
More
Why this is not working on my PC? It seems you are to encode all the primes to Chinese. You know, my solution is to encode all digits to "@ABCDEFGHI" :)
More
def checkio(data):
(x1,y1),(x2,y2),(x3,y3) = eval(data)
a = 1.* ((x1**2-x2**2+y1**2-y2**2)*(y1-y3)-(x1**2-x3**2+y1**2-y3**2)*(y1-y2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3))
b = 1.* ((x1**2-x2**2+y1**2-y2**2)*(x1-x3)-(x1**2-x3**2+y1**2-y3**2)*(x1-x2)) / (2*(y1-y2)*(x1-x3)-2*(y1-y3)*(x
More