#
#                 God Bless No Bugs!
#
#                       _ooOoo_
#                      o8888888o
#                      88" . "88
#                      (| -_- |)
#                      O\  =  /O
#                   ____/`---'\____
#                 .'  \\|     |//  `.
#                /  \\|||  :  |||//  \
#               /  _||||| -:- |||||-  \
#               |   | \\\  -  /// |   |
#               | \_|  ''\---/''  |   |
#               \  .-\__  `-`  ___/-. /
#             ___`. .'  /--.--\  `. . __
#          ."" '<  `.___\_<|>_/___.'  >'"".
#         | | :  `- \`.;`\ _ /`;.`/ - ` : | |
#         \  \ `-.   \_ __\ /__ _/   .-` /  /
#    ======`-.____`-.___\_____/___.-`____.-'======
#                       `=---='
#    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
# coding: utf-8 #
#  author:李斌  #
"""
计算2000000以内的素数之和
"""
import math


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


def prime_sum():
    total = 2
    for next_prime in get_prime(3):
        if next_prime < 2000000:
            total += next_prime
        else:
            print(total)
            return


if __name__ == '__main__':
    prime_sum()

f8f281c8a697771467d4665c5a7393dd6e84cf40
<mask token>


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


<mask token>

<mask token>


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


def prime_sum():
    total = 2
    for next_prime in get_prime(3):
        if next_prime < 2000000:
            total += next_prime
        else:
            print(total)
            return


<mask token>

<mask token>


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


def prime_sum():
    total = 2
    for next_prime in get_prime(3):
        if next_prime < 2000000:
            total += next_prime
        else:
            print(total)
            return


if __name__ == '__main__':
    prime_sum()

<mask token>
import math


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


def prime_sum():
    total = 2
    for next_prime in get_prime(3):
        if next_prime < 2000000:
            total += next_prime
        else:
            print(total)
            return


if __name__ == '__main__':
    prime_sum()

#
#                 God Bless No Bugs!
#
#                       _ooOoo_
#                      o8888888o
#                      88" . "88
#                      (| -_- |)
#                      O\  =  /O
#                   ____/`---'\____
#                 .'  \\|     |//  `.
#                /  \\|||  :  |||//  \
#               /  _||||| -:- |||||-  \
#               |   | \\\  -  /// |   |
#               | \_|  ''\---/''  |   |
#               \  .-\__  `-`  ___/-. /
#             ___`. .'  /--.--\  `. . __
#          ."" '<  `.___\_<|>_/___.'  >'"".
#         | | :  `- \`.;`\ _ /`;.`/ - ` : | |
#         \  \ `-.   \_ __\ /__ _/   .-` /  /
#    ======`-.____`-.___\_____/___.-`____.-'======
#                       `=---='
#    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
# coding: utf-8 #
#  author:李斌  #
"""
计算2000000以内的素数之和
"""
import math


def is_prime(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


def get_prime(number):
    while True:
        if is_prime(number):
            yield number
        number += 1


def prime_sum():
    total = 2
    for next_prime in get_prime(3):
        if next_prime < 2000000:
            total += next_prime
        else:
            print(total)
            return


if __name__ == '__main__':
    prime_sum()
