| Task: | Kertoma |
| Sender: | removed82788 |
| Submission time: | 2022-11-03 17:57:56 +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):
thisislog10 = 0
for i in range(1, n+1):
thisislog10 += log(i, 10)
return thisislog10
def get_counts(num):
nums = [0] * 10
for i in str(num):
nums[int(i)] += 1
return nums
s = sum(counts)
if(s < 10):
for i in range(100):
if get_counts(math.factorial(i)) == counts:
print(i)
break
else:
for i in range(60010):
if(s == ceil(get_log10_power_of_n_factorial(i))):
print(i)
break
