結果

問題 No.70 睡眠の重要性!
ユーザー r2en_r2en_
提出日時 2017-03-25 22:16:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 456 ms
コンパイル使用メモリ 63,696 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 10:48:23
合計ジャッジ時間 933 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
    int N; cin >> N;
    int sum = 0;
    int h1 = 0; int h2 = 0;
    int m1 = 0; int m2 = 0;
    for(int i = 0; i < N; ++i){
        scanf("%d:%d %d:%d",&h1,&m1,&h2,&m2);
        sum+=(h1<h2?(h2*60+m1)-(h1*60+m1):((h2+24)*60+m2)-(h1*60+m1));
    }
    cout << sum << endl;
    return 0;
}
0