結果

問題 No.296 n度寝
ユーザー ontama_12ontama_12
提出日時 2016-09-28 15:57:21
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 808 bytes
コンパイル時間 29 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 39,296 KB
最終ジャッジ日時 2024-04-21 01:32:10
合計ジャッジ時間 1,796 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 67 ms
39,168 KB
testcase_04 AC 62 ms
39,168 KB
testcase_05 AC 62 ms
39,168 KB
testcase_06 AC 63 ms
39,168 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 62 ms
39,040 KB
testcase_11 AC 65 ms
38,912 KB
testcase_12 WA -
testcase_13 AC 63 ms
38,912 KB
testcase_14 AC 69 ms
39,296 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

    /////////////////////////////No.296 n度寝
    //入力文字読み取り
      var inputall = require('fs').readFileSync('/dev/stdin', 'utf8');

    //すべて受け取り改行で区切って格納
      var input = inputall.split(" ");

    //何度寝か
      var sleep = Number(input[0]);

    //時間、分を 分に変換
      var hour = Number(input[1])
      var minute = Number(input[2])

    //タイマー間隔
      var timer = Number(input[3])
    
      var minute_all = hour * 60 + minute;

    //起きた時間
      var minute_all_sleep = minute_all + timer * (sleep - 1);

    //分を時間、分に変換
      var minute_sleep = minute_all_sleep % 60;

      var hour_sleep = Math.floor(minute_all_sleep / 60);

      console.log(hour_sleep);
      console.log(minute_sleep);
0