Task: | Kertoma |
Sender: | removed82788 |
Submission time: | 2022-11-03 18:26:47 +0200 |
Language: | Python3 (CPython3) |
Status: | BUSTED |
Code
counts = [int(x) for x in input().split(" ")] from math import ceil import math def get_log10_power_of_n_factorial(n): return math.lgamma(n+1) * math.log10(math.e) def get_counts(num): nums = [0] * 10 for i in str(num): nums[int(i)] += 1 return nums s = sum(counts) if(s < 5): for i in range(100): if get_counts(math.factorial(i)) == counts: print(i) break else: for i in range(1, 60010): if(s == ceil(get_log10_power_of_n_factorial(i))): print(i) break