結果

問題 No.32 貯金箱の憂鬱
ユーザー arito_asuarito_asu
提出日時 2020-06-05 22:09:10
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 4,628 KB
最終ジャッジ日時 2023-09-30 13:53:43
合計ジャッジ時間 845 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,492 KB
testcase_01 AC 3 ms
4,396 KB
testcase_02 AC 3 ms
4,528 KB
testcase_03 AC 3 ms
4,576 KB
testcase_04 AC 3 ms
4,488 KB
testcase_05 AC 2 ms
4,588 KB
testcase_06 AC 2 ms
4,576 KB
testcase_07 AC 2 ms
4,536 KB
testcase_08 AC 2 ms
4,492 KB
testcase_09 AC 2 ms
4,460 KB
testcase_10 AC 2 ms
4,628 KB
testcase_11 AC 2 ms
4,628 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

my $L = <STDIN>;
my $M = <STDIN>;
my $N = <STDIN>;

my $total = $L * 100 + $M * 25 + $N;

my $b = int($total / 1000);
my $mod = $total % 1000;
my $l = int($mod / 100);
$mod = $mod % 100;
my $m = int($mod / 25);
my $n = $mod % 25;

my $coins = $l + $m + $n;
print $coins;
0