結果
問題 | No.70 睡眠の重要性! |
ユーザー |
|
提出日時 | 2018-05-13 16:18:57 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 1,300 ms |
コンパイル使用メモリ | 157,952 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 10:02:30 |
合計ジャッジ時間 | 1,766 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d:%d", &H, &M); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d:%d", &h, &m); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int H,M,h,m,N,ans=0; cin >> N; for(int i=0;i<N;i++){ scanf("%d:%d", &H, &M); scanf("%d:%d", &h, &m); ans+=(24*60-((H*60+M)-(h*60+m)))%(24*60); } cout << ans << endl; return 0; }