結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-02 19:49:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 587 bytes |
| コンパイル時間 | 132 ms |
| コンパイル使用メモリ | 22,400 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-05 08:44:10 |
| 合計ジャッジ時間 | 1,144 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d%d",&time,&sec);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
int time = 0;
int sec = 0;
scanf("%d%d",&time,&sec);
sec = sec + 5;
switch (sec)
{
case 64:
sec = 4;
break;
case 63:
sec = 3;
break;
case 62:
sec = 2;
break;
case 61:
sec = 1;
break;
case 60:
sec = 0;
default:
break;
}
if(time == 23)
{
time =0;
}
else
{
time++;
}
printf("%02d:%02d\n", time,sec);
return 0;
}