結果
問題 |
No.70 睡眠の重要性!
|
ユーザー |
|
提出日時 | 2025-06-30 00:10:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 731 bytes |
コンパイル時間 | 1,771 ms |
コンパイル使用メモリ | 195,388 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-30 00:10:39 |
合計ジャッジ時間 | 2,650 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int answer = 0; while(N--){ string s; cin >> s; int one = 0,two = 0; for(auto c : s){ if(c == ':') swap(one,two); else one *= 10,one += c-'0'; } swap(one,two); int now = 0; now += (23-one)*60; now += 60-two; cin >> s; one = 0,two = 0; for(auto c : s){ if(c == ':') swap(one,two); else one *= 10,one += c-'0'; } swap(one,two); now += one*60+two; now %= 1440; answer += now; } cout << answer << endl; }