SP9161 LEGRENDS - Legendre symbol

Description

Given 2 integers a and p (1

Input Format

In the first line the number of test cases t

Output Format

t lines with the Legendre symbol (a/p).