{"id":20702,"date":"2021-09-21T09:00:06","date_gmt":"2021-09-21T03:30:06","guid":{"rendered":"https:\/\/python-programs.com\/?p=20702"},"modified":"2021-11-22T18:36:16","modified_gmt":"2021-11-22T13:06:16","slug":"python-program-to-find-square-root-under-modulo-k-when-k-is-in-form-of-4i-3","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-square-root-under-modulo-k-when-k-is-in-form-of-4i-3\/","title":{"rendered":"Python Program to Find Square Root Under Modulo k (When k is in Form of 4*i + 3)"},"content":{"rendered":"

In the previous article, we have discussed Python Program for Array\/List Elements that Appear More than Once<\/a><\/p>\n

Given the number N, prime number k and the task is to find the square root of the given number under modulo k(When k is in form of 4*i + 3). Here i<\/strong> is an integer.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given prime number k=5\r\nGiven Number = 4<\/pre>\n

Output:<\/strong><\/p>\n

The Square root of the given number{ 4 } under modulo k= 2<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given prime number k=3\r\nGiven Number = 5<\/pre>\n

Output:<\/strong><\/p>\n

No, we cannot find the square root for a given number<\/pre>\n

Program to Find Square Root Under Modulo k (When k is in Form of 4*i + 3) in Python<\/h2>\n

Below are the ways to find the square root of the given number under modulo k (When k is in form of 4*i + 3) in python:<\/p>\n