結果
問題 |
No.525 二度寝の季節
|
ユーザー |
![]() |
提出日時 | 2017-06-14 22:22:16 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 23:25:09 |
合計ジャッジ時間 | 1,056 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
コンパイルメッセージ
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++; d=d-60; } if(c>23){ c=0; } printf("%02d:%02d\n",c,d); return 0; }