結果
| 問題 | No.70 睡眠の重要性! | 
| コンテスト | |
| ユーザー |  tenkyu9 | 
| 提出日時 | 2017-11-21 03:42:20 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 520 bytes | 
| コンパイル時間 | 947 ms | 
| コンパイル使用メモリ | 85,312 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-26 05:45:41 | 
| 合計ジャッジ時間 | 1,537 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include<random>
#include<ctime>
#include<cstdlib>
using namespace std;
int main(){
  int n, H, M, h, m;
  char c;
  int ans=0;
  cin >> n;
  for(int i=0; i<n; i++){
    cin >> H >> c >> M >> h >> c >> m;
    while(!(H==h && M==m)){
      ans++;
      M++;
      if(M>59){
        H++;
        M=0;
      }
      if(H>23){
        H=0;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
            
            
            
        