Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int n = in.nextInt();
- Vector<Vector<Integer>> v = new Vector<Vector<Integer>>();
- for (int i = 0; i < n; i++) {
- Vector<Integer> temp = new Vector();
- for (int j = 0; j < n; j++) {
- int x = in.nextInt();
- temp.add(x);
- }
- v.add(temp);
- }
- Vector<Vector<Vector<Integer>>> collect = new Vector<Vector<Vector<Integer>>>();
- collect.add(v);
- for (int i = 0; i < (int) collect.size(); i++) {
- for (int j = 0; j < (int) collect.get(i).size(); j++) {
- for (int k = 0; k < (int) collect.get(i).get(j).size(); k++) {
- System.out.print(collect.get(i).get(j).get(k) + " ");
- }
- System.out.println();
- }
- System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment