結果

問題 No.70 睡眠の重要性!
ユーザー hiro1729
提出日時 2023-11-25 08:29:57
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 2,980 ms
コンパイル使用メモリ 242,360 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-26 10:12:16
合計ジャッジ時間 3,466 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	int ans = 0;
	while (N--) {
		int sh, sm, eh, em;
		char _1, _2;
		cin >> sh >> _1 >> sm >> eh >> _2 >> em;
		int t = eh * 60 + em - (sh * 60 + sm);
		if (t < 0) {
			t += 1440;
		}
		ans += t;
	}
	cout << ans << '\n';
}
0