From 2948fe8d6055f6dfe6289e64bce426b5e0bb552f Mon Sep 17 00:00:00 2001 From: cassiopc Date: Fri, 31 Aug 2012 11:02:27 +0200 Subject: inclusion of dir 1.5.1 for boca --- boca-1.5.1/doc/tests/fontes/bits-outputformat.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 boca-1.5.1/doc/tests/fontes/bits-outputformat.java (limited to 'boca-1.5.1/doc/tests/fontes/bits-outputformat.java') diff --git a/boca-1.5.1/doc/tests/fontes/bits-outputformat.java b/boca-1.5.1/doc/tests/fontes/bits-outputformat.java new file mode 100644 index 0000000..7a3d144 --- /dev/null +++ b/boca-1.5.1/doc/tests/fontes/bits-outputformat.java @@ -0,0 +1,23 @@ +import java.io.*; +class bits { + public static void main(String args[]) throws Exception { + StreamTokenizer st = new StreamTokenizer(System.in); + int i, j, n, max, inst=0; + while(42==42) { + st.nextToken(); + n = (int) st.nval; + if(n==0) break; + max=1; + for(i=0; imax) max=j; + } + for(i=0; max>0; i++) + max >>= 1; + inst++; + System.out.println("Instancia " + inst); + System.out.println(i*n); + } + } +} -- cgit v1.2.3