結果

問題 No.1564 Sum of Products of Pairs
ユーザー yuruhiyayuruhiya
提出日時 2021-06-27 09:04:57
言語 Crystal
(1.11.2)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 102 bytes
コンパイル時間 18,351 ms
コンパイル使用メモリ 257,316 KB
実行使用メモリ 26,284 KB
最終ジャッジ日時 2023-09-07 17:10:36
合計ジャッジ時間 21,312 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,384 KB
testcase_01 AC 3 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 31 ms
11,980 KB
testcase_04 AC 5 ms
5,176 KB
testcase_05 AC 41 ms
15,916 KB
testcase_06 AC 29 ms
12,252 KB
testcase_07 AC 18 ms
8,396 KB
testcase_08 AC 11 ms
7,192 KB
testcase_09 AC 20 ms
10,204 KB
testcase_10 AC 42 ms
16,020 KB
testcase_11 AC 46 ms
16,024 KB
testcase_12 AC 30 ms
11,976 KB
testcase_13 AC 3 ms
4,456 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,396 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,388 KB
testcase_18 AC 58 ms
19,496 KB
testcase_19 AC 54 ms
19,540 KB
testcase_20 AC 58 ms
19,432 KB
testcase_21 AC 62 ms
26,256 KB
testcase_22 AC 56 ms
19,260 KB
testcase_23 AC 62 ms
26,284 KB
testcase_24 AC 63 ms
26,284 KB
testcase_25 AC 62 ms
26,220 KB
testcase_26 AC 62 ms
26,264 KB
testcase_27 AC 63 ms
26,156 KB
testcase_28 AC 2 ms
4,388 KB
testcase_29 AC 3 ms
4,384 KB
testcase_30 AC 2 ms
4,384 KB
testcase_31 AC 3 ms
4,380 KB
testcase_32 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = read_line.to_i
a = read_line.split.map(&.to_i64).sort
puts a.each_slice(2).sum { |(i, j)| i * j }
0