Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	sum := 0
	for i := 0; i < 5; i++ {
		x := nextInt()
		if x < 40 {
			sum += 40
		} else {
			sum += x
		}
	}
	fmt.Println(sum / 5)
}

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;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define range(i,a,n) for(int i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int ans=0,in;
	rep(i,5)cin>>in,ans+=max(in,40);
	cout<<ans/5<<endl;
}

C++: #include <iostream>
using namespace std;
int main(){

int a,b,c,d,e,f;

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;

     f=(a+b+c+d+e)/5;

cout <<f<<endl;



return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,sum=0;
  for(int i=0; i<5; i++){
    cin >> a;
    if(a<40) a =40;
    sum += a;
  }
  cout << sum/5 << endl;

 return 0;
}