結果

問題 No.1374 Absolute Game
ユーザー simansiman
提出日時 2021-03-23 11:22:57
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 143 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 11,384 KB
実行使用メモリ 23,812 KB
最終ジャッジ日時 2023-08-16 13:53:32
合計ジャッジ時間 5,721 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,132 KB
testcase_01 AC 81 ms
15,232 KB
testcase_02 AC 77 ms
15,152 KB
testcase_03 AC 78 ms
15,164 KB
testcase_04 AC 78 ms
15,300 KB
testcase_05 WA -
testcase_06 AC 77 ms
15,296 KB
testcase_07 WA -
testcase_08 AC 98 ms
17,080 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 116 ms
19,584 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 148 ms
23,576 KB
testcase_16 WA -
testcase_17 AC 154 ms
23,704 KB
testcase_18 WA -
testcase_19 AC 149 ms
23,812 KB
testcase_20 AC 102 ms
18,104 KB
testcase_21 AC 111 ms
19,300 KB
testcase_22 AC 150 ms
23,240 KB
testcase_23 AC 86 ms
15,720 KB
testcase_24 WA -
testcase_25 AC 89 ms
16,384 KB
testcase_26 AC 101 ms
17,788 KB
testcase_27 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
C = gets.split.map(&:to_i).sort
S = C.sum

a = 0
b = 0

C.each_slice(2) do |x, y|
  a += x
  b += y if y
end

puts a.abs - b.abs
0