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 <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int d[5]={},ans=0;
	rep(i,0,5){
		cin>>d[i];
		if(d[i]<40) d[i]=40;
		ans+=d[i];
	}
	o(ans/5);
}

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

C++: #include <stdio.h>
int main(void){
	
	int a,b,c,d,e,ans;
	
	scanf("%d %d %d %d %d",&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;
	}
	ans = a + b + c + d + e;
	
	ans = ans / 5;
	
	printf("%d",ans);
	
	return 0;
	
}

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

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

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

int main(int argc, char const* argv[])
{
  int i, input;
  vector<int> scores;

  for (i = 0; i < 5; i++) {
    cin >> input;
    if (input < 40) { input = 40; }
    scores.push_back(input);
  }

  cout << accumulate(scores.begin(), scores.end(), 0) / 5 << endl;

  return 0;
}

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

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int A,B,C,D,E;
int main() {
	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<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<numeric>
#define INF 1e+8
#define EPS 1e-8
#define PB push_back
#define fi first
#define se second
#define rep(i,j) for(int  i = 0; i < (j); i++)
#define reps(i,j,k) for(int i = j; i < k; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
int main(){
    int sum = 0;
    rep(i,5){
        int tmp;
        scanf("%d",&tmp);
        sum += (tmp > 40) ? tmp : 40;
    }
    printf("%d\n",sum/5);
    return 0;
}

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

C++: #include <iostream>

using namespace std;
int main(){
	int value = 0;
	int score;
	for(int i=0; i < 5; i++){
		cin >> score;
		if(score < 40) value += 40;
		else value += score;
	}
	cout << value/5 << endl;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int a, s;
int main() {
	for(int i = 0; i < 5; i++) cin >> a, s += max(a, 40);
	cout << s / 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 <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <queue>
#include <map>
#include <stack>
using namespace std;

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

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

int main(){

    double a,ans=0;

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

    cout << ans << 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;
if(n<40) n=40;
a=a+n;

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

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

int main()
{
        std::array<int, 5> scores;

        for(int& i : scores)
        {
                std::cin >> i;
                if(i < 40)
                {
                        i = 40;
                }
        }

        int sum = std::accumulate(scores.begin(), scores.end(), 0);

        std::cout << sum / scores.size() << std::endl;
        
        return 0;
}

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/5 << endl;
  return 0;
}

C++: //2013
#include<iostream>
using namespace std;
int main(void){
	int a,b,c,d,e,ave=0;
	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>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;
	ave=(a+b+c+d+e)/5;
	cout<<ave<<endl;
	return 0;
}

C++: #include<bits/stdc++.h>
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) c=40;
 if(d <= 40) d=40;
 if(e <= 40) e=40;
  cout<<(a+b+c+d+e)/5<<endl;
  return 0;
 }

C++: #include <stdio.h>

int main(void) {
    int i, a;
    int s = 0;
    for (i = 0; i < 5; i++) {
        scanf("%d", &a);
        if (a < 40)
            s += 40;
        else
            s += a;
    }

    printf("%d\n", s / 5);
}

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