首页 > 代码库 > UVA 11384 Help is needed for Dexter

UVA 11384 Help is needed for Dexter

#include<iostream>using namespace std;int n;int dfs(int n){return n == 1 ? 1 : dfs(n / 2) + 1;}int main(){        while (cin >> n) cout << dfs(n) << endl;        return 0;}

 

UVA 11384 Help is needed for Dexter