-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbs.py
50 lines (48 loc) · 878 Bytes
/
bs.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
## 1
x = (3*(289**2024)) + (81*(49**121)) - (9 * (16 ** 81)) - 6011
n=[]
while x > 0:
n.append(x % 31)
x //= 31
n = [i if i <= 17 else 0 for i in n]
print(sum(n))
## 10
x = 3*3125**8 + 2*625**7 - 4*625**6 + 3*125**5 - 5*25**4 - 2025
n=[]
while x > 0:
n = [x % 25] + n
x //= 25
print(n.count(0))
print(n)
## 5
x = 5001
while True:
p = 7**100 - x
n = []
while p > 0:
n = [p % 7] + n
p //= 7
if n.count(0) == 5:
print(x)
break
x += 1
## 6
for x in range(2030, 0, -1):
p = 7**91 + 7**160 - x
n = []
while p > 0:
n = [p % 7] + n
p //= 7
if n.count(0) == 70:
print(x)
break
## 7
for x in range(1, 2031):
p = 6**260 + 6**160 + 6**60 - x
n = []
while p > 0:
n = [p % 6] + n
p //= 6
if n.count(0) == 202:
print(x)
break