练56.1 猜猜乐
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
格莱尔和尼克玩猜数游戏。格莱尔默默选定一个数(1 ~ 100之间的整数),尼克每次猜一个数,格莱尔会告诉尼克他是猜大了还是猜小了,或是猜对了。尼克采用二分法猜数,请你模拟尼克猜数的过程。
输入格式
一行一个整数,为n。
输出格式
输出若干行,每行一个整数,为此时二分得到的数,当二分得到的数为n时,输出“成功!”,否则当二分结束时,输出“失败!”。
样例
5650
75
62
56
成功!
2024吉利学院ACM暑假实践周训练4
- Status
- Done
- Rule
- XCPC
- Problem
- 9
- Start at
- 2024-7-4 13:30
- End at
- 2024-7-4 16:30
- Duration
- 3 hour(s)
- Host
- Partic.
- 29