use strict; use warnings; # https://yukicoder.me/problems/5 # my $input = "133 # 43 # 115 # "; my $input = <>; chomp $input; my $hash_ref; my @array = split /\n/, $input; chomp( @array ); my $sum = $array[0] * 100 + $array[1] * 25 + $array[2]; my $coins = $sum % 1000; my $coin_100 = int( $coins / 100 ); my $coin_25 = int( ( $coins - $coin_100 * 100 ) / 25 ); my $coin_1 = int( ( $coins - ( $coin_100 * 100 ) - ( $coin_25 * 25 ) ) ); print $coin_100 + $coin_25 + $coin_1 , "\n";