-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMain.java
40 lines (31 loc) · 842 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
40
package io.github.tahanima.beecrowd._1154;
import java.util.ArrayList;
import java.util.Scanner;
/**
* @author tahanima
*/
public class Main {
/**
* @param ages denotes the age values of the individuals
* @return a long number containing the answer
*/
public static String solve(ArrayList<Integer> ages) {
// Implement this method
return "";
}
/**
* Takes care of the problem's input and output.
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
ArrayList<Integer> ages = new ArrayList<>();
while (scanner.hasNext()) {
int age = scanner.nextInt();
if (age < 0) {
break;
}
ages.add(age);
}
System.out.println(solve(ages));
}
}