用户名: 密码: 忘记密码? 注册
收藏此问题 发表新评论

三角函数怎么引用

找到了某个猜数字程序。猜了若干次,有一次结果是

代码:
range[a, b]:1 1000
I think I can guess in 10 times.
I guess 500. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 250. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 375. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 437. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 468. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 452. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 444. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 440. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 438. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, Hey, you are cheating me!
Since you've said your number was bigger than 437, hmmm, Aha, your number must be 438.
I've guessed it in 9 times. I won.


它是怎么知道我在故意“耍”它的?大家能不能写一段类似的程序实现以上功能?最好是C的。
昵称: vb2vc  时间: 2011-05-20 22:34:00
2的10次方等于1024>1000
昵称: 月下叹逍遥  时间: 2011-05-20 22:37:00
月下叹逍遥 写道:
2的10次方等于1024>1000


我主要问的是
引用:
well, Hey, you are cheating me!
Since you've said your number was bigger than 437, hmmm, Aha, your number must be 438.
这一段是怎么判断出的。
昵称: vb2vc  时间: 2011-05-20 22:47:00
发表评论
昵称:
内容:
验证: