2587 : 대표값2

풀이

후후

코드

#include <cstdio>
#include <algorithm>
int i, s, a[5];
int main() {
    for (; i < 5; i++) scanf("%d", &a[i]), s += a[i];
    std::sort(a, a + 5);
    printf("%d\n%d", s / 5, a[2]);
    return 0;
}

아무말

백준, 백준 온라인 저지, BOJ, Baekjoon Online Judge, C, C++, 씨, 씨쁠쁠, JAVA, algorithm, 자바, 알고리즘, 자료구조, 문제, 문제 풀이, 풀이

wookje.kwon's profile image

wookje.kwon

2018-04-04 19:45

Read more posts by this author