← All problemsSign in

Prime Power

Dhoni loves prime numbers and prefers his scores to be prime numbers. He played n tournaments last year and m matches in each of them. He prepares a n*m matrix A[ ][ ]-(one indexed matrix) in which A[i][j] represents the runs scored by Dhoni in jth match of ith tournament and wonders if there is at least one column or row in that matrix that consists of prime numbers only. If the above condition d

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