ChaseDream
搜索
返回列表 发新帖
查看: 572|回复: 1
打印 上一主题 下一主题

求救---整数难题

[复制链接]
楼主
发表于 2009-9-22 15:11:00 | 只看该作者

求救---整数难题

How many odd integers are greater than the integer X and less than the integer y?

1)      There are 12 even integers greater than X and less than y

2)      There are 24 integers greater than x and less than y

答案是Statement2alone is sufficient, but statement(1) is not sufficient

假设x=1,y=26

 

碰到这种题是不是只能把数据(1~26)一个个列出来?

有没有更好的办法?

沙发
发表于 2009-9-22 17:40:00 | 只看该作者

这题就是问你X Y 两个整数之间有多少个奇数和多少个偶数。

如果X Y中间有N个数,并且N是偶数时,那么X Y之间的奇数和偶数个数相同,都是N/2。

否则无法判断。

您需要登录后才可以回帖 登录 | 立即注册

Mark一下! 看一下! 顶楼主! 感谢分享! 快速回复:

手机版|ChaseDream|GMT+8, 2025-10-31 06:41
京公网安备11010202008513号 京ICP证101109号 京ICP备12012021号

ChaseDream 论坛

© 2003-2025 ChaseDream.com. All Rights Reserved.

返回顶部