|
|
back to board:'( WaWaWaWa.. Help me!! #include <iostream> #include <stdio.h> #include <vector> #include <cctype> #include <stdlib.h> #include <numeric> #include <string.h> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <iterator> #include <set> using namespace std; #define FOR(i, a, b) for (int i = (a) ; i < (b); i++) #define sz size() #define pb push_back #define clean(t) memset ((t) , -1, sizeof(t)) #define VI vector <int> #define VS vector <string> #define cinput(n) scanf("%d", &n) int main() { int n; double a; VI ans; while(cin >> n) { if (n == 1) {ans.pb(1); continue; } if (n == 0) goto end; a = log(n)/log(2); if ( a == (int ) a) ans.pb(a); else ans.pb((int) a+1); } end:; int q; FOR(q, 0, ans.sz) { cout << ans[q] << endl; } return 0; } What's Wrong?? Plz some1 tell me.. Re: :'( WaWaWaWa.. Help me!! Got AC.. |
|
|