提出 #510788
ソースコード 拡げる
(function (str) {
var nums = str.split("\n")[1].split(" ").map(function (num, index, arr) {
num = Number(num);
return num * Math.pow(2, arr.length - index - 1);
});
var sum = nums.reduce(function (a, b) {
return a + b;
}, 0);
console.log(sum);
})
(require("fs").readFileSync("/dev/stdin", "utf8").trim());
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - とても長い数列 |
| ユーザ | ww24 |
| 言語 | JavaScript (Node.js v0.10.36) |
| 得点 | 100 |
| コード長 | 345 Byte |
| 結果 | AC |
| 実行時間 | 183 ms |
| メモリ | 11776 KiB |
ジャッジ結果
| セット名 | Sample | DataSet1 | DataSet2 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 60 / 60 | 40 / 40 | ||||||
| 結果 |
|
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt |
| DataSet1 | sample-01, sample-02, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
| DataSet2 | sample-01.txt, sample-02.txt, sample-03.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, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | AC | 183 ms | 11392 KiB |
| 01-02.txt | AC | 147 ms | 11376 KiB |
| 01-03.txt | AC | 146 ms | 11392 KiB |
| 01-04.txt | AC | 146 ms | 11328 KiB |
| 01-05.txt | AC | 151 ms | 11776 KiB |
| 01-06.txt | AC | 149 ms | 11708 KiB |
| 01-07.txt | AC | 148 ms | 11776 KiB |
| 01-08.txt | AC | 154 ms | 11696 KiB |
| 02-01.txt | AC | 145 ms | 11384 KiB |
| 02-02.txt | AC | 150 ms | 11512 KiB |
| 02-03.txt | AC | 147 ms | 11360 KiB |
| 02-04.txt | AC | 146 ms | 11464 KiB |
| 02-05.txt | AC | 146 ms | 11392 KiB |
| 02-06.txt | AC | 148 ms | 11520 KiB |
| 02-07.txt | AC | 147 ms | 11392 KiB |
| 02-08.txt | AC | 145 ms | 11360 KiB |
| sample-01.txt | AC | 149 ms | 11348 KiB |
| sample-02.txt | AC | 149 ms | 11708 KiB |
| sample-03.txt | AC | 148 ms | 11520 KiB |