fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Scanner a = new Scanner(System.in);
  13. var time = a.nextInt();
  14. int second = time % 60;
  15. int minute = time / 60 % 60;
  16. int hour = time / 60 / 60;
  17.  
  18. System.out.print(time + "초는 " + hour + "시간, " + minute + "분, ");
  19. System.out.print(second + "초입니다.");
  20.  
  21. }
  22. }
Success #stdin #stdout 0.23s 58880KB
stdin
12344
stdout
12344초는 3시간, 25분, 44초입니다.