結果

問題 No.525 二度寝の季節
ユーザー kohaku_kohaku
提出日時 2017-06-10 01:50:39
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 699 bytes
コンパイル時間 2,786 ms
コンパイル使用メモリ 78,564 KB
実行使用メモリ 57,712 KB
最終ジャッジ日時 2024-09-22 21:45:42
合計ジャッジ時間 10,729 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        System.out.println(solve(S));
    }
    static int p(String S){
        return Integer.parseInt(S);
    }
    static long second(String S){
        String [] arr = S.split(":");
        int hour = p(arr[0]);
        int min = p(arr[1]);
        int t = (hour*60+min)*60*1000;
        return t;
    }
    static String solve(String S){
        long now = second(S);
        long after = now + 300000;
        Date d = new Date();
        d.setTime(after);
        String T = d.toString();
        return T.substring(11,16);
    }
}
0