Two Function Conundrum
CodeChefOpen on judge ↗
This is probably the easiest task of this problem set. To help you understand the task let us define two key functions: Let f(p,q) be the set of all integers x such that (p mod x + q mod x) >= x. For example: f(1,7) = {2,4,8} f(5,7) = {2,3,4,6,8,9,10,11,12} f(6,7) = {4,8,9,10,11,12,13} Let E(n) = number of integers {0,1,2, ... ,n-1} that are relatively prime to n. Given p and q, your task is t
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