---
title: "正整数排序 Help is need for Dexter Uva 11384"
author: "rex686568"
date: "2015-01-30T21:07:00Z"
tags: []
slug: "help-is-need-for-dexter-uva-11384"
draft: false
lastmod: "2015-02-07T10:59:33Z"
id: 2184285
url: "https://rex686568.iteye.com/blog/2184285"
---

面对刚开始没有头绪的题目, 先进行尝试往往是非常有必要的,

```
#include <cstdio>
#include <iostream>

using namespace std;

unsigned int cal(unsigned int n){
	if (n == 1) return 0;
	else if (n == 2) return 1;
	else return cal((unsigned int)(n/2))+1;
}

int main(){

	unsigned int n;
	cin >> n;
	cout << cal(n);
	return 0;
}
```