mirror of
https://bitbucket.org/Mattrixwv/projecteulerlua.git
synced 2025-12-06 17:43:57 -05:00
Updated problems to be more in line with conventions
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
--ProjectEuler/lua/Problem24.lua
|
||||
--Matthew Ellison
|
||||
-- Created: 03-24-19
|
||||
--Modified: 03-28-19
|
||||
--Modified: 06-19-20
|
||||
--What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
|
||||
--All of my requires, unless otherwise listed, can be found at https://bitbucket.org/Mattrixwv/luaClasses
|
||||
--[[
|
||||
Copyright (C) 2019 Matthew Ellison
|
||||
Copyright (C) 2020 Matthew Ellison
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -29,14 +29,14 @@ NEEDED_PERM = 1000000; --The number of the permutation that you need
|
||||
|
||||
|
||||
--Setup the variables
|
||||
timer = Stopwatch:create();
|
||||
nums = "0123456789";
|
||||
local timer = Stopwatch:create();
|
||||
local nums = "0123456789";
|
||||
|
||||
--Start the timer
|
||||
timer:start();
|
||||
|
||||
--Get all permutations of the string
|
||||
permutations = getPermutations(nums);
|
||||
local permutations = getPermutations(nums);
|
||||
|
||||
--Stop the timer
|
||||
timer:stop();
|
||||
|
||||
Reference in New Issue
Block a user