This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 1~100,有一个数是重复的, 怎么找出来?
-samuelhao(samuel);
2007-2-21
(#3508985@0)
-
把那些数在excel中排成一列,在第二列用这个函数=IF(COUNTIF($A$1:$A$8,A1)=2,A1,)你就可看到你所需要的数了。不用谢。
-forbaby(ForBaby);
2007-2-21
(#3509011@0)
-
(x1 XOR x2 XOR x3 ... XOR x100) mod 100
-sj2005(YoursToDiscover);
2007-2-21
(#3509016@0)
-
Sum(Your Numbers) - Sum(1..100) = (x1+x2...x101) - (1+2+3+...+ 100) = (x1+x2+..+x101) - 5050
-digitworm(digitworm);
2007-2-21
(#3509186@0)
-
that's my first thought but it wont work :)
-goodbaby(小宝);
2007-2-21
(#3509192@0)
-
why not?
-cigarette(香烟);
2007-2-21
(#3509195@0)
-
I may misunderstand LZ's question.He has 100 numbers or 101? If it's 1-100 plus a number between 1-100,then it works.If it's between 1-100,there is 1 duplicated and 1 missed,then it wont work.
-goodbaby(小宝);
2007-2-21
(#3509208@0)
-
it's between 1-100,there is 1 duplicated and 1 missed. 共100个数, 不是101个
-samuelhao(samuel);
2007-2-21
(#3509575@0)
-
S = sum all elements S
S0 = sum from 1 to 100
SS = sum all square of elements
SS0 = sum all square from 1 to 100
if x duplicate and y missing
(1) x - y = S - S0
(2) x*x - y*y = SS - SS0
resolve (1) and (2)S = sum all elements S
S0 = sum from 1 to 100
SS = sum all square of elements
SS0 = sum all square from 1 to 100
if x duplicate and y missing
(1) x - y = S - S0
(2) x*x - y*y = SS - SS0
resolve (1) and (2)
-sj2005(YoursToDiscover);
2007-2-21
{218}
(#3509752@0)