Submission #36620449
Source Code Expand
#include <stdio.h>
int main(void){
int h, m;
scanf("%d %d", &h, &m);
int flag = 1;
int h2, m2;
while(flag){
while(flag){
h2 = (h / 10) * 10 + (m / 10);
m2 = (h % 10) * 10 + (m % 10);
if(0 <= h2 && h2 <= 23 && 0 <= m2 && m2 <= 59){
printf("%d %d\n", h, m);
flag = 0;
break;
}
if(m == 59){
m = 0;
break;
}
else{
m++;
}
}
if(h == 23){
h = 0;
}
else{
h++;
}
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Misjudge the Time |
| User | Cebu |
| Language | C (GCC 9.2.1) |
| Score | 200 |
| Code Size | 481 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 1688 KiB |
Compile Error
./Main.c: In function ‘main’:
./Main.c:5:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
5 | scanf("%d %d", &h, &m);
| ^~~~~~~~~~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 7 ms | 1608 KiB |
| 00_sample_01.txt | AC | 2 ms | 1648 KiB |
| 00_sample_02.txt | AC | 1 ms | 1612 KiB |
| 01_random_00.txt | AC | 1 ms | 1604 KiB |
| 01_random_01.txt | AC | 1 ms | 1640 KiB |
| 01_random_02.txt | AC | 1 ms | 1676 KiB |
| 01_random_03.txt | AC | 1 ms | 1632 KiB |
| 01_random_04.txt | AC | 1 ms | 1688 KiB |
| 02_handmade_00.txt | AC | 1 ms | 1652 KiB |
| 02_handmade_01.txt | AC | 1 ms | 1636 KiB |
| 02_handmade_02.txt | AC | 2 ms | 1652 KiB |
| 02_handmade_03.txt | AC | 2 ms | 1636 KiB |
| 02_handmade_04.txt | AC | 2 ms | 1688 KiB |
| 02_handmade_05.txt | AC | 2 ms | 1608 KiB |
| 02_handmade_06.txt | AC | 1 ms | 1684 KiB |