Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Challenge: fastest program wins

Name: Anonymous 2009-04-14 12:59

Write a program in your language that
1.opens a file as arbitrary precision integer.
2.divides the number by 3.
3.stores the binary result in another file.

Name: Anonymous 2009-04-17 8:42

from sys import argv
from gmpy import mpz

open(argv[2], 'w').write(str(mpz(open(argv[1], 'r').read()) // 3))


$ time python 60.py in.txt out.txt

real    0m2.455s
user    0m2.278s
sys    0m0.159s

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List