Submission #1532840


Source Code Expand

function Main(input){
    var input = parseInt(input, 10);
    const num = [1, 2, 4, 8, 16, 32, 64];

    for(var i = num.length - 1; -1 < i; i--){
        if(num[i] <= input){
            console.log(num[i]);
            break;
        }
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission Info

Submission Time
Task B - Break Number
User locol
Language JavaScript (node.js v5.12)
Score 200
Code Size 317 Byte
Status AC
Exec Time 202 ms
Memory 15432 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 17
Set Name Test Cases
Sample example0, example1, example2, example3
All example0, example1, example2, example3, handmade0, handmade1, handmade2, rand0, rand1, rand2, rand3, rand4, rand5, rand6, rand7, rand8, rand9
Case Name Status Exec Time Memory
example0 AC 202 ms 15432 KB
example1 AC 52 ms 7372 KB
example2 AC 52 ms 7372 KB
example3 AC 52 ms 7372 KB
handmade0 AC 52 ms 7372 KB
handmade1 AC 52 ms 7372 KB
handmade2 AC 52 ms 7372 KB
rand0 AC 52 ms 7372 KB
rand1 AC 52 ms 7372 KB
rand2 AC 53 ms 7372 KB
rand3 AC 52 ms 7372 KB
rand4 AC 52 ms 7372 KB
rand5 AC 52 ms 7372 KB
rand6 AC 52 ms 7372 KB
rand7 AC 52 ms 7372 KB
rand8 AC 52 ms 7372 KB
rand9 AC 52 ms 7372 KB