結果

問題 No.70 睡眠の重要性!
ユーザー 0w1
提出日時 2016-11-20 11:33:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 379 bytes
コンパイル時間 1,370 ms
コンパイル使用メモリ 165,448 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 06:51:35
合計ジャッジ時間 1,803 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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

signed main(){
  int N; cin >> N;
  int ans = 0;
  for( int i = 0; i < N; ++i ){
    int H, M, h, m;
    scanf( "%d:%d", &H, &M );
    scanf( "%d:%d", &h, &m );
    int x = H * 60 + M;
    int y = h * 60 + m;
    int d = ( ( y - x ) % ( 60 * 24 ) + ( 60 * 24 ) ) % ( 60 * 24 );
    ans += d;
  }
  cout << ans << endl;
  return 0;
}
0