I like to suggest something to solve this problem.
The car number is a four digit number which can be represented in the
following manner:
100 * 11 * K + 11 * L = X ^ 2
Since the 4 digit number has two parts and each of them divides by 11 it
means that X must be a multiplication of a constant by 11 (the prime
factor).
This conclusion leaves us with the following possible values for X {11, 22,
33, 44, 55, 66, 77, 88, 99}.
A three digit X value which is a multiplication of 11 will yield a square
value of 5 digits ( 10*11 )^2=12100.
The square value of the first two entries in the list (e.g. 11, 12) gives a
three digit result. 121 and 484.
This leaves us with 7 numbers of which the square value will be: 1089, 1936,
3025, 4356, 5929, 7744 and 9801.
It looks like the answer you look for hides somewhere in this list.
Moshe
_____
From: do_right [mailto:[email protected]]
Sent: Saturday, March 13, 2010 7:24 PM
To: [email protected]
Subject: [c-prog] Re: PLZ SOLVE THIS :
--- In c-p...@yahoogroups. <mailto:c-prog%40yahoogroups.com> com, "Rakibul
Islam" <rakib.uiu_...@...> wrote:
>
>
>
> Three brilliant school girls walking along see a car hit a cyclist and
fled away. They report the matter to the police like this :
>
> Girl 1: I couldn't see the entire number of the car, but I remember that
it was a four digit number and it's first two digits were divisible by 11
>
> Girl 2 : I could see only the last two digits of the car's number, and
they two formed a number divisible by 11.
>
> Girl 3 : I saw the hole number but i forgot. But I am sure that the whole
number was a perfect square.
>
> Can you help the police trace the car by a C program?
>
No I can't. But first, the girls are not brilliant at all, probably pyscho.
They are trying to cover up a crime here by coming up with this maths.
The police should interrogate them further and charge them with ...
</sacarsm>
A logic might be to run through perfect squares (with four digits)
http://en.wikipedia <http://en.wikipedia.org/wiki/Square_number>
.org/wiki/Square_number
and check the divisibility of the first two and last two digits.
Lawal.O
[Non-text portions of this message have been removed]
------------------------------------
To unsubscribe, send a blank message to
<mailto:[email protected]>.Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/c-prog/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/