From be2491b093b1f0ca430bede679ecbb670041e483 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:46:45 +0400 Subject: restructuring of boca's git --- doc/tests/fontes/bits-yes.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/tests/fontes/bits-yes.cpp (limited to 'doc/tests/fontes/bits-yes.cpp') diff --git a/doc/tests/fontes/bits-yes.cpp b/doc/tests/fontes/bits-yes.cpp new file mode 100644 index 0000000..11a32b5 --- /dev/null +++ b/doc/tests/fontes/bits-yes.cpp @@ -0,0 +1,18 @@ +#include +using namespace std; +int main(void) { + int i, j, n, max, inst=0; + while(42) { + cin >> n; + if(!n) break; + max=1; + for(i=0; i> j; + if(j>max) max=j; + } + for(i=0; max>0; i++) + max >>= 1; + cout << "Instancia " << ++inst << endl << (i*n) << endl << endl; + } + return 0; +} -- cgit v1.2.3