JAPH

  • Thread starter Lawrence D'Oliveiro
  • Start date
L

Lawrence D'Oliveiro

import sys
charset = " .JPacehknorstuy"
modulo = 17
s = 69859911049503515105680510599913390885187193231927247909305172858127641629
num = iter(range(2, 9999))
while s != 1 :
n = num.next()
if s % n == 0 :
sys.stdout.write("%s" % charset[(n - 1) % modulo])
s /= n
#end if
#end while
sys.stdout.write("\n")
 
S

Szabolcs Nagy

charset, modulo, japh = " .JPacehknorstuy", 17, ""
s =
69859911049503515105680510599913390885187193231927247909305172858127641629
for n in xrange(2,9999):
if s%n==0:
japh += charset[(n - 1) % modulo]
s /= n
if s==1:
break
print japh
 
M

Michael

Szabolcs said:
charset, modulo, japh = " .JPacehknorstuy", 17, ""
s =
69859911049503515105680510599913390885187193231927247909305172858127641629
for n in xrange(2,9999):
if s%n==0:
japh += charset[(n - 1) % modulo]
s /= n
if s==1:
break
print japh

More pythonic:

print "Just another Python hacker."

:)


Michael.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top