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>
using namespace std;
 
int main() {
  int n, m;
   
  cin >> n >> m;
  int A[1000], B[1000];
  for(int i=0; i<n; i++) {
    cin >> A[i];
  }
   
  int cnt[1000]={};
   
  for(int i=0; i<m; i++) {
    cin >> B[i];
  }
   
  for(int j=0; j<m; j++) {
      for(int i=0; i<n; i++) {
    if(B[j] >= A[i]) {
      cnt[i] ++;
      break;
    }
      }
  }
 
   
   
  int mx = 0, num = 0;
  for(int i=0; i<n; i++) {
    if(mx < cnt[i]) {
      num = i;
      mx = cnt[i];
    }
  }
   
  cout << num + 1 << endl;
   
  return 0;
}

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

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){
		j=40;
	}
	
	ans=(t+j+sa+shi+h)/5;
	
	printf("%d\n",ans);
	
	
	
	
	
	
	return 0;
}

C++: /*
	0592:Average Score
*/
#include	<iostream>

using namespace std;

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

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(void)
{
	int a,i,x;
	x=0;
	for(i=0;i<5;i++){
		cin>>a;
		if(a<=40) x=x+40;
		else x=x+a;
	}
	x=x/5;
	cout<<x<<endl;
	return 0;
}

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