





"""simple docstring"""






A 			=  range(2, 20 + 1)
A 			=  [10**k for k in range(ks[-1] + 1)]
A 			=  {}

def     __A      (			a_						:Tuple   ,       a_						:Optional[int]   ,       a_						:List[str]   ,       a_						:Optional[int])		->		Optional[int]:
				__a :						List[Any]			       =  sum(a_i[j] for j in range(a_   ,       len(a_)))
				__a :						int			       =  sum(a_i[j] * base[j] for j in range(min(len(a_)   ,       a_)))

				__a       ,						__a :						Any			       =  0, 0
				__a :						str			       =  n - i

				__a :						Tuple			       =  memo.get(a_)

				if sub_memo is not None:
								__a :						Union[str, Any]			       =  sub_memo.get(a_)

								if jumps is not None and len(a_) > 0:
												# find and make the largest jump without going over
												__a :						Any			       =  -1
												for _k in range(len(a_) - 1   ,       -1   ,       -1):
																if jumps[_k][2] <= k and jumps[_k][1] <= max_dn:
																				__a :						List[str]			       =  _k
																				break

												if max_jump >= 0:
																__a       ,						__a       ,						__a :						Optional[Any]			       =  jumps[max_jump]
																# since the difference between jumps is cached, add c
																__a :						List[str]			       =  diff + c
																for j in range(min(a_   ,       len(a_))):
																				__a       ,						__a :						List[str]			       =  divmod(a_   ,       10)
																if new_c > 0:
																				add(a_   ,       a_   ,       a_)

								else:
												__a :						List[str]			       =  []
				else:
								__a :						Any			       =  {c: []}
								__a :						Dict			       =  sub_memo

				if dn >= max_dn or c + diff >= base[k]:
								return diff, dn

				if k > ks[0]:
								while True:
												# keep doing smaller jumps
												__a       ,						__a :						Optional[int]			       =  next_term(a_   ,       k - 1   ,       i + dn   ,       a_)
												diff += _diff
												dn += terms_jumped

												if dn >= max_dn or c + diff >= base[k]:
																break
				else:
								# would be too small a jump, just compute sequential terms instead
								__a       ,						__a :						Tuple			       =  compute(a_   ,       a_   ,       i + dn   ,       a_)
								diff += _diff
								dn += terms_jumped

				__a :						Optional[int]			       =  sub_memo[c]

				# keep jumps sorted by # of terms skipped
				__a :						Union[str, Any]			       =  0
				while j < len(a_):
								if jumps[j][1] > dn:
												break
								j += 1

				# cache the jump for this value digitsum(b) and c
				sub_memo[c].insert(a_   ,       (diff, dn, k))
				return (diff, dn)

def     __A      (			a_						:List[str]   ,       a_						:Optional[Any]   ,       a_						:Dict   ,       a_						:str)		->		Any:
				if i >= n:
								return 0, i
				if k > len(a_):
								a_i.extend([0 for _ in range(k - len(a_))])

				# note: a_i -> b * 10^k + c
				# ds_b -> digitsum(b)
				# ds_c -> digitsum(c)
				__a :						Any			       =  i
				__a       ,						__a       ,						__a :						int			       =  0, 0, 0
				for j in range(len(a_)):
								if j >= k:
												ds_b += a_i[j]
								else:
												ds_c += a_i[j]

				while i < n:
								i += 1
								__a :						str			       =  ds_c + ds_b
								diff += addend
								__a :						str			       =  0
								for j in range(a_):
												__a :						str			       =  a_i[j] + addend
												__a       ,						__a :						str			       =  divmod(a_   ,       10)

												ds_c += a_i[j]

								if addend > 0:
												break

				if addend > 0:
								add(a_   ,       a_   ,       a_)
				return diff, i - start_i

def     __A      (			a_						:Tuple   ,       a_						:Optional[int]   ,       a_						:Dict)		->		List[str]:
				for j in range(a_   ,       len(a_)):
								__a :						List[str]			       =  digits[j] + addend
								if s >= 10:
												__a       ,						__a :						str			       =  divmod(a_   ,       10)
												__a :						Optional[Any]			       =  addend // 10 + quotient
								else:
												__a :						List[Any]			       =  s
												__a :						Optional[Any]			       =  addend // 10

								if addend == 0:
												break

				while addend > 0:
								__a       ,						__a :						Tuple			       =  divmod(a_   ,       10)
								digits.append(a_)

def     __A      (			a_						:int = 10**15)		->		int:
				__a :						str			       =  [1]
				__a :						Any			       =  1
				__a :						List[str]			       =  0
				while True:
								__a       ,						__a :						List[str]			       =  next_term(a_   ,       20   ,       i + dn   ,       a_)
								dn += terms_jumped
								if dn == n - i:
												break

				__a :						int			       =  0
				for j in range(len(a_)):
								a_n += digits[j] * 10**j
				return a_n


if __name__ == "__main__":
		print(F'{solution() = }')






"""simple docstring"""






from math import log

from scipy.constants import Boltzmann, physical_constants

A 			=  300  # TEMPERATURE (unit = K)

def     __A      (			a_						:float   ,       a_						:float   ,       a_						:float   ,       )		->		float:

				if donor_conc <= 0:
								raise ValueError('''Donor concentration should be positive''')
				elif acceptor_conc <= 0:
								raise ValueError('''Acceptor concentration should be positive''')
				elif intrinsic_conc <= 0:
								raise ValueError('''Intrinsic concentration should be positive''')
				elif donor_conc <= intrinsic_conc:
								raise ValueError(
								    '''Donor concentration should be greater than intrinsic concentration''')
				elif acceptor_conc <= intrinsic_conc:
								raise ValueError(
								    '''Acceptor concentration should be greater than intrinsic concentration''')
				else:
								return (
								    Boltzmann
								    * T
								    * log((donor_conc * acceptor_conc) / intrinsic_conc**2)
								    / physical_constants["electron volt"][0]
								)


if __name__ == "__main__":
		import doctest

		doctest.testmod()