# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14079 | sleep4725 | 최댓값 (tutorial2) | C11 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int i;
int a;
int max = 0;
scanf("%d", &a);
int* arr = NULL;
arr = (int*)malloc(sizeof(int)*a);
for (i = 0; i < a; i++)
{
scanf("%d", &arr[i]);
}
max = arr[0];
for (i = 1; i < a; i++)
{
if (max < arr[i])
{
max = arr[i];
}
}
printf("%d\n", max);
return 0;
}