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 S,s1,s2;
  11. s1=(1.0/2.0)/(1.0-(1.0/2.0));
  12. s2=(1.0/3.0)/(1.0-(1.0/3.0));
  13. S=s1+s2;
  14. System.out.print(S);
  15. }
  16. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
1.5