Exemple #1
0
def main():
    s, i, n = 0, 0, -1
    while n < 4000000:
        n, i = fibonacci(i), i + 1
        if n % 2 == 0:
            s += n
    print s
    return 0
Exemple #2
0
def main():
    i = 0
    while len(str(fibonacci(i))) < 1000:
        i += 1
    print i - 1
    return 0