제출 #145773

#제출 시각아이디문제언어결과실행 시간메모리
145773lkyeon328최댓값 (tutorial2)C++14
0 / 100
5 ms376 KiB
#include <iostream>
using namespace std;
int GetMax(int n, int *arr){
    int ans = -1;
    for (int i = 0; i < n; i++){
        ans = max(ans, arr[i]);
    }
    cout << ans;
}

컴파일 시 표준 에러 (stderr) 메시지

tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...