結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2015-01-29 04:00:47 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 0 ms / 5,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 03:44:59 |
合計ジャッジ時間 | 561 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d:%d %d:%d", &a, &b, &c, &d); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>int main(){int n;while (~scanf("%d", &n)) {int res=0;while (n--) {int a, b, c, d;scanf("%d:%d %d:%d", &a, &b, &c, &d);int x=a*60+b, y=c*60+d;if (x>y) y+=24*60;res+=y-x;}printf("%d\n", res);}}