-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.java
41 lines (32 loc) · 1.09 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package io.github.tahanima.codechef.volcontrol;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
/**
* @param x denotes the initial volumes of TVs
* @param y denotes the final volumes of TVs
* @return an integer list containing the answers
*/
public static List<Integer> solve(List<Integer> x, List<Integer> y) {
// Implement this method
return new ArrayList<>();
}
/**
* Takes care of the problem's input and output.
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
StringBuilder stringBuilder = new StringBuilder();
int cases = scanner.nextInt();
ArrayList<Integer> x = new ArrayList<>();
ArrayList<Integer> y = new ArrayList<>();
while (cases-- > 0) {
x.add(scanner.nextInt());
y.add(scanner.nextInt());
}
List<Integer> answers = solve(x, y);
answers.forEach(e -> stringBuilder.append(String.format("%d%n", e)));
System.out.print(stringBuilder);
}
}