1
gordo
·2009-04-28 02:46:41
im glad dat atleast someone bothered to end dis one...thanx celestine!!! ;-))
9
Celestine preetham
·2009-04-28 01:35:26
gordo thats the best approach
edit of gordos post
this as we are looking for positive values of p,
for r=K, we have K values of q so that r-q is positive,
ie 1 +2+......899 = 899*900/2
now when r=q ,p=0 means x=r is still valid
so in that case x can be 1 to 899
so final ans is 899*451 which is one less
all the others abv have considered x=o also as a solution thats the mistake
post is ended now !!!!
1
gordo
·2009-04-28 01:14:37
guyz why does every gud thread of this sort left to die incomplete??
1
gordo
·2009-04-27 09:22:52
say x=900p + r
and also x=901p + q
where 0<=r<900
and 0<=q<901
we have 900p +r= 901p +q
or p=(r-q)
now r belongs to [0,899]
and q belongs to [0,900]
as we are looking for positive values of p,
for r=K, we have K+1 values of q so that r-q is positive,
so the number of solutions can go up to
900+899+898+....+1=(900*901/2)
mite be completely wrong...
11
Mani Pal Singh
·2009-04-25 07:41:34
had hai
maine to aakhri digit tak bata di
please
now this is closed[4]
1
Vivek
·2009-04-25 07:38:29
the actual answer is 1 less than that,why????? any explanation?
Proof:
double a,c;int b;
int ctr=0;
for(b=1;b<=(900*901);b++)
{
a=(int) (b/900);
c=(int) (b/901);
if(a==c){
ctr++;
}
}
System.out.println("Ctr:"+ctr);
Output:
init:
deps-jar:
compile-single:
run-single:
Ctr:405449
BUILD SUCCESSFUL (total time: 0 seconds) --> lol
Did this to confirm as i had modified a past olympiad question
11
Mani Pal Singh
·2009-04-25 05:24:45
r u sure ur question is complete??
please mention the interval
11
Mani Pal Singh
·2009-04-25 06:11:51
[339]
GOOD OBSERVATION ITH POWER
AMAZING
THEN
[1,899]
[902,1799]
[1803,2699]
[2704,3599]
[3605,4499].
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
[45051,45989]
.
.
.
.
.
[54062,54899]
[72081,72899]
[90101,90899]
[450501,450899]
[809999,809999]
last number to be multiplied by 900 is 899
in lhs we add the number with which we r multiplying
and in the rhs we a r multiplying with n-1 and subtractng 1
i hope this is the required solution[1]
1
ith_power
·2009-04-25 05:54:20
obviously the list will not count to infinity.
as you see the solutions you listed earlier, the range reduces by 1 each time.
1
Vivek
·2009-04-25 05:53:05
not infinity,but quite a large number( btwn 100000 and 1 million -)
11
Mani Pal Singh
·2009-04-25 05:47:25
CAN WE COUNT THEM ?????????
THE LIST EXTENDS UPTO INFINITY
SORRY IF AM ASKING A DUMB
BUT
THIS IS AN OBVIOUS QUESTION
11
Mani Pal Singh
·2009-04-25 05:42:41
[1,899]
[902,1799]
[1803,2699]
[2704,3599]
1
Vivek
·2009-04-25 05:39:08
positive integral solutions of x