Highest power of 2 that divides the LCM of first N Natural numbers . | C # implementation of the approach ; Function to find the highest power of 2 which divides LCM of first n natural numbers ; Driver code
using System ; class GFG { static int highestPower ( int n ) { return ( int ) ( Math . Log ( n ) / Math . Log ( 2 ) ) ; } public static void Main ( String [ ] args ) { int n = 15 ; Console . WriteLine ( highestPower ( n ) ) ; } }