結果

問題 No.296 n度寝
ユーザー masa
提出日時 2015-11-06 22:25:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 257 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 55,384 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 22:19:22
合計ジャッジ時間 1,142 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>

using namespace std;

int main() {
	long long n, h, m, t;

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

	long long ans = h * 60 + m;
	ans += t * (n - 1);
	ans %= 1440;

	cout << ans / 60 << endl;
	cout << ans % 60 << endl;
	return 0;
}
0