//Robert Kelly //Problem "Cut the Silver" #11847 import java.util.*; import java.lang.Math; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); double start, output; int breakflag = 0, out; while(breakflag == 0){ start = (double)in.nextInt(); if(start == 0){ breakflag = 1; break; } output = Math.floor(Math.log10(start)/Math.log10(2)); out = (int)output; System.out.println(out); } } }The statements and opinions included in these pages are those of only. Any statements and opinions included in these pages are not those of Louisiana State University or the LSU Board of Supervisors.
© 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Isaac Traxler