diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-08-06 09:09:10 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-08-06 09:09:10 +0000 |
| commit | 866658cded5b92ddb2681dead1ebaf111d712fcc (patch) | |
| tree | cf7534c4726a142189e096ce82f8d73b2a398ecc /boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp | |
| download | boca-866658cded5b92ddb2681dead1ebaf111d712fcc.tar.gz boca-866658cded5b92ddb2681dead1ebaf111d712fcc.zip | |
init
Diffstat (limited to 'boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp')
| -rw-r--r-- | boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp b/boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp new file mode 100644 index 0000000..62d11f5 --- /dev/null +++ b/boca-1.5.0/doc/tests/fontes/bits-outputformat.cpp @@ -0,0 +1,17 @@ +#include <stdio.h> +int main(void) { + int i, j, n, max, inst=0; + while(42) { + scanf("%d", &n); + if(!n) break; + max=1; + for(i=0; i<n; i++) { + scanf("%d", &j); + if(j>max) max=j; + } + for(i=0; max>0; i++) + max >>= 1; + printf("INStanCIA %d\n%d\n\n", ++inst, i*n); + } + return 0; +} |