結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-10 15:53:33 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 405 bytes |
| コンパイル時間 | 356 ms |
| コンパイル使用メモリ | 26,496 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-10 15:53:35 |
| 合計ジャッジ時間 | 1,961 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’:
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 <stdlib.h>
#include <string.h>
void uint2str(char str[], size_t len, double num) {
snprintf(str, len, "%1.f", num);
}
void main(void){
char t[100] = "a" ;
char str[100] = "a";
scanf("%s",t);
strncpy(str, t, 2);
str[2] = '\0';
int time = atoi(str)*60;
strncpy(str, t+3, 2);
str[2] = '\0';
time += atoi(str)+5;
printf("%02d:%02d\n", time / 60 % 24, time % 60);
}
Maeda