#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <vector> #include <stdio.h> #define db(a) \ cout << #a << " = " << a << endl #define db2(a, b) \ cout << #a << " = " << a << " " << #b << " = " << b << endl #define inf (1<<30) using namespace std; int lista[10001]; int main() { #ifdef dennisbot freopen("in.in", "r", stdin); #endif int seed = 1, cont = 0, t = 1; for (int i = 1; i < 10001; i++) { if (seed >= i) { lista[i] = cont; } else { while (seed *= 2, cont++, seed < i); lista[i] = cont; } } int n; while (scanf("%d", &n) != EOF && n > 0) { printf("Case %d: %d\n", t++, lista[n]); } return 0; }
domingo, 8 de abril de 2012
11636 - Hello World, uva
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario