結果
| 問題 | No.70 睡眠の重要性! | 
| コンテスト | |
| ユーザー |  ldsyb | 
| 提出日時 | 2016-03-02 17:29:36 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 354 bytes | 
| コンパイル時間 | 570 ms | 
| コンパイル使用メモリ | 55,772 KB | 
| 実行使用メモリ | 6,940 KB | 
| 最終ジャッジ日時 | 2024-09-24 13:30:33 | 
| 合計ジャッジ時間 | 1,089 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
ソースコード
#include <iostream>
using namespace std;
int main(){
   int ans = 0,n;
   char colon;
   cin >> n;
   for(int i = n,H,M,h,m;i--;){
      cin >> H >> colon >> M >> h >> colon >> m;
      while(H != h || M != m){
         ans++;
         if(++M == 60){
            M = 0;
            if(++H == 24) H = 0;
         }
      }
   }
   cout << ans << endl;
}
            
            
            
        