标签:blog java io for ar div log sp new
1 import java.io.BufferedInputStream;
2 import java.io.BufferedOutputStream;
3 import java.io.PrintWriter;
4 import java.util.ArrayList;
5 import java.util.List;
6 import java.util.Scanner;
7
8 public class P1001
9 {
10
11 public static void main(String[] args)
12 {
13 try (Scanner cin = new Scanner(new BufferedInputStream(System.in)))
14 {
15 List<Double> inputs = new ArrayList<>();
16 while (cin.hasNext())
17 inputs.add(cin.nextDouble());
18 try (PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out)))
19 {
20 for (int i = inputs.size() - 1; i >= 0; i--)
21 writer.println(String.format("%.4f", Math.sqrt(inputs.get(i))));
22 }
23 }
24 }
25
26 }
标签:blog java io for ar div log sp new
原文地址:http://www.cnblogs.com/gwhahaha/p/3936269.html