結果

問題 No.851 テストケース
ユーザー yumechi
提出日時 2019-12-25 13:30:08
言語 Ruby
(3.4.1)
結果
AC  
実行時間 87 ms / 3,153 ms
コード長 220 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-09-24 23:08:25
合計ジャッジ時間 2,714 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

def s()
  n = gets.to_i
  a = gets
  if a.count(" ") > 0
    return '"assert"'
  end
  a = a.to_i
  b, c = gets.to_i, gets.to_i
  s = [a+b,b+c,c+a].sort
  if s[1] == s[2]
    return s[0]
  end
  return s[1]
end

puts s()
0