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-16 19:47

$ cat file1.txt
1726721657861278561278567182657861278612786781265786215786172765782167856217865726178567126578216587217856782165782178467821647862178462178471286478612746217864


$ time java Lol

real             0m0.199s
user             0m0.109s
sys              0m0.045s


$ time ./div3 file1.txt div3.out

real 0m0.003s
user 0m0.001s
sys  0m0.003s


$ gcc -c post23.c -o post23 file1.txt post23.out
post22.c:3:17: error: gmp.h: No such file or directory
post22.c: In function 'main':
post22.c:8: error: 'mpz_t' undeclared (first use in this function)
post22.c:8: error: (Each undeclared identifier is reported only once
post22.c:8: error: for each function it appears in.)
post22.c:8: error: syntax error before 'n'
post22.c:9: error: 'n' undeclared (first use in this function)


$ time ./post23
-bash: ./post23: No such file or directory

real    0m0.002s
user    0m0.000s
sys     0m0.002s


WE HAVE A WINNER

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