結果
問題 | No.70 睡眠の重要性! |
ユーザー | Syuutaro |
提出日時 | 2018-03-14 20:04:51 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 424 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 24,596 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-19 09:43:17 |
合計ジャッジ時間 | 917 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge9 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,380 KB |
ソースコード
#include <stdio.h> int main(){ //iuput int N; scanf("%d",&N); int total = 0; for (int i = 0;i < N;i++){ int H,M,h,m; scanf("%d:%d %d:%d",&H,&M,&h,&m); int start = 60*H+M; int end = 60*h+m; if (start <= end){ total += end-start; }else{ total += 1440-start+end; } } //output printf("%d\n",total); return 0; }