AC代码:
import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.nio.Buffer;
import java.time.DayOfWeek;
public class Main
{
static PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
static Mycomparator cmp = new Mycomparator();
static int N = (int)1e5 + 10;
public static void main(String[] args) throws NumberFormatException, IOException
{
long n = rd.nextLong();
n /= 1000;
long s = n % 60; // 得到秒
n /= 60;
long m = n % 60; // 得到分
n /= 60;
long h = n % 24; // 得到小时
pw.printf("%02d:%02d:%02d",h,m,s);
pw.flush();
}
}
class rd
{
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer tokenizer = new StringTokenizer("");
static String nextLine() throws IOException { return reader.readLine();}
static String next() throws IOException
{
while(!tokenizer.hasMoreTokens()) tokenizer = new StringTokenizer(nextLine());
return tokenizer.nextToken();
}
static int nextInt() throws NumberFormatException, IOException { return Integer.parseInt(next()); }
static long nextLong() throws NumberFormatException, IOException { return Long.parseLong(next()); }
static double nextDouble() throws NumberFormatException, IOException { return Double.parseDouble(next()); }
static BigInteger nextBigInteger() throws IOException { return new BigInteger(next()); }
}
class PII
{
int x,y;
public PII(int x, int y)
{
this.x = x;
this.y = y;
}
}
class Mycomparator implements Comparator<PII>
{
@Override
public int compare(PII o1, PII o2)
{
// TODO Auto-generated method stub
if(o1.x != o2.x) return o1.x - o2.x;
return o1.y - o2.y;
}
}