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

[原始] 鼠穴机经

[精华] [复制链接]
跳转到指定楼层
楼主
发表于 2012-1-13 02:05:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
数学记得一道-100除以30余几,答案有0,10,-10。。。答案-10
收藏收藏 收藏收藏
沙发
发表于 2012-1-13 02:07:05 | 只看该作者
余数没有负数吧
板凳
发表于 2012-1-13 02:27:54 | 只看该作者
The case of general integers

If a and d are integers, with d non-zero, then a remainder is an integer r such that a = qd + r for some integer q, and with 0 ≤ |r| < |d|.

When defined this way, there are two possible remainders. For example, the division of ?42 by ?5 can be expressed as either
?42 = 9×(?5) + 3
as is usual for mathematicians,[citation needed] or
?42 = 8×(?5) + (?2).
So the remainder is then either 3 or ?2.

This ambiguity in the value of the remainder can be quite serious computationally; for mission critical computing systems, the wrong choice can lead to dangerous consequences. In the case above, the negative remainder is obtained from the positive one just by subtracting 5, which is d. This holds in general. When dividing by d, if the positive remainder is r1, and the negative one is r2, then
r1 = r2 + d.
----------------------from wikipedia
地板
发表于 2012-1-13 04:30:47 | 只看该作者
楼主,这道题我做了,答案应该是20
5#
发表于 2012-1-13 14:01:49 | 只看该作者
楼上你是怎么算的? 我算出来也是-10

30x(-3)+(-10)=-100
6#
发表于 2012-1-13 14:03:04 | 只看该作者
-100=30*(-4)+20
7#
发表于 2012-1-13 14:16:30 | 只看该作者
我也考了这题了,确定答案是20~~题目中说了余数大于等于0的
8#
发表于 2012-1-13 14:22:00 | 只看该作者
got it,谢谢楼上2位
您需要登录后才可以回帖 登录 | 立即注册

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

手机版|ChaseDream|GMT+8, 2024-12-2 23:02
京公网安备11010202008513号 京ICP证101109号 京ICP备12012021号

ChaseDream 论坛

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

返回顶部