Re: Finding extra digit
- To: mathgroup at smc.vnet.net
- Subject: [mg53992] Re: Finding extra digit
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Sun, 6 Feb 2005 00:45:04 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 2/5/05 at 3:15 AM, seidovzf at yahoo.com (Zak Seidov) wrote:
>Dear Math gurus, please help! What is an easy way to find extra
>digit in the integer n2, which differs from integer n1 EXACTLY by
>ONE digit. I use a very dirt program, but guess that you can
>suggest smth (much) better.
n = 125623;
m = 124623;
Select[MapIndexed[{#2, #1}& ,
Transpose@{IntegerDigits@m, IntegerDigits@n}],
UnsameQ@@Last@#1&]
{{{3}, {4, 5}}}
Would be one way to accomplish this
--
To reply via email subtract one hundred and four