Python 80
[Python 100] Python 100
(Python 2.0+)
#!/usr/bin/python
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
i = 0
j = 1
x = 0
while (i < 5) :
x = 4 * j
for i in range(0,5) :
if(x%4 != 0) :
break
else :
i += 1
x = (x/4) * 5 +1
j += 1
print x
3121
[Python 100] Python 100
253***[email protected]
# coding:utf-8 # # 4x, num=int(input(":")) def fn(n): if n==num: return(4*x) # else: return(fn(n+1)*5/4+1) x=1 while 1: count=0 for i in range(1,num): if fn(i)%4==0 : count=count+1 if count==num-1: print("%d" % int(fn(0))) break else: x=x+1253***[email protected]
488***[email protected]
start,end,m1=0,100,0 while m1==0: end=end*2 for i in range(start,end): m5=5*i+1 if m5%4==0: m4=(m5/4)*5+1 if m4%4==0: m3=(m4/4)*5+1 if m3%4==0: m2=(m3/4)*5+1 if m2%4==0: m1=(m2/4)*5+1 break start=i print("%d" % m1)488***[email protected]