jsadvent/solutions/2015/4.js
2020-12-10 02:33:00 -06:00

13 lines
337 B
JavaScript

const { Glib } = require('../../lib');
module.exports = {
'1': (input) =>
Glib.fromSequence(1)
.filter((number) => `${input}${number}`.md5.startsWith('00000'))
.take(1).string,
'2': (input) =>
Glib.fromSequence(1)
.filter((number) => `${input}${number}`.md5.startsWith('000000'))
.take(1).string,
};