Company: Klently

Difficulty: medium

Problem Statement

Pythagorean primes are numbers that are prime and of the form (4n+1). You are given a number N. Check whether the given number is a Pythagorean prime or not. Complete the function provided in the editor. This function takes the following parameter and returns whether the given number is a Pythagorean prime or not: N: Represents an integer denoting the number N Input format The first line contains T denoting the number of test cases. T also specifies the number of times you have to run the solve function on a different set of inputs. For each test case. The first line contains a single integer N. Output Format For each test case, check whether N is Pythagorean prime or not, if yes output YES else NO. Constraints 1 ≤ T ≤ 100000

More Klently OA questionsInterview experiences