-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeow.py
69 lines (61 loc) · 1.05 KB
/
meow.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
meow
"""
import sys
sys.setrecursionlimit(2000)
UNITE = 1
UNITED = 2
meeow = [
[80, 81],
[-4, 13],
[55, 56],
[133, 134],
[-8, -7, -5],
[4, 5],
[5, 6],
[6, 7],
[7, 8],
[15, -1],
[11, 12],
[13, 14],
[17, 18],
[18, 19],
[15, 21],
[22, 23],
[26, 27],
[44, 45],
[48, 49],
[31, -29],
[50, 51],
[60, 61],
[72, 73],
[73, 74],
[19, 2, 20]]
def memoize(f):
memo = {}
def helper(x):
if x not in memo:
memo[x] = f(x)
return memo[x]
return helper
@memoize
def meow(kittens_of_the_world):
"""
meowwwwww meow
"""
print('meowwww ', end='')
if kittens_of_the_world < UNITED:
return kittens_of_the_world
return meow(kittens_of_the_world - UNITE) + meow(kittens_of_the_world - UNITED)
def meowmeow(meow):
"""
meow meow meow
"""
meeoww = ''
for meoww in meeow:
print('meowwww ', end='')
meeoww = f"{meeoww}{chr(int(''.join(str(meow)[m] for m in meoww)))}"
return meeoww
# MEOF