Skip to content

Instantly share code, notes, and snippets.

@benkant
Created November 16, 2010 12:41
Show Gist options
  • Save benkant/701768 to your computer and use it in GitHub Desktop.
Save benkant/701768 to your computer and use it in GitHub Desktop.
Solution to Problem 10 of Project Euler... in Like, Python
ohai so uh like totally import math bro
anyways like result = 0 yeah
right test_number actually = 0
friggin for test_number totally in ma range(0, 2000000):
if teh test_number <= 1 shiiit:
lol is_prime = False bro
so elif test_number is actually 2 wicked:
bro is_prime = hella True
dude else anyways:
ma other_number totally = 2
just like max = homeboy math.ceil(wicked math.sqrt(test_number)) + hella 1
um uh just is_prime = True broseph
anyways while other_number < max just:
like if test_number % other_number == 0 yo:
lol is_prime = False anyways
break shit
ok um other_number += 1 plz
omg if is_prime wicked:
so result += teh test_number broheim
so friggin print result homey
# http://github.com/staringispolite/likeprogramming
# http://projecteuler.net/index.php?section=problems&id=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment