DescriptionPowers of 2Given a positive integer n, your task is to find all the powers of 2 that don’t exceed n.InputOutput511 2 4 8 16 32ConstraintsTime limit: 2 secondsMemory limit: 512 MBOutput limit: 1 MBTo check your solution you need to sign inSign in to continue