結果

問題 No.296 n度寝
ユーザー syu
提出日時 2020-08-26 18:26:09
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 1,000 ms
コード長 523 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 74,136 KB
実行使用メモリ 41,408 KB
最終ジャッジ日時 2024-11-07 13:16:40
合計ジャッジ時間 5,061 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int hour=sc.nextInt();
        int min=sc.nextInt();
        int alarm=sc.nextInt();
        
        int plus_min=alarm*(n-1);
        min+=plus_min;
        
        int plus_hour=min/60;
        min=min%60;
        
        hour+=plus_hour;
        hour=hour%24;
        
        System.out.println(hour);
        System.out.println(min);
        
    }
}
0