We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
importjava.io.*;importjava.util.*;publicclassSolution{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intnum=sc.nextInt();inta=0;if((num>0)&&(num&(num-1))==0){System.out.printf("%d is power of %d",num,2);}else{System.out.printf("%d is not power of %d\n",num,2);System.out.print("An instance of class: Solution.Inner.Private has been created");}}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Can You Access?
You are viewing a single comment's thread. Return to all comments →
what is wrong with my solutions?