Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sum := 0.0
	for i := 0; i < 5; i++ {
		sc.Scan()
		s, _ := strconv.Atoi(sc.Text())
		sum += math.Max(float64(s), float64(40))
	}
	fmt.Println(int(sum / 5))

}

C++: #include <stdio.h>

int main(void)
{
	int w,a,b,c,d,e;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%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);}
	w=(a+b+c+d+e)/5;
	printf("%d%",w);
	return 0;
}

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

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

	return 0;
}

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

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

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

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

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

	for(int i = 0; i < 5; i++){
		sum += x[i];
	}

	cout << sum / 5 << endl;

}

C++: #include <cstdio>

int a,b,c,d,e,sum;
int s[5];
int i=0,j=0;
int main (){
		for (i=0;i<5;i++){
			scanf("%d",&s[i]);
		}
		sum=0;
		for(j=0;j<5;j++){
			if(40>s[j]) sum=sum+40;
			else  sum=sum+s[j];
			}
		printf("%d\n",sum/5);
	return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){

	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>

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

using namespace std;


int main(void){
	int sum=0;
	rep(i,5){
		int in;
		cin >> in;
		if(in<40) in=40;
		sum+=in;
	}
	cout << sum/5 << endl;
}

C++: #include<iostream>

using namespace std;

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

  return 0;
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
typedef long long ll;
//typedef complex<double>P;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
const double pi = acos(-1);//3.1415926535897932384626433832795028...
const ll SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
ll fac[200005], finv[200005], inv[200005];
vector<ll>dij;
struct edge { ll to, cost; };
vector<vector<edge> >G;

ll mod_pow(ll a, ll b) {
	ll res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}
	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template<typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}

template<typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T &t, const V &v) { t = v; }

template<typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T &t, const V &v) {
	for (auto &e : t) fill_v(e, v);
}

template<typename T>
void outp(vector<T>v) {
	for (int i = 0; i < v.size(); ++i) {
		cout << v[i];
		if (i != v.size() - 1) { cout << " "; }
	}
}

double add(double a, double b) {
	if (abs(a + b) < EPS*(abs(a) + abs(b))) { return 0; }
	return a + b;
}


//↑template↑

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

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

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

int main(){

	int answer;
	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;


	/*
	int datanum = 0;
	for(int dataset = 0; dataset < 1; dataset++){
		if(input == 0) break;


		answer[dataset] = sum;

		datanum++;
	}

	for(int dataset = 0; dataset < datanum; dataset++){
		cout << answer[dataset] << endl;
	}
	*/

	

	return 0;
}

C++: #include <stdio.h>

int main(void){
	int t,j,sa,shi,h;
	int ans;
	
	scanf("%d %d %d %d %d",&t,&j,&sa,&shi,&h);
	if(t<40){
		t=40;
	}
	if(j<40){
		j=40;
	}
	if(sa<40){
		sa=40;
	}
	if(shi<40){
		shi=40;
	}
	if(h<40){
		h=40;
	}
	
	ans=(t+j+sa+shi+h)/5;
	
	printf("%d\n",ans);
	
	
	
	
	
	
	return 0;
}

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

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

C++: i,a,s;main(){for(;scanf("%d",&a),a=(a>40)?a:40,s+=a,i<4;i++){}printf("%d\n",s/5);}

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

int a, b, c, d, e;
int main() {
  cin >> a >> b >> c >> d >> e;
  cout << (max(a, 40) + max(b, 40) + max(c, 40) + max(d, 40) + max(e, 40)) / 5 << "\n";
  return 0;
}

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

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

C++: #include <iostream>
#include <numeric>

#define N 5

using namespace std;

int main()
{
  int scores[N];

  for(int i = 0; i < N; i += 1){
    cin >> scores[i];
  }

  int sum = accumulate(scores, scores+N, 0);

  cout << ((sum == 0)? 0 : sum/N) << endl;

  return 0;
}

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

int remedial( int a )
{
    if( a < 40 )
        return 40;
    else
        return a;
}

int main()
{
    int a, b, c, d, e;

    cin >> a >> b >> c >> d >> e;
    
    cout << ( remedial(a) + remedial(b) + remedial(c) + remedial(d) + remedial(e) ) / 5  << endl; 
    
    return 0;
}

C++: #include<stdio.h>

int main(){
 int data[10], i, sum, ave;
 for(i = 1, i <= 5, i++){
  scanf("%d", &data[i]);
 if(data[i] < 40) data[i] = 40;
 sum += data[i];
 }
 ave = sum / 5;
 printf("%d", ave);
 return 0;
}

C++: #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
const int INF=1e9;
int main(){
      int ans=0,a;
      REP(i,5){
            cin>>a;
            if(a<40)a=40;
            ans+=a/5;
            cout<<ans<<endl;
      }
      cout<<ans<<endl;
}

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

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

C++: #include<stdio.h>
#include <iostream>
#include<string>
#include<algorithm>
#include<sstream>
#include<math.h>
using namespace std;
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;
}