Skip to content

Conversation

HereYeseo
Copy link
Contributor

문제 설명

정수를 담고 있는 배열 arr의 평균값을 return하는 함수, solution을 완성해보세요.

제한사항

  • arr은 길이 1 이상, 100 이하인 배열입니다.
  • arr의 원소는 -10,000 이상 10,000 이하인 정수입니다.

입출력 예

arr return
[1,2,3,4] 2.5
[5,5] 5

@HereYeseo HereYeseo requested a review from LHyunn January 25, 2023 06:15
@HereYeseo HereYeseo self-assigned this Jan 25, 2023
Copy link
Collaborator

@LHyunn LHyunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코멘트 달앗음

Copy link
Collaborator

@LHyunn LHyunn Jan 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for문 안쓰는게 시간복잡도 면에서 이득이지 않냐고 하려다가 sum() / len()도 n인걸 찾아보고는 그냥 거기서 거기구나 하는걸 느꼈음. 괜찮은듯

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

약수는 그 수의 제곱근까지만 확인하면 됨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants