結果

問題 No.3654 Cup Ramen
コンテスト
ユーザー tadd
提出日時 2026-08-30 13:53:26
言語 Ruby
(4.0.6)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
WA  
実行時間 -
コード長 235 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 245 ms
コンパイル使用メモリ 8,576 KB
実行使用メモリ 14,464 KB
最終ジャッジ日時 2026-08-30 13:53:31
合計ジャッジ時間 3,165 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:7: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #
raw source code

def sgets = gets.strip
def get_int = Integer(sgets)
def get_list = sgets.split
def get_int_list = get_list.map { Integer(_1) }
def puts_yn(b) = puts(b ? 'Yes' : 'No')

n, x = get_int_list
a = get_int_list
d = a.sum - x
puts [d, 0].min
0