結果

問題 No.662 スロットマシーン
ユーザー tailstails
提出日時 2018-03-09 22:41:15
言語 Perl
(5.38.2)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 5,304 KB
実行使用メモリ 4,896 KB
最終ジャッジ日時 2023-07-31 13:24:24
合計ジャッジ時間 1,279 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,644 KB
testcase_01 AC 2 ms
4,748 KB
testcase_02 AC 3 ms
4,636 KB
testcase_03 AC 2 ms
4,612 KB
testcase_04 AC 3 ms
4,692 KB
testcase_05 AC 3 ms
4,744 KB
testcase_06 AC 3 ms
4,776 KB
testcase_07 AC 3 ms
4,700 KB
testcase_08 AC 4 ms
4,864 KB
testcase_09 AC 6 ms
4,788 KB
testcase_10 AC 5 ms
4,896 KB
testcase_11 AC 5 ms
4,892 KB
testcase_12 AC 6 ms
4,628 KB
testcase_13 AC 6 ms
4,644 KB
testcase_14 AC 6 ms
4,704 KB
testcase_15 AC 6 ms
4,792 KB
testcase_16 AC 3 ms
4,760 KB
testcase_17 AC 6 ms
4,700 KB
testcase_18 AC 5 ms
4,688 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

for$i(0..4){
	$_=<>;
	/ /;
	$i[$i]=$`;
	$a{$`}=$';
	$b{$`}=5;
}
$d=1;
for(1..3){
	%c=();
	$e=<>;
	$d*=$e;
	for(1..$e){
		$_=<>;
		chop;
		++$c{$_};
	}
	for(@i){
		$b{$_}*=$c{$_};
	}
}
for(@i){
	$f+=$a{$_}*$b{$_};
}
print$f/$d,$/;
for(@i){
	print$b{$_},$/;
}
0