Arithmancy
CodeChefOpen on judge ↗
Hermione Granger, the most talented witch of her generation, likes to solve various types of mathematical problems in the Arithmancy class. Today, the professor has given her the following task: Find the number of fractions a/b such that- 1. gcd(a, b) = 1 2. 0 3. a * b = (n!) ^ (n!) Where "n!" denotes the factorial of n and "^" denotes power, i.e. (2!) ^ (2!) = 4. She is quite confident that s
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