結果
問題 | No.296 n度寝 |
ユーザー |
|
提出日時 | 2016-05-05 11:40:03 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 164 ms / 1,000 ms |
コード長 | 910 bytes |
コンパイル時間 | 2,438 ms |
コンパイル使用メモリ | 85,528 KB |
実行使用メモリ | 51,280 KB |
最終ジャッジ日時 | 2024-07-07 02:46:25 |
合計ジャッジ時間 | 5,136 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.PriorityQueue; import java.util.Queue; import java.util.Scanner; public class Main { final static String d = System.getProperty("line.separator"); public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<String> input = new ArrayList<>(); while (sc.hasNext()) { input.add(sc.nextLine()); } System.out.println(solve(input)); sc.close(); } public static String solve(List<String> in) { Integer N = Integer.valueOf(in.get(0).split(" ")[0]); Integer H = Integer.valueOf(in.get(0).split(" ")[1]); Integer M = Integer.valueOf(in.get(0).split(" ")[2]); Integer T = Integer.valueOf(in.get(0).split(" ")[3]); LocalDateTime now = LocalDateTime.of(2016, 1, 1, H, M); now = now.plusMinutes((N - 1) * T); return now.getHour() + d + now.getMinute(); } }