結果
| 問題 | No.70 睡眠の重要性! | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2014-11-28 02:50:08 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 554 bytes | 
| コンパイル時間 | 868 ms | 
| コンパイル使用メモリ | 82,440 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2025-01-03 10:03:22 | 
| 合計ジャッジ時間 | 1,832 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
#define rep(i,x) for(int i=0;i<(int)(x);i++)
int main(){
	int n, h1, h2, m1, m2, ans = 0;
	char c;
	cin >> n;
	rep(i,n) {
		cin >> h1 >> c >> m1 >> h2 >> c >> m2;
		m1 += h1*60;
		m2 += h2*60;
		ans += m2 - m1;
		if (m2-m1 < 0) ans += 24*60;
	}
	cout << ans << endl;
	return 0;
}
            
            
            
        