On 9 Mag, 11:20, superpollo wrote:
> "if a b c are digits, solve ab:c=a*c+b"
>
> solved in one minute with no thought:
>
> for a in range(10):
> for b in range(10):
> for c in range(10):
> try:
> if (10.*a+b)/c==a*c+b:
> print "%i%i:
superpollo writes:
> "if a b c are digits, solve ab:c=a*c+b"
>
> solved in one minute with no thought:
Obviously.
> for a in range(10):
> for b in range(10):
> for c in range(10):
> try:
> if (10.*a+b)/c==a*c+b:
> print "%i%i:%i=%i*%i+
On Sun, May 9, 2010 at 11:31 AM, Xavier Ho wrote:
> On Sun, May 9, 2010 at 7:20 PM, superpollo wrote:
>>
>> "if a b c are digits, solve ab:c=a*c+b"
>
> Sorry, what does the notation ab:c mean?
The number ab divided by c.
--
André Engels, andreeng...@gmail.com
--
http://mail.python.org/mailma
On Sun, May 9, 2010 at 7:20 PM, superpollo wrote:
> "if a b c are digits, solve ab:c=a*c+b"
>
Sorry, what does the notation ab:c mean?
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
"if a b c are digits, solve ab:c=a*c+b"
solved in one minute with no thought:
for a in range(10):
for b in range(10):
for c in range(10):
try:
if (10.*a+b)/c==a*c+b:
print "%i%i:%i=%i*%i+%i" % (a,b,c,a,c,b)
except: