結果

問題 No.296 n度寝
ユーザー makonagix
提出日時 2017-01-04 15:02:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 342 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 54,284 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-07 02:52:12
合計ジャッジ時間 851 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	long int n, h, m, t;
	long long int x, y, z, w; //xははじめの時間、yはn度寝にかかる時間、zはおわりの時間
	cin >> n >> h >> m >> t;
	x = 60 * h + m;
	y = (n - 1) * t;
	z = x + y;
	w = z % 1440;
	cout << w / 60 << endl << w - (w / 60) * 60 << endl;
	return 0;
}
0