結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-25 15:09:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 471 bytes |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 56,668 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 19:54:09 |
| 合計ジャッジ時間 | 1,361 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main()
{
int N, sum = 0;
string HM, hm;
cin >> N;
for(int i = 0; i < N; ++i)
{
cin >> HM >> hm;
sum += (((24 * 60)
+ (stoi(hm.substr(0, hm.find(':'))) * 60 + stoi(hm.substr(hm.find(':') + 1, hm.length() - hm.find(':') - 1))
- (stoi(HM.substr(0, HM.find(':'))) * 60 + stoi(HM.substr(HM.find(':') + 1, HM.length() - HM.find(':') - 1)))))
% (24 * 60));
}
cout << sum << endl;
return 0;
}