import java.io.*;
import java.text.DecimalFormat;
import java.util.StringTokenizer;
public class Test49 {
public static void main(String[] args) throws Exception {
BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(bin.readLine());
double[] m = new double[n];
DecimalFormat myf = new DecimalFormat("0.00");
StringTokenizer st = new StringTokenizer(bin.readLine());
for (int i = 0; i < n; i++) {
m[i] = Double.parseDouble(st.nextToken());
}
for (int i = 0; i < n; i++)
for (int j = 0; j < n - i - 1; j++) {
double t;
if (m[j] > m[j + 1]) {
t = m[j];
m[j] = m[j + 1];
m[j + 1] = t;
}
}
for (int i = 0; i <n; i++) {
if((i+1)%5==0)
System.out.println(myf.format(m[i]));
else
System.out.print(myf.format(m[i]) + " ");
}
}
}
代码和题目都在上面了……
想问下在本地测试正常……为什么提交到测试客户端就说结果不正确……我靠了
有高手可以帮看下如果真的错了错在哪里吗