Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin=new Scanner(System.in);
int t=cin.nextInt();
System.out.println(t/3600+":"+t%3600/60+":"+t%60);
}
}
C++ 代码
/*
1 hour= 60*60 s
1 minute= 60 s
*/
#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
printf("%d:%d:%d\n",t/3600,t%3600/60,t%60);
return 0;
}