This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!env perl | |
| use 5.010; | |
| use List::Util qw(sum); | |
| my @m = @ARGV; | |
| if (sum(@m[0..2]) == sum(@m[3..5])) { # 0〜2と3〜5はあんまん | |
| if ($m[6] == $m[7]){ # 6と7もあんまん | |
| say 8; | |
| } else { # 6か7どちらかが肉まん |
NewerOlder