結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-03-19 13:26:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 1,578 ms |
| コンパイル使用メモリ | 167,416 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 03:08:10 |
| 合計ジャッジ時間 | 2,137 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cin.ignore( numeric_limits<streamsize>::max(), '\n' );
int ans = 0;
for( int i = 0; i < N; i++ ) {
string buf;
getline( cin, buf );
int H, M, h, m;
sscanf( buf.c_str(), "%d:%d %d:%d", &H, &M, &h, &m );
if( h < H ) h += 24;
int st = H * 60 + M;
int end = h * 60 + m;
ans += end - st;
}
cout << ans << endl;
}
forest3