Unify template to be similar to the Python one
This commit is contained in:
parent
63ef2fe6b5
commit
75d29d32e6
@ -3,9 +3,9 @@
|
||||
Creation of templates for the problems of Project Euler
|
||||
"""
|
||||
|
||||
from argparse import ArgumentParser
|
||||
import datetime
|
||||
import inspect
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
def create_problem():
|
||||
@ -18,13 +18,13 @@ def create_problem():
|
||||
@author: David Doblas Jiménez
|
||||
@email: daviddoji@pm.me
|
||||
|
||||
Solution for Problem {args['problem']} of Project Euler
|
||||
Solution for Problem {args['problem']:0>3} of Project Euler
|
||||
https://projecteuler.net/problem={args['problem']}
|
||||
=#
|
||||
|
||||
using BenchmarkTools
|
||||
|
||||
function Problem{args['problem']}()
|
||||
function Problem{args['problem']:0>3}()
|
||||
#=
|
||||
Statement
|
||||
=#
|
||||
@ -34,18 +34,17 @@ def create_problem():
|
||||
end
|
||||
|
||||
|
||||
println("Time to evaluate Problem $(lpad({args['problem']}, 3, "0")):")
|
||||
@btime Problem{args['problem']}()
|
||||
println("Took:")
|
||||
@btime Problem{args['problem']:0>3}()
|
||||
println("")
|
||||
println("Result for Problem $(lpad({args['problem']}, 3, "0")): ", Problem{args['problem']}())
|
||||
"""
|
||||
println("Result for Problem $(lpad({args['problem']}, 3, "0")): ", Problem{args['problem']:0>3}())
|
||||
""" # noqa: E501
|
||||
)
|
||||
|
||||
f.write(template)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
today = datetime.datetime.now().strftime("%d %b %Y")
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
# Add your arguments here
|
||||
|
Loading…
x
Reference in New Issue
Block a user