Given an positive integer as input determine if it is a magnanimous number.
A magnanimous number is a number such that any insertion of a
+ sign between any two digits in base 10 results in an expression of a prime integer.
For example 40427 is magnanimous because
4+0427 = 431 is prime 40+427 = 467 is prime 404+27 = 431 is prime 4042+7 = 4049 is prime
You should output two distinct values, one when the input is magnanimous and one when the input is not.
The goal of this contest will be to make the size of the source code written to solve this task, given in bytes, as small as possible.
1 -> True 2 -> True 4 -> True 10 -> False 98 -> True 101 -> True 109 -> False 819 -> False 4063 -> True 40427 -> True 2000221 -> True
1with a plus sign inserted between any two characters (no inserting) can only result in
1, which itself is not prime. \$\endgroup\$
2don't have two digits the set of expressions is empty. All of the members of the empty set are prime. In addition none of them are, but thats besides the point. It is a bit confusing, I'll give you that but I think it makes more sense than the alternatives. \$\endgroup\$