結果

問題 No.70 睡眠の重要性!
ユーザー AuroraAurora
提出日時 2022-06-13 19:17:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 1,559 ms
コンパイル使用メモリ 166,636 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-04-08 14:14:39
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,548 KB
testcase_01 AC 2 ms
6,548 KB
testcase_02 AC 2 ms
6,548 KB
testcase_03 AC 2 ms
6,548 KB
testcase_04 AC 2 ms
6,548 KB
testcase_05 AC 2 ms
6,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


int main(){
  int N,ans=0;
  cin >> N;
  for(int i=0;i<N;i++){
    int a,b,c,d;
    char e,f;
    cin >> a >> e >> b >> c >> f >> d;
    int A = a*60+b;
    int B = c*60+d;
    B += 1440;
    int C = B-A;
    C %= 1440;
    ans += C;
  }
  cout << ans << endl;
}
0