문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWBnA2jaxDsDFAWr


문제의 저작권은 SW Expert Academy에 있습니다.



#include <iostream>
 
using namespace std;
 
int main(void) {
    int T;
    cin >> T;
 
    for(int t_case=0; t_case<T; t_case++) {
        int score, total=0;
        for(int i=0; i<5; i++) {
            cin >> score;
            if(score < 40)
                score = 40;
            total += score;
        }
 
        cout << "#" << t_case+1 << " " << total/5 << "\n";
    }
 
    return 0;
}
cs

+ Recent posts