pull down to refresh
I think it's an impossible problem to solve!
What's wrong with either of my solutions?
In this sentence, the number of occurences
of the digit 0 is 1,
of the digit 1 is 2,
of the digit 2 is 3,
of the digit 3 is 2,
of even numbers is 5, <----
of odd numbers is 6,
and of prime numbers is 7.
In this sentence, the number of occurences
of the digit 0 is 1,
of the digit 1 is 2,
of the digit 2 is 3,
of the digit 3 is 2,
of even numbers is 6, <----
of odd numbers is 5,
and of prime numbers is 6.
I'm considering that 0 is neither even nor odd
I think zero is generally considered even as it can be divided by two without remainder.
Since the number zero is even, both are correct!
Yes, there should be two valid solutions.
I'll post the reasoned solution to this problem at the same I post the next problem tomorrow.
I like brute force solving problems in my daytime job. It's sometimes so much faster.
This would be an impossible variant to this self-referential problem:
"In this sentence, the number of occurences of the digit 0 is ______, of the digit 1 is ______, of the digit 2 is ______, of even numbers is ______, of odd numbers is ______, and of prime numbers is ______."
(notice the omission of the digit 3 part)
Code here
Brute force finds two solutions:
1 2 3 2 5 6 7
1 2 3 2 6 5 6