import java.util.Scanner;
public class teste {
public static void main(String[] args) {
Scanner scan= new Scanner(System.in);
long n=scan.nextLong();
n/=1000;
//只要最后一天
n%=(24*60*60);
long h=n/3600;
long min=n/60%60;
long sec=n%60;
System.out.printf("%02d:",h);
System.out.printf("%02d:",min);
System.out.printf("%02d",sec);
}
}
long h=n/3600;
long min=n/60%60;
long sec=n%60;
给出秒数求对应的小时,分钟,秒用这个代码。