misc

No flag for you

Solved By : Taz

echo /*

echo /home/user/run/opt/*
echo "$(</home/user/run/opt/flag-b01d7291b94feefa35e6.txt)"


Alternative Arithmetic

Solved By : Ava and choco

Question 1 :

1. Find a nonzero long x` such that `x == -x`, enter numbers only, no semicolons
Question 2 :

Find 2 different `long` variables `x` and `y`, differing by at most 10, such that `Long.hashCode(x) == Long.hashCode(y)`
Question 3 - 

Enter a `float` value `f` that makes the following function return true
// code given along with Q3 :

boolean isLucky(float magic) {
    int iter = 0;
    for (float start = magic; start < (magic + 256); start++) {
        if ((iter++) > 2048) {
            return true;
        }
    }
    return false;

Alternative Arithmetic (Final Flag)

Solved By : nigamelastic and choco

4th question :

Enter 3 `String` values `s1`, `s2`, and `s3` such that:
new BigDecimal(s1).add(new BigDecimal(s2)).compareTo(new BigDecimal(s3)) == 0

but

Double.parseDouble(s1) + Double.parseDouble(s2) != Double.parseDouble(s3)
Do not enter quotation marks.

First attempt

Do not enter quotation marks.
s1 = 0.004
s2 = -0.003
s3 = 0.001
Sorry, your answer is not correct. Try something else next time.

Second attempt

s1 = 20000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000004
s2 = -10000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000003
s3 = 10000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000001
Sorry, your answer is not correct. Try something else next time.

Third attempt

s1 = 0.04
s2 = -0.03
s3 = 0.01
Perfect! You are correct.

but

0.03 will be represented 2.99999999999999988897769753748E-2


* after this stupidity we finally get the 5th and final option:

  1. Final question! [🎶BOSS MUSIC🎶]

Fill in , , below:

```java
var i = (<type>) <num1>; var j = (<type>) <num2>;
such that after running the code above, the following expression:
i < j || i == j || i > j
evaluates to `false`.

<num1> and <num2> are Java code that satisfies this regex: [0-9]*\.?[0-9]*