結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2017-07-02 20:01:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-05 08:45:01 |
合計ジャッジ時間 | 888 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 1 WA * 32 |
コンパイルメッセージ
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; if(time == 23 && sec >59) { time =0; } switch (sec) { case 64: sec = 4; time++; break; case 63: sec = 3; time++; break; case 62: sec = 2; time++; break; case 61: sec = 1; time++; break; case 60: sec = 0; time++; default: break; } printf("%02d:%02d\n", time,sec); return 0; }