fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. int temp1,temp2,temp3;
  11. Scanner sc=new Scanner(System.in);
  12. while(sc.hasNextInt()){
  13. temp1=sc.nextInt();
  14. temp2=sc.nextInt();
  15. temp3=sc.nextInt();
  16. temp3=(temp1>temp2)?(temp1<temp3?temp1:temp3):(temp2<temp3?temp2:temp3);
  17. System.out.println(temp3);
  18. }
  19. }
  20. }
Success #stdin #stdout 0.13s 321088KB
stdin
2 4 5
37 34 65
66 56 77
33 34 35
34 38 35
33 22 22
stdout
4
37
66
34
35
22