結果

問題 No.1564 Sum of Products of Pairs
ユーザー simansiman
提出日時 2021-06-29 14:57:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 206 ms / 2,000 ms
コード長 101 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 11,172 KB
実行使用メモリ 31,588 KB
最終ジャッジ日時 2023-09-08 00:29:19
合計ジャッジ時間 6,881 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,152 KB
testcase_01 AC 77 ms
15,140 KB
testcase_02 AC 77 ms
15,044 KB
testcase_03 AC 142 ms
22,932 KB
testcase_04 AC 85 ms
15,660 KB
testcase_05 AC 159 ms
25,660 KB
testcase_06 AC 131 ms
22,096 KB
testcase_07 AC 112 ms
19,656 KB
testcase_08 AC 97 ms
17,460 KB
testcase_09 AC 115 ms
19,988 KB
testcase_10 AC 162 ms
25,720 KB
testcase_11 AC 167 ms
26,920 KB
testcase_12 AC 144 ms
23,192 KB
testcase_13 AC 78 ms
15,144 KB
testcase_14 AC 77 ms
15,152 KB
testcase_15 AC 77 ms
15,364 KB
testcase_16 AC 77 ms
15,164 KB
testcase_17 AC 77 ms
15,036 KB
testcase_18 AC 203 ms
31,128 KB
testcase_19 AC 199 ms
30,228 KB
testcase_20 AC 202 ms
31,096 KB
testcase_21 AC 204 ms
31,424 KB
testcase_22 AC 197 ms
30,412 KB
testcase_23 AC 205 ms
31,588 KB
testcase_24 AC 205 ms
31,580 KB
testcase_25 AC 206 ms
31,412 KB
testcase_26 AC 205 ms
31,420 KB
testcase_27 AC 204 ms
31,388 KB
testcase_28 AC 77 ms
15,332 KB
testcase_29 AC 76 ms
15,260 KB
testcase_30 AC 75 ms
15,156 KB
testcase_31 AC 76 ms
15,160 KB
testcase_32 AC 76 ms
15,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = gets.split.map(&:to_i).sort.reverse

puts A.each_slice(2).map { |a, b| a * b }.sum
0