結果
問題 |
No.525 二度寝の季節
|
ユーザー |
![]() |
提出日時 | 2017-06-14 22:20:12 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 852 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 23:23:59 |
合計ジャッジ時間 | 1,521 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 28 WA * 5 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:16:11: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration] 16 | c=atoi(a); | ^~~~ main.c:13:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s",t); | ^~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> int main(){ char t[5]; char* a; char * b; int c,d; scanf("%s",t); a=strtok(t,":"); b=strtok(NULL," "); c=atoi(a); d=atoi(b); d+=5; if(d>=60){ c++; } if(c>23){ c=0; } printf("%02d:%02d\n",c,d); return 0; }