Submission #2464599
Source Code Expand
"use strict";
function main(input) {
const args = input.split('\n');
const vars = args[0].split(' ');
let a = parseInt(vars[0], 10);
let b = parseInt(vars[1], 10);
let c = parseInt(vars[2], 10);
const k = parseInt(args[1], 10);
for (let i = 0; i < k; i++) {
if (a > b && a > c) {
a *= 2;
} else if (b > a && b > c) {
b *= 2;
} else {
c *= 2;
}
}
console.log(a + b + c);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
Submission Info
| Submission Time | |
|---|---|
| Task | B - Maximum Sum |
| User | kumabook |
| Language | JavaScript (node.js v5.12) |
| Score | 200 |
| Code Size | 500 Byte |
| Status | AC |
| Exec Time | 52 ms |
| Memory | 7372 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | in01.txt, in02.txt, in03.txt, in04.txt, sample_01.txt, sample_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| in01.txt | AC | 52 ms | 7372 KiB |
| in02.txt | AC | 52 ms | 7372 KiB |
| in03.txt | AC | 52 ms | 7372 KiB |
| in04.txt | AC | 52 ms | 7372 KiB |
| sample_01.txt | AC | 52 ms | 7372 KiB |
| sample_02.txt | AC | 52 ms | 7372 KiB |