def is_prime(n):
"""Checks if a number is prime."""
if n <= 1:
return False
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
return False
return True
sum_of_primes = 0
primes = []
for i in range(2, 1000):
if is_prime(i):
sum_of_primes += i
primes.append(i)
print(f"The sum of prime numbers under 1000 is: {sum_of_primes}")
print(f"The 10th prime number under 1000 is: {primes[9]}")
ZGVmIGlzX3ByaW1lKG4pOgogICIiIkNoZWNrcyBpZiBhIG51bWJlciBpcyBwcmltZS4iIiIKICBpZiBuIDw9IDE6CiAgICByZXR1cm4gRmFsc2UKICBmb3IgaSBpbiByYW5nZSgyLCBpbnQobioqMC41KSArIDEpOgogICAgaWYgbiAlIGkgPT0gMDoKICAgICAgcmV0dXJuIEZhbHNlCiAgcmV0dXJuIFRydWUKCnN1bV9vZl9wcmltZXMgPSAwCnByaW1lcyA9IFtdCmZvciBpIGluIHJhbmdlKDIsIDEwMDApOgogIGlmIGlzX3ByaW1lKGkpOgogICAgc3VtX29mX3ByaW1lcyArPSBpCiAgICBwcmltZXMuYXBwZW5kKGkpCgpwcmludChmIlRoZSBzdW0gb2YgcHJpbWUgbnVtYmVycyB1bmRlciAxMDAwIGlzOiB7c3VtX29mX3ByaW1lc30iKQpwcmludChmIlRoZSAxMHRoIHByaW1lIG51bWJlciB1bmRlciAxMDAwIGlzOiB7cHJpbWVzWzldfSIpIA==