01 2018 档案
摘要:Factorial of an integer is defined by the following function f(0) = 1 f(n) = f(n - 1) * n, if(n > 0) So, factorial of 5 is 120. But in different bases
阅读全文
摘要:Given an integer N, you have to prime factorize N! (factorial N). Input Input starts with an integer T (≤ 125), denoting the number of test cases. Eac
阅读全文
摘要:You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For e
阅读全文
摘要:Find the number of trailing zeroes for the following function: nCr * pq where n, r, p, q are given. For example, if n = 10, r = 4, p = 1, q = 1, then
阅读全文
摘要:In a strange planet there are n races. They are completely different as well as their food habits. Each race has a food-eating period. That means the
阅读全文