Submission #1779124


Source Code Expand

import java.util.*;
import java.io.*;

public class Main {
    private static IO io = new IO();
    
    public static void main(String[] args) {
        int n = io.nextInt();
        int h = n/3600;
        n %= 3600;
        int m = n/60;
        n %= 60;
        int s = n;

        if (h<10) System.out.print(0);
        System.out.print(h + ":");
        if (m<10) System.out.print(0);
        System.out.print(m + ":");
        if (s<10) System.out.print(0);
        System.out.println(s);
    }

    static class IO extends PrintWriter {
        private final InputStream in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

        IO() {
            this(System.in);
        }

        IO(InputStream source) {
            super(System.out);
            this.in = source;
        }

        boolean hasNextByte() {
            if (ptr < buflen) return true;
            else {
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) return false;
            }
            return true;
        }
        int readByte() {
            if (hasNextByte()) return buffer[ptr++];
            else return -1;
        }
        boolean isPrintableChar(int c) {return 33<=c &&c <=126;}
        void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr]))ptr++;}
        boolean hasNext() {
            skipUnprintable();
            return hasNextByte();
        }

        long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) throw new NumberFormatException();
            while (true) {
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                } else if (b == -1 || !isPrintableChar(b)) return minus ? -n : n;
                else throw new NumberFormatException();
                b = readByte();
            }
        }

        int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }

        public void close() {
            super.close();
            try {
                in.close();
            } catch (IOException ignored) {
            }
        }
    }
}

Submission Info

Submission Time
Task B - 入浴時間
User creep04
Language Java8 (OpenJDK 1.8.0)
Score 100
Code Size 2780 Byte
Status AC
Exec Time 73 ms
Memory 23252 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 14
Set Name Test Cases
All sample_01.txt, sample_02.txt, test_1.txt, test_17977.txt, test_25298.txt, test_36922.txt, test_44309.txt, test_52415.txt, test_60165.txt, test_65487.txt, test_70993.txt, test_80915.txt, test_84810.txt, test_86399.txt
Case Name Status Exec Time Memory
sample_01.txt AC 72 ms 19668 KB
sample_02.txt AC 72 ms 20948 KB
test_1.txt AC 73 ms 23124 KB
test_17977.txt AC 70 ms 19284 KB
test_25298.txt AC 71 ms 19284 KB
test_36922.txt AC 73 ms 23252 KB
test_44309.txt AC 71 ms 15828 KB
test_52415.txt AC 71 ms 19156 KB
test_60165.txt AC 71 ms 17748 KB
test_65487.txt AC 72 ms 20820 KB
test_70993.txt AC 72 ms 19028 KB
test_80915.txt AC 71 ms 21076 KB
test_84810.txt AC 69 ms 19284 KB
test_86399.txt AC 69 ms 22996 KB