Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: challenge problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61290] Re: [mg61219] challenge problem
  • From: Zhengji Li <zhengji.li at gmail.com>
  • Date: Fri, 14 Oct 2005 05:56:09 -0400 (EDT)
  • References: <200510130539.BAA04503@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This works, but it may take a long time.
(Note: Quotient[10^11, 7] = 14285714285)

result = 0;
i = 1;
While[i <= 14285714285,
  temp = IntegerDigits[7i];
  If[temp === Reverse[temp],
    result += 7i;
    ];
  ++i;
];

--
Li Zhengji
-------------------------------------------------------------
If all you have is a hammer, everything is a nail.
-------------------------------------------------------------


  • Prev by Date: same scale for different plots or charts
  • Next by Date: Re: challenge problem
  • Previous by thread: challenge problem
  • Next by thread: Re: challenge problem