Page 1 of 1
Basic
Posted: Mon May 18, 2009 5:53 am
by Lasdem
Now that
WolframAlpha is available,
this chellange got very easy =)[/url]
Don't know what i mean?
click me[/url]
Posted: Tue May 19, 2009 9:00 pm
by megabreit
It was easy for UNIX users long before that.
Check bc and the obase command:
$ bc
obase=7; 8
11
WolframAlpha is an amazing site, but can probably not solve most of the harder math challenges.
E.g. "Biggest Fib" runs into an timeout. You don't need a calculator anymore, but still have to use your own brain
Posted: Wed Nov 18, 2009 8:05 am
by matter
Yea, I used the BC libraries in PHP. Code was about 5 lines.
Posted: Sat Oct 09, 2010 8:37 pm
by Aghamemnon
I solved it by hand
just for fun
These things amuse me
Posted: Sun Oct 17, 2010 1:48 am
by chephy
matter wrote:Yea, I used the BC libraries in PHP. Code was about 5 lines.
5 lines? Ruby: »28679718602997181072337614380936720482949.to_s 7«
Posted: Fri Oct 22, 2010 11:03 am
by wolfamstart
i know java is normaly realy gabby, but this was quit short:
Code: Select all
return new BigInteger("28679718602997181072337614380936720482949").toString(7);
But the real challenge is to code the convertion by yourself. I try it soon.
Posted: Fri May 13, 2011 8:06 pm
by FreeFull
I used dc
Posted: Sat May 14, 2011 10:47 am
by laz0r
Mathematica:
IntegerString[28679718602997181072337614380936720482949, 7]
Posted: Wed Feb 06, 2013 9:20 pm
by the_austria
I wrote an own function in python (for fun)
Code: Select all
def base(number,base):
newnumber=[]
while number>0:
newnumber.insert(0,number%base)
number=number//base
return newnumber
It returns a list of the digets.
How in C
Posted: Thu Feb 28, 2013 9:32 am
by DHARMENDRA VERMA
i solve this problem in java but i am wondering that how could I solve this in C ??
Is there any Header file which support integers with such large digits???
Posted: Fri Mar 01, 2013 2:54 am
by AMindForeverVoyaging
There are "big integer" libraries which can be used with C. One of them is the
GNU Multiple Precision Arithmetic Library.
Posted: Sat Mar 09, 2013 9:58 pm
by Schnapphahn
Thanks Mathematica
Code: Select all
BaseForm [28679718602997181072337614380936720482949, 7]
Posted: Sat Apr 05, 2014 6:15 pm
by Grusewolf
I solved it in groovy in straight forward programing
Code: Select all
BigInteger number = 28679718602997181072337614380936720482949
def pow = 50
print "septal number: "
while(pow >= 0) {
def digitValue = 7.power(pow)
def currentDigit = 0
while(number >= digitValue) {
currentDigit++
number -= digitValue
}
print currentDigit
pow--
}
But after reading the solution of wolfamstart in this Forum I recognized, that groovy also provides a very quick solution:
Code: Select all
println 28679718602997181072337614380936720482949.toString(7)