← All problemsSign in

Short II

CodeChefRating 2640Open on judge ↗

Given a prime number p, find the number of pairs of integers (a, b) such that p a, p b and ab is divisible by (a-p)(b-p). Input The first line contains the number of test cases t (1 ≤ t ≤ 5). Then t test cases follow, each test case consists of a line containing one prime integer p (1 p 12). Output For each test case output one line containing the required number. It's guaranteed that this num

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start