use strict; use warnings; use v5.16; # https://yukicoder.me/problems/5 # my $input = "7 # 20 # 10 # "; my $L = <>; my $M = <>; my $N = <>; chomp( $L, $M, $N ); my $sum = $L * 100 + $M * 25 + $N; 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";