結果

問題 No.143 豆
ユーザー gemmarogemmaro
提出日時 2019-09-23 20:26:12
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 126 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 11,928 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2023-10-19 08:15:54
合計ジャッジ時間 2,340 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
16,124 KB
testcase_01 RE -
testcase_02 AC 86 ms
16,128 KB
testcase_03 AC 87 ms
16,128 KB
testcase_04 AC 87 ms
16,128 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 84 ms
16,128 KB
testcase_10 RE -
testcase_11 AC 85 ms
16,128 KB
testcase_12 AC 84 ms
16,128 KB
testcase_13 AC 86 ms
16,128 KB
testcase_14 AC 87 ms
16,128 KB
testcase_15 AC 86 ms
16,128 KB
testcase_16 AC 84 ms
16,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k, n, _ = gets.chomp.split.map &:to_i
as = gets.chomp.split.map &:to_i
remain = k * n - as.sum
p (remain < 0) ? p - 1 : remain
0