'''simple docstring'''

from collections import defaultdict
from math import gcd
def       __UpperCamelCase	(       UpperCAmelCase = 150_0000					):
 lowercase__    :   defaultdict						= defaultdict(UpperCAmelCase					)
 lowercase__    :   Union[str, Any]						= 2
 while 2 * euclid_m * (euclid_m + 1) <= limit:
  for euclid_n in range((euclid_m % 2) + 1		,					UpperCAmelCase		,					2					):
   if gcd(UpperCAmelCase		,					UpperCAmelCase					) > 1:
    continue
   lowercase__    :   Optional[Any]						= 2 * euclid_m * (euclid_m + euclid_n)
   for perimeter in range(UpperCAmelCase		,					limit + 1		,					UpperCAmelCase					):
    frequencies[perimeter] += 1
  euclid_m += 1
 return sum(1 for frequency in frequencies.values() if frequency == 1					)


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


'''simple docstring'''

import qiskit
def       __UpperCamelCase	(       UpperCAmelCase		,					UpperCAmelCase					):
 lowercase__    :   Dict						= qiskit.Aer.get_backend('''aer_simulator'''					)

 # Create a Quantum Circuit acting on the q register
 lowercase__    :   Any						= qiskit.QuantumCircuit(UpperCAmelCase		,					UpperCAmelCase					)

 # Map the quantum measurement to the classical bits
 circuit.measure([0]		,					[0]					)

 # Execute the circuit on the simulator
 lowercase__    :   Any						= qiskit.execute(UpperCAmelCase		,					UpperCAmelCase		,					shots=1000					)

 # Return the histogram data of the results of the experiment.
 return job.result().get_counts(UpperCAmelCase					)


if __name__ == "__main__":
  print(F'Total count for various states are: {single_qubit_measure(1, 1)}')

