結果

問題 No.70 睡眠の重要性!
ユーザー koba-e964koba-e964
提出日時 2015-05-24 10:17:13
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 1,242 ms
コンパイル使用メモリ 146,532 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 11:12:21
合計ジャッジ時間 1,803 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int tk(string s){
istringstream iss(s);
int k,q;
iss>>k;
iss.ignore();
iss>>q;
return k * 60 + q;
}
int main(){
int n;cin>>n;
int s =0;
for(int i=0;i<n;i++){
string d1,d2;
cin>>d1>>d2;
int d = tk(d2) - tk(d1);
d +=1440;
d%=1440;
s+=d;
}
cout<<s<<endl;
}
0