Perl 6, 36 - 50 = -14 points
{$^a;first {/$a/&&$_%%one ^$_},2..*}
Considering $_%%one ^$_ is the only 2 bytes smaller(削除) smaller (削除ここまで) larger than .is-prime, I think it's worth it for the bonus. This times out for the last test case.
Explanation:
{ } # Anonymous code block
$^a; # Assign input to $a
first ,2..* # Find the first number
{ } # Which
/$a/ # Contains the input
&& # And
$_%%one ^$_ # Is prime
Perl 6, 36 - 50 = -14 points
{$^a;first {/$a/&&$_%%one ^$_},2..*}
Considering $_%%one ^$_ is the only 2 bytes smaller than .is-prime, I think it's worth it for the bonus. This times out for the last test case.
Explanation:
{ } # Anonymous code block
$^a; # Assign input to $a
first ,2..* # Find the first number
{ } # Which
/$a/ # Contains the input
&& # And
$_%%one ^$_ # Is prime
Perl 6, 36 - 50 = -14 points
{$^a;first {/$a/&&$_%%one ^$_},2..*}
Considering $_%%one ^$_ is the only 2 bytes (削除) smaller (削除ここまで) larger than .is-prime, I think it's worth it for the bonus. This times out for the last test case.
Explanation:
{ } # Anonymous code block
$^a; # Assign input to $a
first ,2..* # Find the first number
{ } # Which
/$a/ # Contains the input
&& # And
$_%%one ^$_ # Is prime
Perl 6, 36 - 50 = -14 points
{$^a;first {/$a/&&$_%%one ^$_},2..*}
Considering $_%%one ^$_ is the only 2 bytes smaller than .is-prime, I think it's worth it for the bonus. This times out for the last test case.
Explanation:
{ } # Anonymous code block
$^a; # Assign input to $a
first ,2..* # Find the first number
{ } # Which
/$a/ # Contains the input
&& # And
$_%%one ^$_ # Is prime