loading...

Discussion on: Daily Challenge #152 - Strongest Number in an Interval

Collapse
citizen428 profile image
Michael Kohl

Raku:

sub strongest($a, $b) { 
  max($a..$b, :by({$_.lsb})) 
}

See it in action:

> strongest(1,2);
2
> strongest(5,10);
8
> strongest(48, 56);
48
> strongest(129,193);
192