結果
問題 | No.296 n度寝 |
ユーザー |
![]() |
提出日時 | 2015-11-07 19:39:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 1,000 ms |
コード長 | 810 bytes |
コンパイル時間 | 3,455 ms |
コンパイル使用メモリ | 74,176 KB |
実行使用メモリ | 41,516 KB |
最終ジャッジ日時 | 2024-07-06 22:26:13 |
合計ジャッジ時間 | 6,301 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
import java.util.Scanner; /** * http://yukicoder.me/problems/822 */ public class YukiCoder296 { public static void main(String[] args) { run(args); } public static void run(String[] args) { // Scanner sc = new Scanner("2 7 30 5"); // Scanner sc = new Scanner("1 8 0 5"); // Scanner sc = new Scanner("7 8 0 5"); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int h = sc.nextInt(); int m = sc.nextInt(); int t = sc.nextInt(); int total = t * (n - 1); int min = (total + m) % 60; int hour = (((total + m) / 60) + h) % 24; System.out.println(hour); System.out.println(min); } public void test() { // 2 7 30 5 , 7 35 // System.out("") } }