Ayush Maths Test
CodeChefOpen on judge ↗
Ayush is good at mathematics so his professor gave him a tough maths problem to test his knowledge. He gave Ayush two numbers $A$ and $B$ and asked him to count the number of arrays of length A such that: - all the elements in the array are integers between 0 and $2^B - 1$ (inclusive); - the bitwise AND of all the elements in the array is 0; - the sum of the elements of the array is as large as
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