Asterix Gaming Guild Logo General XXL XXL 2 Olympic Games XXL Speedrun XXL Romaster Speedrun XXL 2 Speedrun XXL 2 Remaster Speedrun XXL 3 Speedrun Olympic Games Speedrun Retro Other Astérix Games Other Games Modding Media Videos Streams Creative Shack Spoofy Goofs VC-Text Village Gates Introductions UXXL Downloads Wiki Bot Spam Feedback Announcements Patches Tools Resources Caesar's challenge Help Noxus94 SPQR Mr. Rubinstein

#help

Page: << <  40 / 143  >  >>
TimeUserText
NoTeefyafter that you can just apply your modulus on it
BreadBut I don't want my BigInteger to have a value
BreadDoes that mean
BreadBigInteger c = new BigInteger();
Bread? :D
NoTeefysomething like that should work. Let me check if you need a special function for a modulus on a BigInteger real quick
BreadOh wow really good
NoTeefyoh okay
BreadI wouldn't have thought about that
NoTeefygot it, let me write you the solution
BreadThanks a lot!
Bread```java public void inputs(double p, double q, double e, double m, double d) { //Encrypting a message System.out.println(0
NoTeefy```java public void test() { BigInteger a = new BigInteger(„8“); BigInteger b = new BigInteger(„13“); BigInteger c = a.modPow(b, new BigInteger(„77“)); System.out.println("Result should actually be 45. However it is "+ c); } ```
NoTeefythat should work. It‘s hard to write in proper syntax on a smartphone while almost falling asleep 🙈
BreadHaha :D thx
BreadLet me try that
NoTeefytry it
Breadit doesn't even allow import java.math.BigInteger;
NoTeefyThe thing is: You wanna use BigIntegers instead of the normal data types because of the size limitations. The result of Math.pow(8, 13) is too big hence the number gets shortened/rounded. That‘s why it won‘t produce the correct result.
BreadOkay I see