1
0

b93: speed

This commit is contained in:
2018-01-02 19:41:41 +01:00
parent 89f2e3e5c5
commit cb816b5dd7
7 changed files with 166 additions and 54 deletions

View File

@@ -35,6 +35,17 @@ class Euler
return array_map('self::readSingle', $files);
}
public static function getEulerProblemFromStrIdent($ident)
{
$e = explode('-', $ident, 2);
if (count($e)!==2) return null;
$i = intval($e[1], 10);
if ($i == 0) return null;
return self::getEulerProblem($i);
}
public static function getEulerProblem($num)
{
foreach (self::listAll() as $ep) {