// Topcoder SRM 571 DIV 2 2 FoxAndMp3Easy
import java.util.*;
import java.math.*;
public class FoxAndMp3Easy {
public static void main(String[] args) {
System.out.println(
//
new FoxAndMp3Easy().playList(
5
));
}
public String[] playList(int n) {
ArrayList<String> s = new ArrayList<String>();
for (int i = 1; i <= n; i++) {
s.add(String.valueOf(i) + ".mp3");
}
Collections.sort(s);
String[] ss = new String[Math.min(n, 50)];
for (int i = 0; i < ss.length; i++) {
ss[i] = s.get(i);
}
return ss;
}
}
No comments:
Post a Comment