-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.java
42 lines (33 loc) · 1 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
42
package io.github.tahanima.beecrowd._1165;
import java.util.ArrayList;
import java.util.Scanner;
/**
* @author tahanima
*/
public class Main {
/**
* @param numbers denotes the input numbers
* @return a string arraylist containing the answer
*/
public static ArrayList<String> solve(ArrayList<Integer> numbers) {
// 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);
ArrayList<Integer> numbers = new ArrayList<>();
int n = scanner.nextInt();
while (n-- > 0) {
numbers.add(scanner.nextInt());
}
ArrayList<String> answers = solve(numbers);
StringBuilder stringBuilder = new StringBuilder();
for (String answer: answers) {
stringBuilder.append(String.format("%s\n", answer));
}
System.out.print(stringBuilder);
}
}