← All problemsSign in

Alein invasion by NASA

NASA went for a space mission to conquer a planet filled with aliens.We can only invade that planet if we break more than $10^9$ alien building else humans loose. There are $A$ alien stations numbered from 1 to $10^{18}$ i.e, $A_i=i$. If $P_i$ denotes power of $ith$ building, then $ P_i = \lceil{\frac{2A_i+M}{K}}\rceil$ Where $\lceil n \rceil$ denotes ceiling of number $n$ and $M,K$ are integer

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