-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.java
More file actions
47 lines (36 loc) · 1.15 KB
/
Copy pathMain.java
File metadata and controls
47 lines (36 loc) · 1.15 KB
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
43
44
45
46
47
package io.github.tahanima.uva._12250;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
/**
* @param words denotes a string arraylist containing the words to evaluate
* @return a string arraylist containing the answers
*/
public static ArrayList<String> solve(ArrayList<String> words) {
// 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();
ArrayList<String> words = new ArrayList<>();
while (scanner.hasNext()) {
String word = scanner.next();
if (word.equals("#")) {
break;
}
words.add(word);
}
ArrayList<String> answer = solve(words);
int cases = 1;
for (String language: answer) {
stringBuilder.append(String.format(
"Case %d: %s%n",
cases++, language));
}
System.out.print(stringBuilder);
}
}