Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projecteuler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
projecteuler
Commits
adfe6355
Commit
adfe6355
authored
Dec 01, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some common functions to 'utils'
parent
21186ede
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
problem92.py
problem92.py
+1
-2
utils.py
utils.py
+3
-0
No files found.
problem92.py
View file @
adfe6355
#!/usr/bin/env python
#!/usr/bin/env python
def
digits
(
n
):
from
utils
import
digits
return
[
n
]
if
n
<
10
else
digits
(
n
/
10
)
+
[
n
%
10
]
def
quad
(
n
):
def
quad
(
n
):
return
n
*
n
return
n
*
n
...
...
utils.py
View file @
adfe6355
def
digits
(
n
):
return
[
n
]
if
n
<
10
else
digits
(
n
/
10
)
+
[
n
%
10
]
def
_gcd
(
a
,
b
):
def
_gcd
(
a
,
b
):
while
b
:
while
b
:
a
,
b
=
b
,
a
%
b
a
,
b
=
b
,
a
%
b
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment