Title |
User |
Message |
Date Posted |
Re: Re: hmm.. |
zhxl0903 |
nvm I just did it with real , and it worked Thanks anyways! :) |
Jan 09, 2009 - 3:35:52 am UTC |
Re: hmm.. |
bbi5291 |
Actually, longint goes up to 2147483647, so it is big enough. |
Jan 09, 2009 - 3:31:17 am UTC |
hmm.. |
zhxl0903 |
So, the second test case is too large for Pascal longint...? |
Jan 09, 2009 - 3:18:18 am UTC |
Re: Re: what's wrong with my program? |
Bob |
whoops - my bad - stupid question. |
Dec 31, 2008 - 1:35:17 am UTC |
Re: what's wrong with my program? |
hansonw1 |
Your formula is wrong. (Does it even work for the sample input?) Also, you should give your variables meaningful names - your code is very hard to understand. |
Dec 31, 2008 - 1:24:10 am UTC |
what's wrong with my program? |
Bob |
it should be the part where i find the number of numbers that are divisible by both a and b, but i can't find my error. |
Dec 31, 2008 - 1:09:25 am UTC |
Re: Re: Re: why? |
bleung91 |
ok then. 1) find the number of multiples of a in the inputted range. 2) find the number of multiples of b in the inputted range. 3) find the overlap. 4) subtract. edit: sorry, admins, If I said too... |
Dec 30, 2008 - 8:31:12 am UTC |
Re: Re: why? |
purohit3105 |
OK I tried that but it still doesn't work...Don't get it. |
Dec 30, 2008 - 5:34:19 am UTC |
Re: Re: why? |
purohit3105 |
ohh..Thanks!! |
Dec 19, 2008 - 1:23:28 pm UTC |
Re: why? |
bleung91 |
because there are numbers which are multiples of both 3 and 21, such as 21 and 42. Instead of using a loop, try to think of a mathematical way of determining how many multiples of a number are within... |
Dec 19, 2008 - 5:23:07 am UTC |