結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-08 06:05:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 5,000 ms |
| コード長 | 361 bytes |
| コンパイル時間 | 697 ms |
| コンパイル使用メモリ | 72,676 KB |
| 最終ジャッジ日時 | 2025-01-08 16:55:42 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
int ans=0;
while(n--){
int a,b,c,d; char z; cin >> a >> z >> b >> c >> z >> d;
int e=a*60+b,f=c*60+d;
if(e>f){
f+=60*24;
}
ans+=f-e;
}
cout << ans << endl;
}