結果

問題 No.70 睡眠の重要性!
ユーザー nenuon
提出日時 2017-06-23 19:35:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 621 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 87,476 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-04 00:52:29
合計ジャッジ時間 1,116 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
  int n;
  cin >> n;
  long long ans = 0;
  FOR(i,0,n){
    int a1, a2, b2, b1;
    char c1, c2;
    cin >> a1 >> c1 >> b1 >> a2 >> c2 >> b2;
    if(a1 > a2) a2 += 24;
    a1 *= 60;
    a2 *= 60;
    a1 += b1;
    a2 += b2;
    ans += a2 - a1;
  }
  cout << ans << endl;
  return 0;
}
0