fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner in=new Scanner(System.in);
  10. double a=in.nextDouble();
  11. double b=in.nextDouble();
  12. double c=in.nextDouble();
  13. double au = (b*b + c*c - a*a) / (2*b*c);
  14. double bu = (a*a + c*c - b*b) / (2*a*c);
  15. double cu = (a*a + b*b - c*c) / (2*a*b);
  16. System.out.format("%f %f %f%n", Math.acos(au), Math.acos(bu), Math.acos(cu));
  17. }
  18. }
Success #stdin #stdout 0.16s 321344KB
stdin
6.8 5.2 9.3
stdout
0.801375 0.581525 1.758693