| Task: | Kertoma | 
| Sender: | removed82788 | 
| Submission time: | 2022-11-03 18:20:52 +0200 | 
| Language: | Python3 (CPython3) | 
| Status: | SKIPPED | 
Code
counts = [int(x) for x in input().split(" ")]
from math import ceil, log
import math
def get_log10_power_of_n_factorial(n):
    return math.lgamma(n)
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
