use strict; use warnings; use utf8; my $arg = ; chomp $arg; my ($A, $B) = split /\s/, $arg; my $max = 0; for (my $i = 0; $i <= $A; $i++) { for (my $j = 0; $j <= $B; $j++) { my $min = $i; if ($min > $j) { $min = $j; } if ($min > ($i^$j)) { $min = ($i^$j); } if ($min > $max) { $max = $min; } } } print "$max\n";