結果

問題 No.143 豆
ユーザー kuroi_13kuroi_13
提出日時 2017-01-25 14:04:34
言語 Perl
(5.38.2)
結果
AC  
実行時間 6 ms / 1,000 ms
コード長 192 bytes
コンパイル時間 32 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 5,192 KB
最終ジャッジ日時 2023-09-30 16:55:37
合計ジャッジ時間 982 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,172 KB
testcase_01 AC 5 ms
5,124 KB
testcase_02 AC 5 ms
5,104 KB
testcase_03 AC 5 ms
4,936 KB
testcase_04 AC 5 ms
4,940 KB
testcase_05 AC 5 ms
5,152 KB
testcase_06 AC 5 ms
5,032 KB
testcase_07 AC 5 ms
5,040 KB
testcase_08 AC 5 ms
5,052 KB
testcase_09 AC 5 ms
5,120 KB
testcase_10 AC 6 ms
5,180 KB
testcase_11 AC 5 ms
4,916 KB
testcase_12 AC 5 ms
5,184 KB
testcase_13 AC 5 ms
5,192 KB
testcase_14 AC 5 ms
4,944 KB
testcase_15 AC 5 ms
5,072 KB
testcase_16 AC 5 ms
5,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;

my($k, $n, $f) = split ' ', <STDIN>;
my @fl = split ' ', <STDIN>;

my $mame = $k * $n;
my $f_sum = eval join('+', @fl);
print $mame >= $f_sum ? $mame - $f_sum : -1;
0