結果

問題 No.296 n度寝
ユーザー kenji_shioya
提出日時 2016-06-02 18:40:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 406 bytes
コンパイル時間 3,362 ms
コンパイル使用メモリ 74,800 KB
実行使用メモリ 54,240 KB
最終ジャッジ日時 2024-07-07 02:48:30
合計ジャッジ時間 6,306 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise50{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int h = sc.nextInt();
    int m = sc.nextInt();
    int t = sc.nextInt();

    int sum = t * (n - 1) + m;
    h += sum / 60;
    if (h > 23){
      h = h % 24;
    }
    m = sum % 60;

    System.out.println(h);
    System.out.println(m);
  }
}
0