PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000002. Chia đôi đồng thời (Shift only)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Chia đôi đồng thời (Shift only)
Shift only
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
A blackboard contains positive integers . An operation is allowed only when every number is even. The operation divides all numbers by simultaneously. Find the maximum number of such operations.
Input
The first line contains ; the second contains the integers .
Output
Print the maximum number of operations.
Subtasks
- Subtask 1 (20 points): ;
- Subtask 2 (30 points): ;
- Subtask 3 (50 points): ;
Examples
Input
3
8 12 40
Output
2
Explanation
After two operations the array becomes . Since is odd, no third operation is possible.