phanindhar1

Untitled

Nov 5th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.22 KB | None | 0 0
  1.  
  2. int[] a=  {4,1,2,3,4,5,6,7,8,9,10,11,12}
  3.  
  4. int cols = a[0];
  5. int rows = (a.length - 1)/cols;
  6.  
  7. int [][]q = {{3,2}, {2,1}};
  8. int out = new int[q.length];
  9. for(int i : q.length)
  10. out[i] = q[rows-1][cols-1]
  11.  
  12. return out;
Add Comment
Please, Sign In to add comment