- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRottingOranges.java
More file actions
Latest commit
18 lines (18 loc) · 657 Bytes
/
Copy pathRottingOranges.java
File metadata and controls
18 lines (18 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importjava.io.*;
publicclassRottingOranges {
publicstaticvoidmain(String[] args) throwsException {
BufferedReaderbr = newBufferedReader(newInputStreamReader(System.in));
intm = Integer.parseInt(br.readLine());
intn = Integer.parseInt(br.readLine());
int[][] arr = newint[50][50];
for (inti = 0; i < n; i++) {
for (intj = 0; j < m; j++)
arr[i][j] = Integer.parseInt(br.readLine());
}
for (inti = 0; i < n; i++) {
for (intj = 0; j < m; j++)
System.out.print(arr[i][j]+" ");
System.out.println();
}
}
}