SWEA 3314 보충학습과 평균

1 개요[ | ]

SWEA 3314 보충학습과 평균
SW Expert 아카데미
# 문제 풀이

틀:SWEA 난이도 3-4

2 C++[ | ]

3 Java[ | ]

import java.util.*;
public class Solution {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		for(int tc=1; tc<=T; tc++) {
			int sum = 0;
			for(int i=0; i<5; i++) {
				int score = sc.nextInt();
				if( score < 40 ) score = 40;
				sum += score;
			}
			System.out.format("#%d %d\n",tc, sum/5);
		}
		sc.close();
	}
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}