#P336. 末尾的0
末尾的0
Background
Special for beginners, ^_^
Description
现有一数组 ,且 ,其中 。
给出1个 ,求出 到 中所有元素之积的末尾有几个连续0。
Format
Input
两个整数 和 。
Output
到 中所有元素之积的末尾有几个连续0。
Samples
3 34
9
Samples Explanation
数组 为{1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100}。
各项之积为174548867015437739741494347897360069928419328000000000,末尾有连续的9个0。
Limitation
Statistics
Related
In following contests: