皮皮学,免费搜题
登录
搜题
【简答题】
淘汰赛问题 题目: 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
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】原发性肝癌最常见的肝外转移部位是:
A.
骨髂
B.
C.
左锁骨上淋巴结
D.
腹腔
E.
脑内
【单选题】授课教师在课堂提问时,主要使用的是哪一类问题?
A.
展示性问题
B.
真实问题
C.
开放性问题
【单选题】ZG230-450钢的最低抗拉强度为_______MPa。
A.
230
B.
450
C.
23
D.
45
【判断题】平板玻璃按需要规格的开片加工是为提高物流效率,方便物流的流通加工。( )
A.
正确
B.
错误
【判断题】平板玻璃按需要规格的开片加工是为提高物流效率,方便物流的流通加工。
A.
正确
B.
错误
【单选题】다음의 모음 표현에서 맞는 표현을 고르십시오. ( )
A.
한국어에는 19개의 모음이 있다.
B.
모음은 발음하는 동안 입의 모양이나 혀의 위치가 자연스럽게 변한다.
C.
모음은 단모음과 이중모음으로 나뉜다.
D.
모음 'ㅔ, ㅐ'는 이중모음이다.
【单选题】原发性肝癌最常见的肝外转移部位是
A.
B.
C.
左锁骨上淋巴结
D.
腹腔
E.
脑内
【判断题】ZG340-640钢的最低抗拉强度为340MPa。
A.
正确
B.
错误
【单选题】平板玻璃按需要规格的开片加工是( )。
A.
为适应多样化需要
B.
为方便消费、省力
C.
为保护产品
D.
为弥补生产加工不足
【单选题】低碳钢筋静力拉伸试验在屈服阶段的应力最低值称为()
A.
屈服强度
B.
抗压强度
C.
抗拉强度
D.
断裂强度
相关题目: