Submission #3089742


Source Code Expand

Copy
var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function(line) {
  lines.push(line);
});

var cntDiv2 = function(a){
    var cnt = 0;
    while(a % 2 === 0){
        cnt++;
        a /= 2;
    }
    return cnt;
}
reader.on('close', function() {
    var N = parseInt(lines[0]);
    var A = lines[1].split(/\s/)
        .map(function(a){ return parseInt(a) })
        .map(function(a){ return cntDiv2(a) });
    console.log(Math.min.apply(null, A));
});

Submission Info

Submission Time
Task ABC081B - Shift only
User my316g
Language JavaScript (node.js v5.12)
Score 200
Code Size 564 Byte
Status
Exec Time 62 ms
Memory 7756 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt
All 200 / 200 sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt 61 ms 7628 KB
2.txt 62 ms 7628 KB
3.txt 62 ms 7756 KB
4.txt 61 ms 7756 KB
5.txt 62 ms 7756 KB
6.txt 61 ms 7756 KB
7.txt 61 ms 7756 KB
sample1.txt 62 ms 7500 KB
sample2.txt 61 ms 7628 KB
sample3.txt 61 ms 7628 KB