提出 #808064
ソースコード 拡げる
function main(input) {
var ans = 0;
input = input.split("\n");
var n = input[0];
var skewers = input[1].split(" ");
for (var i = 0; i < skewers.length; i++) {
skewers[i] = parseInt(skewers[i]);
}
skewers.sort(function(a, b){return a-b});
for (var i = 0; i < n; i++) {
ans += skewers[2*i];
}
console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - BBQ Easy |
| ユーザ | tom_mol |
| 言語 | JavaScript (node.js v5.12) |
| 得点 | 200 |
| コード長 | 439 Byte |
| 結果 | AC |
| 実行時間 | 111 ms |
| メモリ | 6904 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | AC | 111 ms | 6904 KiB |
| 01-02.txt | AC | 111 ms | 6904 KiB |
| 01-03.txt | AC | 107 ms | 6904 KiB |
| 01-04.txt | AC | 106 ms | 6904 KiB |
| 01-05.txt | AC | 106 ms | 6904 KiB |
| 01-06.txt | AC | 110 ms | 6904 KiB |
| 01-07.txt | AC | 110 ms | 6904 KiB |
| 01-08.txt | AC | 106 ms | 6904 KiB |
| sample-01.txt | AC | 106 ms | 6904 KiB |
| sample-02.txt | AC | 111 ms | 6904 KiB |