結果

問題 No.70 睡眠の重要性!
ユーザー naimonon77naimonon77
提出日時 2015-10-04 14:00:45
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 686 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 65,868 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-27 01:56:59
合計ジャッジ時間 1,046 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
#include <cstdio>
using namespace std;

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/* */
/* 入力開始! */
/* 入力終了! */
int main(void)
{
  int i,j,k,l;
  int n;
  int H1,M1,h1,m1;
  int e;
  int sum = 0;
  cin >> n;
  rep(i,n) {
     e = 0;
     scanf("%d:%d %d:%d",&H1,&M1,&h1,&m1);
     e = h1*60 + m1 -(H1*60 + M1);
     if(e < 0) e += 60*24;
     sum += e;
  }
  printf("%d\n",sum);
  return 0;
}
0