






"""simple docstring"""







from __future__ import annotations

from functools import lru_cache
from math import ceil

_lowerCAmelCase            =	1_00

_lowerCAmelCase            =	set(range(3, NUM_PRIMES, 2))
primes.add(2)
_lowerCAmelCase            =	42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
				if prime not in primes:
								continue
				primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))


@lru_cache(maxsize=100 )
def      UpperCamelCase       ( _A )     ->       set[int]:
				if number_to_partition < 0:
								return set()
				elif number_to_partition == 0:
								return {1}

				lowercase    :      set[int]       = set()
				lowercase    :      int
				lowercase    :      int

				for prime in primes:
								if prime > number_to_partition:
												continue
								for sub in partition(number_to_partition - prime ):
												ret.add(sub * prime )

				return ret


def      UpperCamelCase       ( _A = 5_000 )     ->       int | None:
				for number_to_partition in range(1  ,				_A ):
								if len(partition(_A ) ) > number_unique_partitions:
												return number_to_partition
				return None


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








"""simple docstring"""







import math
import random


def      UpperCamelCase       ( _A  ,				_A = False )     ->       float:
				if deriv:
								return value * (1 - value)
				return 1 / (1 + math.exp(-value ))


# Initial Value
_lowerCAmelCase            =	0.02


def      UpperCamelCase       ( _A  ,				_A )     ->       float:
				lowercase    :      Any       = float(2 * (random.randint(1  ,				100 )) - 1 )

				for _ in range(_A ):
								# Forward propagation
								lowercase    :      Dict       = sigmoid_function(INITIAL_VALUE * weight )
								# How much did we miss?
								lowercase    :      Any       = (expected / 100) - layer_a
								# Error delta
								lowercase    :      Dict       = layer_1_error * sigmoid_function(_A  ,				_A )
								# Update weight
								weight += INITIAL_VALUE * layer_1_delta

				return layer_a * 100


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				_lowerCAmelCase            =	int(input('Expected value: '))
				_lowerCAmelCase            =	int(input('Number of propagations: '))
				print(forward_propagation(expected, number_propagations))
