290 PalindromssmordnilaP

All about problems in Volume II. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Postby yatsen » Thu Dec 20, 2001 6:25 am

I am confused for the base in 290.
In the Example:
Base 8 87+78=207
But how can digit 8 appear in the number based 8. I think 8 is illegal here.

Could anyone tell me what's wrong?
yatsen
Learning poster
 
Posts: 67
Joined: Fri Nov 23, 2001 2:00 am
Location: taiwan

Postby wyvmak » Sun Dec 23, 2001 12:56 pm

i'm not sure which one you're referring to. the version on the web site states 'illegal' already

but, i can't get AC either.
can anyone tell me what tricks it has?

1. need to trim leading zeros first?
2. is there 0 steps?
3. what other tricks it has?
4. if input 0, then all zeros?
wyvmak
Experienced poster
 
Posts: 110
Joined: Thu Dec 13, 2001 2:00 am

Postby gilbert » Tue Feb 26, 2002 8:54 am

Hmm..
Check this out:
Sample Example is wrong:
857 + 758 = 1726
1762 + 2671 = 7543

Why does 1726-->1762?
gilbert
New poster
 
Posts: 4
Joined: Wed Dec 12, 2001 2:00 am

Postby pochmann » Tue Feb 26, 2002 11:58 am

1. need to trim leading zeros first?
No (I don't).

2. is there 0 steps?
Yes.

3. what other tricks it has?
None. Maybe the input is badly formatted? I read it with scanf("%s").

4. if input 0, then all zeros?
Yes.

"1726-->1762" is obviously a mistake. Ignore it.

Good luck,
Stefan
pochmann
New poster
 
Posts: 28
Joined: Sat Jan 26, 2002 2:00 am

Postby C8H10N4O2 » Sat Mar 02, 2002 7:35 pm

Check to see if the string is valid for each of the different bases.
C8H10N4O2
Experienced poster
 
Posts: 137
Joined: Wed Feb 27, 2002 2:00 am
Location: Pasadena, CA

Postby Rodrigo » Sun Jul 28, 2002 12:55 am

The example is totally messed up!

Base 15 87 + 78 = 110
110 + 011 = 121 2 steps
Base 14 87 + 78 = 111 1 step <-- it should be "121 1 step"
Base 13 87 + 78 = 132
132 + 231 = 363 2 steps
Base 12 87 + 78 = 143
143 + 341 = 484 2 steps
Base 11 87 + 78 = 154
154 + 451 = 5A5 2 steps
Base 10 87 + 78 = 165
165 + 561 = 726
726 + 627 = 1353
1353 + 3531 = 4884 4 steps
Base 9 87 + 78 = 176
176 + 671 = 857
857 + 758 = 1726
1762 + 2671 = 7543 <-- it should be "1726 + 6271 = 8107"
7543 + 3457 = 12111 <-- it should be "8107 + 7018 = 16126"
12111 + 11121 = 23232 6 steps <-- it should be "16126 + 62161 = 78287 6 steps"
Base 8 87 + 78 = 207 <-- in base 8 digits go from 0 to 7, 87 is illegal!
207 + 702 = 1111 2 steps <-- therefore, this line shouldn't be here
Base 7 illegal ? steps
Base 6 illegal ? steps
Base 5 illegal ? steps
Base 4 illegal ? steps
Base 3 illegal ? steps
Base 2 illegal ? steps

Which means, the correct output for 87 is not:

2 1 2 2 2 4 6 2 ? ? ? ? ? ?

like shown in the sample output; it is:

2 1 2 2 2 4 6 ? ? ? ? ? ? ?

Which is almost the same, but the intermediate results are completely wrong.

How do I reach the site organizers to alert them about this?
Rodrigo
New poster
 
Posts: 14
Joined: Sun Jul 07, 2002 12:03 am
Location: Brazil


Return to Volume II

Who is online

Users browsing this forum: Google [Bot], psbot [Picsearch] and 1 guest