結果

問題 No.32 貯金箱の憂鬱
ユーザー togaerrortogaerror
提出日時 2015-04-09 16:32:04
言語 Perl
(5.38.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 362 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 5,016 KB
最終ジャッジ日時 2023-09-30 07:49:02
合計ジャッジ時間 1,268 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,016 KB
testcase_01 AC 5 ms
5,004 KB
testcase_02 AC 5 ms
5,016 KB
testcase_03 AC 5 ms
4,948 KB
testcase_04 AC 5 ms
4,952 KB
testcase_05 AC 4 ms
4,812 KB
testcase_06 AC 5 ms
4,876 KB
testcase_07 AC 5 ms
4,832 KB
testcase_08 AC 5 ms
4,816 KB
testcase_09 AC 5 ms
4,880 KB
testcase_10 AC 4 ms
4,816 KB
testcase_11 AC 5 ms
4,948 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/uer/bin/perl

use strict;
use warnings;

my $l = <>;
my $m = <>;
my $n = <>;

if($n >= 25) {
	my $ans = $n / 25;
	$ans = int $ans;
	$m += $ans;
	$n -= $ans * 25;
}
if($m >= 4) {
	my $ans = $m / 4;
	$ans = int $ans;
	$l += $ans;
	$m -= $ans * 4;
}
if($l >= 10) {
	my $ans = $l / 10;
	$ans = int $ans;
	$l -= $ans * 10;
}

print $l + $m + $n;
print "\n";

exit;
0