首页 > 考试题库
题目内容 (请给出正确答案)
[主观题]

淘汰赛问题 题目:Our school is planning to hold a new exciting computer programming cont

淘汰赛问题

题目:

Our school is planning to hold a new exciting computer programming contest. During each round of the contest, the competitors will be paired, and compete head-to-head. The loser will be eliminated, and the winner will advance to next round. It proceeds until there is only one competitor left, who is the champion. In a certain round, if the number of the remaining competitors is not even, one of them will be chosed randomly to advance to next round automatically, and then the others will be paired and fight as usual. The contest committee want to know how many rounds is needed to produce to champion, then they could prepare enough problems for the contest.

Input

The input consists of several test cases. Each case consists of a single line containing a integer N - the number of the competitors in total. 1 <= N <= 2,147,483,647. An input with 0(zero) signals the end of the input, which should not be processed.

Output

For each test case, output the number of rounds needed in the contest, on a single line.

Sample Input

8

16

15

0

Sample Output

3

4

4

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“淘汰赛问题 题目:Our school is plannin…”相关的问题
第1题
____________ , our school team won the football match.

A、To the joy

B、To our joy

C、In our joy

D、To our joys

点击查看答案
第2题
She is a teacher in our school ______ daughter is now studying in Australia.

A.where

B.of whom

C.that

D.whose

点击查看答案
第3题
______ school is larger than ______.

A.Our; your

B.Our; yours

C.Ours; yours

D.We; you

点击查看答案
第4题
We sent our children to school to prepare them for the time () they will have to work f
or themselves.

A.that

B.when

C.while

D.as

点击查看答案
第5题
_ from the hill, our school looks more beautiful.

A.Seen

B.Being seen

C.Seeing

D.Saw

点击查看答案
第6题
As students, we shouldn’t _________ our time like that; we should finish our school w

A.cut

B.kill

C.live

D.kick

点击查看答案
第7题
Our school has exhibited many of the () taken by the teacher ().Perfect photographic eq
Our school has exhibited many of the () taken by the teacher ().Perfect photographic eq

Our school has exhibited many of the () taken by the teacher ().Perfect photographic equipment helped them a lot but I think without it their techniques are still surprising. (photograph)

点击查看答案
第8题
Last week our school held sports meeting.Really? Did you _____ any game?

A.join

B.take part

C.take part in

D.enter

点击查看答案
第9题
The teachers in our school try their best to let us have a more _______ school life.
(enjoy)

点击查看答案
第10题
On our way to school, suddenly it began to rain, and we hurried to take()under a big tree.

A.recovery

B.notice

C.advantage

D.Shelter

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改