Submission #5993875


Source Code Expand

Copy
#include <iostream>

int main(void) {
  int N;
  std::cin >> N;
  int A;
  int min_num = 0;
  for (int i = 0; i < N; i++) {
    std::cin >> A;
    int num = 0;
    while ((A & 1) == 0) {
      num++;
      A >>= 1;
    }
    if (min_num > num) {
      min_num = num;
    }
  }
  std::cout << min_num;
  return 0;
}

Submission Info

Submission Time
Task ABC081B - Shift only
User arita
Language C++14 (GCC 5.4.1)
Score 0
Code Size 334 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt
All 0 / 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 1 ms 256 KB
2.txt 1 ms 256 KB
3.txt 1 ms 256 KB
4.txt 1 ms 256 KB
5.txt 1 ms 256 KB
6.txt 1 ms 256 KB
7.txt 1 ms 256 KB
sample1.txt 1 ms 256 KB
sample2.txt 1 ms 256 KB
sample3.txt 1 ms 256 KB