Submission #28647512
Source Code Expand
#include<stdio.h>
int main(void)
{
int len = 0;
int max = -1;
scanf("%d",&len);
for(int i;i<len;i++)
{
int tmp = 0;
scanf("%d",&tmp);
if(tmp > max)
{
max = tmp;
}
else{
break;
}
}
printf("%d",max);
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Climbing Takahashi |
| User | misaka666 |
| Language | C (GCC 9.2.1) |
| Score | 200 |
| Code Size | 275 Byte |
| Status | AC |
| Exec Time | 20 ms |
| Memory | 1736 KiB |
Compile Error
./Main.c: In function ‘main’:
./Main.c:7:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d",&len);
| ^~~~~~~~~~~~~~~~
./Main.c:11:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%d",&tmp);
| ^~~~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 13 ms | 1656 KiB |
| random_02.txt | AC | 8 ms | 1636 KiB |
| random_03.txt | AC | 14 ms | 1680 KiB |
| random_04.txt | AC | 17 ms | 1728 KiB |
| random_05.txt | AC | 6 ms | 1680 KiB |
| random_06.txt | AC | 2 ms | 1728 KiB |
| random_07.txt | AC | 2 ms | 1724 KiB |
| random_08.txt | AC | 11 ms | 1672 KiB |
| random_09.txt | AC | 9 ms | 1644 KiB |
| random_10.txt | AC | 6 ms | 1688 KiB |
| random_11.txt | AC | 10 ms | 1636 KiB |
| random_12.txt | AC | 8 ms | 1672 KiB |
| random_13.txt | AC | 4 ms | 1656 KiB |
| random_14.txt | AC | 2 ms | 1628 KiB |
| random_15.txt | AC | 20 ms | 1684 KiB |
| random_16.txt | AC | 2 ms | 1708 KiB |
| random_17.txt | AC | 1 ms | 1636 KiB |
| sample_01.txt | AC | 2 ms | 1708 KiB |
| sample_02.txt | AC | 4 ms | 1680 KiB |
| sample_03.txt | AC | 1 ms | 1736 KiB |