Skip to content

Instantly share code, notes, and snippets.

View hitsumabushi's full-sized avatar

hitsumabushi hitsumabushi

  • Tokyo, Japan
View GitHub Profile
@hitsumabushi
hitsumabushi / euler13.py
Created August 4, 2012 06:50
Dayly programing (Project Euler:#13)
ans = 0
arr = """37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
91942213363574161572522430563301811072406154908250
23067588207539346171171980310421047513778063246676
89261670696623633820136378418383684178734361726757
28112879812849979408065481931592621691275889832738
44274228917432520321923589422876796487670272189318
47451445736001306439091167216856844588711603153276
@hitsumabushi
hitsumabushi / euler10.py
Created August 1, 2012 15:34
Dayly programing (Project Euler:#10)
#/usr/bin/python
import math
def is_prime(x):
if x < 0:
x = -x
if x < 2:
return False
# check the case: x=2,3
if x % 2 == 0: