結果
問題 |
No.851 テストケース
|
ユーザー |
|
提出日時 | 2019-11-02 07:58:19 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 90 ms / 3,153 ms |
コード長 | 316 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,160 KB |
最終ジャッジ日時 | 2024-09-14 23:02:37 |
合計ジャッジ時間 | 3,093 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.chomp.to_i a0 = gets.chomp.split if a0.size > 1 p "assert" exit end a0 = a0[0].to_i a_s = [a0] (n - 1).times { a = gets.chomp.to_i a_s << a } def sum_of_2 l s = [] l.combination(2) {|a, b| s << a + b } s end sum_s = sum_of_2 a_s sum_s = sum_s.sort.uniq p sum_s[-2]