結果
| 問題 | No.525 二度寝の季節 | 
| コンテスト | |
| ユーザー |  Anonymo94934790 | 
| 提出日時 | 2017-08-05 21:58:12 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 283 bytes | 
| コンパイル時間 | 326 ms | 
| コンパイル使用メモリ | 20,608 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-11 20:43:07 | 
| 合計ジャッジ時間 | 1,550 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 33 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:1: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
   11 | gets(s);
      | ^~~~
      | fgets
main.c:17:3: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
   17 | x=atoi(h);
      |   ^~~~
/usr/bin/ld: /tmp/ccoRnNwy.o: in function `main':
main.c:(.text.startup+0x20): 警告: the `gets' function is dangerous and should not be used.
            
            ソースコード
#include <stdio.h>
#include<string.h>
int main(void)
{
char s[6];
int i;
int x;
int d;
char h[3],m[3];
gets(s);
h[0]=s[0];
h[1]=s[1];
m[0]=s[3];
m[1]=s[4];
x=atoi(h);
d=atoi(m);
d+=5;
if(d>=60){
	x++;
	d=d-60;
	
	
}
if(x>23){
	
	x=0;
	
	
	
}
printf("%02d:%02d\n",x,d);
	return 0;
}
            
            
            
        