Why this happens?

Why this happens?
Exact same solution submitted in java and C++.
RESULT:
JAVA

C++

1 Like

C++ is much faster than JAVA

1 Like

But the time limit for each language should be different