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<stdio.h>
int main()
{
	int kimatsu[5], goukei = 0,a,i;
	for (i = 0; i < 5; i++)
	{
		scanf("%d", &kimatsu[i]);
		for (a = 40; kimatsu[i] < a;)
		{
			kimatsu[i] = 40;
		}
	}
	goukei =( kimatsu[0] + kimatsu[1] + kimatsu[2] + kimatsu[3] + kimatsu[4])/5;
	printf("%d\n",goukei);

	return 0;
}

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

int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
		}
		
		for(int i=0;i<5;i++){
			if(a[i]<40)
			a[i]=40;
			}
			int f=a[0]+a[1]+a[2]+a[3]+a[4];
				cout<<f/5<<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("%d\n" sum / 5);

	return 0;
}

C++: #include <stdio.h>

int main(){
   int i1[2] = {};
   for(int n = 0; n < 5; n++){
     scanf("%d",&i1[1]);
     if(i1[1] <= 40) i1[0] += 40;
     else i1[0] += i1[1];
   }
   printf("%d\n",i1[0] / 5);
}

C++: #include<stdio.h>
#include <iostream>
#include<string>
#include<algorithm>
#include<sstream>
#include<math.h>
int main() {
	int a[5];
	int ans=0;
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
		if (a[i] < 40)a[i] = 40;
		ans += a[i] / 5;
	}
	cout << ans << endl;
	return 0;
}

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

int main(void){

  int buf,res=0;

  for(int i=0;i<5;i++){
    cin >> buf;
    res += (buf < 40)? 40 : buf;
  }

  res /= 5;

  cout << res << endl;

  return 0;
}

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

using namespace std;

int main(void) {
  int s = 0;
  for (int i = 0; i < 5; i++) {
    int a;
    cin >> a;
    s += a < 40 ? 40 : a;
  }

  cout << s / 5 << endl;

  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

int main() {
  int a, b = 0;
  for(int i = 0; i < 5; i++) {
    cin >> a;
    b += a < 40 ? 40 : a;
  }
  cout << b << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c, d, e,f;
cin >> a, b, c, d, e;
f =(a + b + c + d + e) / 5
cout << f<< endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using PL = pair<ll, ll>;
// Welcome to my source code!

int main() {
    int sum = 0;
    for (int i = 0, s; i < 5; i++) {
        cin >> s;
        s = max(s, 40);
        sum += s;
    }
    cout << sum / 5 << endl;
}

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

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

int main() {
	int sum = 0;
	int a;
	for(int i = 0;i < 5;i++){
	    cin >> a;
	    if(a > 40) sum += a;
	    else sum += 40;
	}
	cout << sum/5;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
 
int a,b,c,d,e;

  cin>>a>>b>>c>>d>>e;

   if(a<40) a = 40;
   if(b<40) b = 40;
   if(c<40) c = 40;
   if(d<40) d = 40;
   if(e<40) e = 40;

cout<< (a+b+c+d+e)/5<<endl;




return 0;
}

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int main()
{
	int sum = 0;
	for(int i = 0; i < 5; i++)
	{
		sum += max(40, in());
	}
	printf("%d\n", sum / 5);
	return (0);
}

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a, b=0;
	REP(i, 5) {
		in >> a;
		if (a <= 40)a = 40;
		b += a;
	}

	
	out << b/5 << endl;
	return 0;

}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
	int a[5],con;

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

	cout << con / 5;
}

C++: #include <iostream>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-10;
const vi emp;

int sum;

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

C++: #include<iostream>

using namespace std;

int main(){
  int sum = 0;
  for(int i = 0; i < 5; i++){
    int score;
    cin >> score;
    sum += max(40, score);
  }
  cout << sum/5 << endl;
  return 0;
}

C++: #include<iostream>

int main(){
	int a, b, c, d, e;
	std::cin >> a >> b >> c >> d >> e;
	int sum = 0;
	sum += (a > 40 ? a : 40) + (b > 40 ? b : 40) + (c > 40 ? c : 40) + (d > 40 ? d : 40) + (e > 40 ? e : 40);
	std::cout << sum / 5 << std::endl;
	return 0;
}