Skip to content

Solution with 56 Bytes#8

Open
roland-schmitz wants to merge 10 commits into
iCarambaa:masterfrom
roland-schmitz:master
Open

Solution with 56 Bytes#8
roland-schmitz wants to merge 10 commits into
iCarambaa:masterfrom
roland-schmitz:master

Conversation

@roland-schmitz
Copy link
Copy Markdown

@roland-schmitz roland-schmitz commented May 26, 2018

This 56 byte solution Is by far not as readable as Svens solution. The reduce and the idea with the prime factors are from Udos solution. But I choose a different approach:

The reduce starts with 1 and is multiplied with 2 for numbers >= 25 and multiplied with 2 and 3 (=6) for numbers >= 30.
The reduce falls back to 1 if a number is smaller than 25 and 0 is not reached already.
If the reduce is once divisible by 864 which is 22222 * 333 it becomes 0 and does not change its value any more and true is returned.
864 can be interpreted as contains a sequence with 5 numbers >= 25 and at least 3 of them are >= 30.

Includes some improvements from Mathis Müller.

@roland-schmitz roland-schmitz changed the title Solution with 65 Bytes Solution with 64 Bytes May 26, 2018
@roland-schmitz roland-schmitz changed the title Solution with 64 Bytes Solution with 56 Bytes May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant