Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

C++: #include<iostream>
using namespace std;
int main() {
	int a;
	int ans;
	ans = 0;
	for (int i = 1; i <= 5; i++) {
		cin >> a;
		if (a <= 40) {
			a = 40;
		}
		ans = ans + a;
	}
	cout << ans / 5 << endl;
}

C++: #include<iostream>
using namespace std;

int main(int argc, char *argv[]){
  int ave = 0;
  int n;
  for (int i = 0; i < 5; i++) {
    cin >> n;
    if(n < 40)n = 40;
    ave += n;
  }
  std::cout << ave / 5 << std::endl;
  return 0;
}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, ans = 0, a;
  for(i = 0; i < 5; ++i) {
    scanf("%d", &a);
    ans += a > 40 ? a : 40;
  }
  ans /= 5;
  printf("%d\n", ans);
  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;

int main()
{
	//平均点

	int P[5];
	int sum=0;
	for (int i = 0; i < 5; i++) {
		cin >> P[i];
		if (P[i] < 40) P[i] = 40;
		sum += P[i];
	}
	cout << sum / 5 << endl;
	//投票
	/*
	int N, M;
	cin >> N >> M;
	int A[1000], vote[1000];
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		vote[i] = 0;
	}
	int b;
	for (int i = 0; i < M; i++) {
		cin >> b;
		for (int j = 0; j < N; j++) {
			if (A[j] <= b) {
				vote[j]++;
				break;
			}
		}
	}
	int temps = 0, ans;
	for (int i = 0; i < N; i++) {
		if (vote[i] > temps) {
			temps = vote[i];
			ans = i;
		}
	}
	cout << ans + 1 << endl;
	*/

	//2.すごろく	
	/*
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int A_count[100];
	A_count[0] = 1;
	for (int i = 0; i < n; i++)
	{
	cin >> A;
	if (A == 1)
	{
	if (A == _A)
	{
	A_count[k]++;
	}
	else
	{
	k++;
	A_count[k] = 2;
	}
	}
	_A = A;
	}
	sort(A_count, A_count + k + 1);
	cout << A_count[k] << endl;
	*/

	//タイムカード
	/*
	int t[2][3];
	int x[3][3];
	for (int n=0; n < 3; n++)
	{
	for (int i=0; i < 2; i++)
	for (int k=0; k < 3; k++)
	cin >> t[i][k];

	for (int m = 2; m >= 0; m--)
	{
	x[n][m] = t[1][m] - t[0][m];
	if (t[0][m] > t[1][m])
	{
	x[n][m] += 60;
	t[1][m - 1]--;
	}
	}
	}
	for (int n= 0; n < 3; n++)
	{
	cout << x[n][0] << ' ' << x[n][1] <<' '<< x[n][2] << endl;
	}
	*/



	return 0;
}

C++:  JOI13-quest1.cpp  Defines the entry point for the console application.


#include <stdio.h>


int main(void)
{
	int temp, sum = 0;
	for (int i = 0; i  5; i++) {
		scanf(%d, &temp);

		if (temp = 40) {
			sum += temp;
		}
		else {
			sum += 40;
		}
	}

	printf(%dn, sum  5);

	return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	cout << (a + b + c + d + e) / 5 << endl;
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int score[10];

int main() {
	int sum = 0;
	for (int i = 0; i < 5; i++) {
		cin >> score[i];
		if (score[i] < 40) {
			score[i] = 40;
		}
		sum += score[i];
	}
	cout << sum / 5 << endl;
}

C++: #include<stdio.h>
int s,a;
int main(){
  for(int i=0;i<5;i++){
    scanf("%d",&a);
    s+=(a<40)?40:a;
  }
  printf("%d\n",s/5);
}

C++: #include <iostream>
using namespace std;
int main(void){
    int T,J,S,Y,H;
    cin>>T>>J>>S>>Y>>H;
    
    if(T<40) T=40;
    if(J<40) J=40;
    if(S<40) S=40;
    if(Y<40) Y=40;
    if(H<40) H=40;
    
    cout<<(T+J+S+Y+H)/5<<endl;
}

C++: #include<iostream>
using namespace std;
int main(){
for (i=1; i<=5; i++){
    cin >> p;
    if(p < 40) { p = 40; }
   sum += p;
}
cout << sum / 5 << endl;
return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
    int t, r;
    for(int i = 0;i < 5;i++){
        cin >> t;
        if(t < 40){
            r += 40;
        }else{
            r += t;
        }
    }
    cout << r / 5 << endl;
    
    return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
  int sum = 0;
  for (int i = 0; i < 5; i++) {
    int score;
    cin >> score;
    if (score < 40) score = 40;
    sum += score;
  }

  cout << sum / 5 << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
	int a[5];
	int f=0;
	for(int i=0;i<5;i++){
		cin>>a[i];
		}
		
		for(int i=0;i<5;i++){
			if(a[i]<40)
			a[i]=40;
			}
			for(int i=0;i<5;i++){
				int f=f+ a[i];
				}
				cout<<f/5<<endl;
	return 0;
	}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<int, P> IP;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<vector<int> > Array2;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	n = 0;
	for (int i = 0; i < 5; i++)
	{
		n += max(getInt(), 40);
	}
	cout << n / 5 << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int sum = 0, x;
	while (cin >> x) sum += x;
	cout << sum / 5 << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
  int a[5],sum=0;

  for(int i=0;i<5;++i){
    cin>>a[i];
    if(a[i]<40) a[i]=40;
    sum+=a[i];
  }

  cout << sum/5 << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <map>
#include <vector>

using namespace std;

int main() {
int a=0;
for(int i=0;i<5;i++){
int n;
cin>>n;
if(n<40) {
n=40;
}

a=a+n;

}
cout<<a/5<<endl;;
	return 0;
}