Does Any one know that Java support BigInteger Class ?

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
nahidshahin
New poster
Posts: 8
Joined: Mon Nov 10, 2003 10:54 am
Location: Bangladesh
Contact:

Does Any one know that Java support BigInteger Class ?

Post by nahidshahin » Mon Jul 12, 2004 4:23 am

Does Any one know that Java support BigInteger Class ?
I am new in java.
Please Help me.
Bye
nahid

Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

Post by Larry » Mon Jul 12, 2004 8:24 pm

Java has a BigInteger class, but you can't use it on the judge..

wyanez
New poster
Posts: 8
Joined: Thu Nov 20, 2003 7:19 pm

BigInteger in Judge

Post by wyanez » Tue Jul 13, 2004 8:02 pm

The java.math.BigInteger not is supported in the Vallladolid Judge, but you can use the implementacion of BigInt in this link
http://online-judge.uva.es/board/viewto ... 7a75ae0c24

Good Luck !

Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

Post by Larry » Tue Jul 13, 2004 8:46 pm

You can always download the source code to Sun's implementation of the BigInt..

Julien Cornebise
Experienced poster
Posts: 145
Joined: Sat Feb 23, 2002 2:00 am
Location: Paris, France
Contact:

Post by Julien Cornebise » Thu Jul 15, 2004 11:47 am

Larry wrote:Java has a BigInteger class, but you can't use it on the judge..
(...)
You can always download the source code to Sun's implementation of the BigInt.
Hi Larry.
How about in regional contests ? Are BigInteger supported ?
Sun's BigInt implementation is quite heavy, isn't it ? (I believe it's around 100 Ko, and it seems faster to recode our own BigInt than simplifying this one, isn't it ?)

Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

Post by Larry » Thu Jul 15, 2004 3:58 pm

No, it's only this judge's limitations. In regionals, you're allowed to use all this and more. (As far as I know anyhow..)

Julien Cornebise
Experienced poster
Posts: 145
Joined: Sat Feb 23, 2002 2:00 am
Location: Paris, France
Contact:

Post by Julien Cornebise » Fri Jul 16, 2004 10:09 am

Larry wrote:No, it's only this judge's limitations. In regionals, you're allowed to use all this and more. (As far as I know anyhow..)
Gee ! I'm surprised ! BigInteteger is extremely powerful : it now includes primality testing (with serveral different methods), primal number generation, fast exponentiation, modular arithmetics, modular exponentiation, and much much more !
It's now almost simpler to convert a standard int into BigInteger and let BigInteger's methods do the job (for part of number theory problems) than create everything anew.
Couldn't it kill the algorithmic interest of some problems ?

Post Reply

Return to “Java”