-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.java
39 lines (30 loc) · 977 Bytes
/
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
package io.github.tahanima.codechef.batterylow;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* @author tahanima
*/
public class Main {
/**
* @param x denotes the battery level of phones
* @return a string list containing the answers
*/
public static List<String> solve(List<Integer> x) {
// 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<>();
while (cases-- > 0) {
x.add(scanner.nextInt());
}
List<String> answers = solve(x);
answers.forEach(e -> stringBuilder.append(String.format("%s%n", e)));
System.out.print(stringBuilder);
}
}