P25291 [AtCoder] Price Tags
普及
题目描述

Problem Description

Snuke is planning to open a shop. He plans to sell $ N $ items. The $ i $th item will be sold for $ p_i $ yen.

Snuke feels it is cumbersome to write many trailing 0s for each price, so he decided to remove the same number of trailing 0s from the price tags of all $ N $ items and compensate for them during checkout.

Determine the maximum number of trailing 0s that can be removed from each price tag.

Input Format

The input is given from the standard input in the following format:

$ N $ $ p_1 $ : $ p_N $

Output Format

Output the maximum number of trailing 0s that can be removed from each price tag.

Sample Input and Output

Sample Input #1

4
300
250
6000
730

Sample Output #1

1

Sample Input #2

5
10000000
30000000
150000000
200000000
990000000

Sample Output #2

7

Sample Input #3

4
100101100
110010000
100001001
110011000

Sample Output #3

0

Notes/Hints

Constraints

  • $1 \leq N \leq 100$
  • $1 \leq p_i \leq 10^9$
  • $ p_i $ is an integer

Sample Explanation 1

Each price can have one trailing 0 removed, resulting in price tags reading $ 30 $, $ 25 $, $ 600 $, and $ 73 $ respectively.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4 300 250 6000 730
样例输出
1