package com.backjun.algorithm;

import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

		ArrayList<Integer> arr = new ArrayList();
		String line;
		int cnt =0;
		while (true){
			line = br.readLine();
			int score = Integer.parseInt(line);
			if(score >= 40){
				arr.add(score);
			} else {
				arr.add(40);
			}
			cnt++;
			if(cnt==5){
				break;
			}
		}
		int result = (int)arr.stream().mapToInt(Integer::intValue).average().getAsDouble();
		System.out.println(result);

//		bw.flush();
//		bw.close();

	}
}

'알고리즘 > acmicpc.net' 카테고리의 다른 글

#5543  (0) 2020.07.13
1110  (0) 2020.07.10
10951&10952  (0) 2020.07.10
10871  (0) 2020.07.08
2439  (0) 2020.07.08

+ Recent posts