Compute Square Root (sqrt) of larger number in Python

Правка en1, от karanyadav_bravo98, 2023-09-19 19:46:37

Square Root of larger Numbers in python (2-Methods)

Writing this blog after solving Problem B(points on plane) Educational Codeforces Round 145 (Rated for Div. 2)

Method 1

Using Decimal Module

checkout: https://docs.python.org/3/library/decimal.html

Usage:

224067239

Method 2

Using Newton's Method

read about this method on wikipedia: https://en.wikipedia.org/wiki/Newton's_method

this will work if we want to work with integers

Source: stackoverflow

Usage:

224064574

Теги sqrt, square root, python, python3, large inputs, largeinteger, fast method, problem solving

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский karanyadav_bravo98 2023-09-19 19:46:37 626 Initial revision (published)