Skip to content
loading...

re: Daily Challenge #152 - Strongest Number in an Interval VIEW POST

FULL DISCUSSION
 

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
code of conduct - report abuse