Simple Problem
CodeChefOpen on judge ↗
Here's a simple problem to start with: You are given two odd-prime numbers $a$ and $b$. Let $N = a*b$, now you have to find two non-negative integers $x$ and $y$ $(x \lt y)$ such that $(x^2)\%N = 1$, $(y^2)\%N = 1$ and $x$ and $y$ belong to $[0, N-2] - \{1\}$. ###Input: - First line contains an integer $T$ denoting the number of test cases. - Following it there are $T$ testcases, each contains
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start