
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# this script dumps information about the environment

import os
import sys

import transformers


lowerCamelCase__     :		Union[str, Any]        = """3"""

print("""Python version:""", sys.version)
print("""transformers version:""", transformers.__version__)

try:
     import torch

     print("""Torch version:""", torch.__version__)
     print("""Cuda available:""", torch.cuda.is_available())
     print("""Cuda version:""", torch.version.cuda)
     print("""CuDNN version:""", torch.backends.cudnn.version())
     print("""Number of GPUs available:""", torch.cuda.device_count())
     print("""NCCL version:""", torch.cuda.nccl.version())
except ImportError:
     print("""Torch version:""", None)

try:
     import deepspeed

     print("""DeepSpeed version:""", deepspeed.__version__)
except ImportError:
     print("""DeepSpeed version:""", None)

try:
     import tensorflow as tf

     print("""TensorFlow version:""", tf.__version__)
     print("""TF GPUs available:""", bool(tf.config.list_physical_devices("""GPU""")))
     print("""Number of TF GPUs available:""", len(tf.config.list_physical_devices("""GPU""")))
except ImportError:
     print("""TensorFlow version:""", None)











from __future__ import annotations

from math import ceil, floor, sqrt





def 		a__      (		_UpperCamelCase      :			int = 2_00_00_00				):
   __lowerCamelCase    				=     [0]
   __lowerCamelCase    				=     42

   for idx in range(1			,ceil(sqrt(target * 2				) * 1.1				)				):
      triangle_numbers.append(triangle_numbers[-1] + idx				)

   # we want this to be as close as possible to target
   __lowerCamelCase    				=     0
   # the area corresponding to the grid that gives the product closest to target
   __lowerCamelCase    				=     0
   # an estimate of b, using the quadratic formula
   __lowerCamelCase    				=     42
   # the largest integer less than b_estimate
   __lowerCamelCase    				=     42
   # the largest integer less than b_estimate
   __lowerCamelCase    				=     42
   # the triangle number corresponding to b_floor
   __lowerCamelCase    				=     42
   # the triangle number corresponding to b_ceil
   __lowerCamelCase    				=     42

   for idx_a, triangle_a in enumerate(triangle_numbers[1:]			,1				):
      __lowerCamelCase    				=     (-1 + sqrt(1 + 8 * target / triangle_a				)) / 2
      __lowerCamelCase    				=     floor(_UpperCamelCase				)
      __lowerCamelCase    				=     ceil(_UpperCamelCase				)
      __lowerCamelCase    				=     triangle_numbers[b_floor]
      __lowerCamelCase    				=     triangle_numbers[b_ceil]

      if abs(target - triangle_b_first_guess * triangle_a				) < abs(
          target - best_product				):
         __lowerCamelCase    				=     triangle_b_first_guess * triangle_a
         __lowerCamelCase    				=     idx_a * b_floor

      if abs(target - triangle_b_second_guess * triangle_a				) < abs(
          target - best_product				):
         __lowerCamelCase    				=     triangle_b_second_guess * triangle_a
         __lowerCamelCase    				=     idx_a * b_ceil

   return area


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






