I think this is not the right approach for you to solve UVA problems...you
will have to put in ur time to solve ...thats the only way in which you can
improve. I strongly urge the group to stop sending accepted solutions.
regards,
Pradeep
On 6/10/07, Vishal <[EMAIL PROTECTED]> wrote:
>
> if ( n <
On Jun 1, 9:01 am, Terry <[EMAIL PROTECTED]> wrote:
> Hi,
> This one's puzzling me since a while. Any thoughts
> In a triangle ABC, find a point P such that perimeter of the triangles
> formed by (A,B,P), (B,C,P) and (A,C,P) are same. how do we determine P
> and what is it called
Well,
|AB| + |A
if ( n <= 9 )
return (10+n);
ret = 0;
while (n>9)
{
found = false;
for ( i = 9 to 2 )
if (n%i == 0)
{ ret = ret * 10 + i; n /= i; found = true; }
if ( !found )
{
print( "Not possible"); return;
}
}
Now sort the digits of ret and return.
However this will work for sm
Hi everbody , i am trying to solve this problem
http://acm.uva.es/p/v105/10527.html but i am not getting any
efficient algorithm . One algorithm i applied
while(n>9)
for i=2 to 9
if(n%i=0)//then i is factor of n and may be a digit in the number
store i for further processing
n=n