We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java Loops II
- Discussions
Java Loops II
Java Loops II
Sort by
recency
|
3248 Discussions
|
Please Login in order to post a comment
import java.util.; import java.io.; class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt();
}
You don't need Math.pow. It's slower than it needs to be. Can be done with a simple (2*multiplier+1) update per loop:
is anyone else having hard time understand the question ? i am trying to figure out question by eample
import java.util.; import java.io.;
class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); for(int i=0;i
}
That's my solution
import java.util.; import java.io.; import java.lang.Math;
class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); double[][] arr = new double[t][]; for(int i=0;i
}