web05302
发表于 2018-2-5 14:48:23
好难
lohas.py
发表于 2018-2-5 19:38:37
>> a=-1
>>> k=1
>>> while k == 135135:
k=a*(a+2)*(a+4)*(a+6)*(a+8)*(a+10)
if k == 13135:
print(a)
a=a+2
栀夏
发表于 2018-2-5 21:43:20
num=1
for i in range(1,135136,2):
for j in range(0,11,2):
num*=(i+j)
if(num==135135):
break
num=1
print(i)
125zl
发表于 2018-2-6 01:11:38
for i in range(1,100,2):
c = 1
for j in range(6):
c = c * ( i + 2 * j)
if c == 135135:
print(i)
break
饼饼呀
发表于 2018-2-6 11:46:35
饼饼呀 发表于 2018-2-2 19:47
for num1 in range(0,100):
num1 / 2 != 0
num2 = num1 + 2
谢谢版主。
spiro
发表于 2018-2-6 15:04:34
def diGui(start):
sum = 1
for x in range(start,start + 12,2):
sum = sum * x
if sum == 135135:
print(start)
else:
start = start + 2
diGui(start)
num = 135135
kaifang = int(num ** (1/6))
start = 0
if (kaifang - 6) > 0 and (kaifang % 2 == 1):
start = kaifang - 6
else:
start = 1
diGui(start)
我爱鲁能
发表于 2018-2-6 15:26:23
本帖最后由 我爱鲁能 于 2018-2-6 15:56 编辑
def calculate(number):
i=-1
result=0
while True:
if result==number:
break
else:
i+=2
result=i*(i+2)*(i+4)*(i+6)*(i+8)*(i+10)
return i
print('第一个数是%d' %calculate(135135))
琅玡
发表于 2018-2-7 10:12:08
def calc(i):
return (i * (i+2) * (i+4) * (i+6) * (i+8) * (i+10))
def main():
i = 1
while True:
if calc(i) == 135135:
print('i的最小值为:', i)
break
else:
i += 2
if __name__ == '__main__':
main()
最终结果是:3
251307809
发表于 2018-2-7 11:15:18
x = 1
while 1:
if x * (x+2) * (x+4) * (x+6) * (x+8) * (x+10) == 135135:
print(x)
break
else:
x = x+1
3
dunhee
发表于 2018-2-7 14:42:16
def minOdd(p = 135135, n = 6):
y = int(p**(1/n))//2*2+1
for x in range(y, 1, -2):
q = 1
for i in range(n):
q *= x + 2*i
if q == p:
return x
int_lyc
发表于 2018-2-7 16:55:01
def mix(mi):
mixture = 1
for i in range(6):
mixture *= mi
mi += 2
return mixture
for j in range(1,1000,2):
if mix(j) == 135135:
print(j)
break
3
checkily
发表于 2018-2-8 09:45:55
我是初学者
def fun1():
lis1=
for each in lis1:
if each*(each+2)*(each+4)*(each+6)*(each+8)*(each+10)==135135:
print(each)
break
fun1()
冷小漠
发表于 2018-2-8 13:16:39
看了一些答案,大多数只考虑了正奇数。。。那么负的答案是否会更小,更符合题意?
冬雪雪冬
发表于 2018-2-8 13:35:00
冷小漠 发表于 2018-2-8 13:16
看了一些答案,大多数只考虑了正奇数。。。那么负的答案是否会更小,更符合题意?
是的,6个连续负奇数也可以,题目应该说明只考虑正数就严谨了。
cr161680
发表于 2018-2-8 18:47:43
i = 1
while (i * (i + 2) * (i + 4) * (i + 6) * (i + 8) * (i + 10)) != 135135 :
i += 2
print(i)
凌九霄
发表于 2018-3-28 01:12:21
x = 1
while x * (x + 2) * (x + 4) * (x + 6) * (x + 8) * (x + 10) != 135135:
x += 2
print(x)
hxgoto
发表于 2018-4-11 19:57:19
i =1
ls = []
prod = 0
while True:
ls.append(i)
if len(ls) == 6:
prod =ls*ls*ls*ls*ls*ls
if prod ==135135:
print(ls)
print('最小的奇数是:',min(ls))
break
else:
del ls
i += 2
凌九霄
发表于 2018-4-30 14:03:46
n = 1
while True:
if n * (n + 2) * (n + 4) * (n + 6) * (n + 8) * (n + 10) != 135135:
n += 1
else:
print(n)
break
新手潘包邮
发表于 2018-5-9 06:52:18
def fun(num):
num_list =
#return num_list
for i in num_list:
count = 1
a= i+2
while a in num_list:
count += 1
a += 2
if count >= 5:
return i
pass
fun(135135)
foxiangzun
发表于 2019-1-9 17:40:31
for i in range(11) :
if i * (i + 2) * (i + 4) * (i + 6) * (i + 8) * (i + 10) == 135135 :
print(i)