結果

問題 No.296 n度寝
ユーザー Luna
提出日時 2018-05-10 09:18:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 462 ms
コンパイル使用メモリ 53,852 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 02:56:17
合計ジャッジ時間 1,035 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int main(int argc, char const* argv[]) {
    int n, h, m, t;

    cin >> n >> h >> m >> t;

    int wakeup_time = (h * 60 + m + t * (n - 1)) % 1440;

    int ans_h = wakeup_time / 60;
    int ans_m = wakeup_time % 60;

    cout << ans_h << endl;
    cout << ans_m << endl;

    return 0;
}
0