×

# what is wrong in my code?

 0 import java.util.Scanner; class Rupsa { public static void main(String args[]) { Scanner input = new Scanner(System.in); //System.out.println("Enter umber of test cases : "); int n = input.nextInt(); int a[][] = new int[n][]; int x,y,sum; //System.out.println("Enter number of numbers in each test case : "); for(int i=0;i

 0 Overflow. Array's length can be upto 10^5, you cant just Math.pow(2,10^5), it will cause heavy overflow. If you are a beginner, skip this Q for now, its a easy-medium question as labelled by tag (IDK just WHO put it in beginner's section...). It needs you to know some tricks, which you will learn during course of practicing (Easy section)problems and participating in contests. answered 16 Jul '17, 21:48 15.5k●1●20●66 accept rate: 18%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×334
×255
×30
×21
×19
×15
×12

question asked: 16 Jul '17, 20:41

question was seen: 406 times

last updated: 16 Jul '17, 23:02