結果

問題 No.70 睡眠の重要性!
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2019-01-06 21:10:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 63,628 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-08-15 16:21:14
合計ジャッジ時間 1,252 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	int ans = 0;
	int N;
	scanf("%d", &N);

	for (int i = 0; i < N; i++)
	{
		int H, M, h, m;
		scanf("%d:%d %d:%d", &H, &M, &h, &m);

		int mini_ans = (h - H + 24) * 60 + m - M;
		mini_ans %= 24 * 60;
		ans += mini_ans;
	}
	cout << ans << endl;
}
0