Dsa
Math
Hard
Cryptography Key Generation
You need to generate a cryptographic key using two prime numbers p and q. The key is to be generated using the formula: key = (p - 1) * (q - 1). Given two prime numbers p and q as input, print the generated key.
Example input:
7 11
Example output:
60
Key concepts
mathmodular arithmeticnumber theory
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now