Submission #2654

#TimeUsernameProblemLanguageResultExecution timeMemory
2654domece최댓값 (tutorial2)C11
Compilation error
0 ms0 KiB
#include <stdio.h> #include <assert.h> #include <malloc.h> int GetMax(int N, int *A); int main(){ int i, tmp; int N; tmp = scanf("%d", &N); assert(tmp == 1); int *A = (int*) malloc( sizeof(int) * N ); for(i = 0; i < N; i++){ tmp = scanf("%d", &A[i]); assert(tmp == 1); } printf("%d\n", GetMax(N, A)); return 0; } int GetMax(int N,int *A){ int i,TmpMax=-1; for(i=0;i<N;i++){ if(TmpMax<A[i]) TmpMax=A[i]; } return TmpMax; }

Compilation message (stderr)

/tmp/ccUPWZgK.o: In function `main':
tutorial2.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccuYVmff.o:grader.c:(.text.startup+0x0): first defined here
collect2: ld returned 1 exit status