結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2019-04-08 21:38:53 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 526 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 29,312 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 22:54:35 |
合計ジャッジ時間 | 750 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
// yukicoder: No.70 睡眠の重要性 // 2019.4.8 bal4u #include <stdio.h> #include <ctype.h> #define gc() getchar() int in() // 非負整数の入力 { int n = 0, c = gc(); while (isspace(c)) c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (isdigit(c)); return n; } int main() { int N, a, b, c, d, t1, t2, ans; ans = 0; N = in(); while (N--) { a = in(), b = in(), c = in(), d = in(); t1 = a * 60 + b, t2 = c * 60 + d; if (t1 > t2) t2 += 1440; ans += t2 - t1; } printf("%d\n", ans); return 0; }