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>
using namespace std;
int main()
{
	int i,g=0, n[5];
	for (i = 0; i < 5; i++)
	{
		cin >> n[i];
		if (n[i] >= 40)
			g = g + n[i];
		else
		{
			n[i] = 40;
			g = g + n[i];
		}
	}
	g /= 5;
	cout << g << endl;
	return 0;
}

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

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

int main() {
	int sum = 0;
	rep(i, 5) {
		int score;
		cin >> score;
		sum += (score < 40 ? 40 : score);
	}

	cout << sum / 5 << endl;

	return EXIT_SUCCESS;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define POF pop_front
#define POB pop_back
#define MA make_pair
#define ll long long
#define VE vector<int>
#define VP vector<pair<int,int> >
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
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 <stdio.h>
int main(){
	int i,score[5],sum,ave;
	for(i = 0;i < 5;i++){
		scanf("%d",&score[i]);
		if(score[i] < 40){
			sum += 40;
		}else{
		sum += score[i];
		}
	}
	ave = sum / 5;
	printf("%d\n",ave);
	return 0;
}

C++: #include<bits/stdc++.h>
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;

#define llong long long
#define inf 999999999
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<PP, int> PPP;
typedef struct data{
	int now;
	int cost;
}data;
int nh[4] = {1, 0, -1, 0};
int nw[4] = {0, 1, 0, -1};





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

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

int main(){
  int a[5];
  double ave = 0.0;

  for(int i = 0 ; i < 5 ; i++){
    cin >> a[i];
    ave += (a[i] >= 40 ?  a[i] : 40);
  }
  cout << ave / 5 << endl;

  return 0;
}

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

using namespace std;

int main() {
    int total_score = 0, score;
    for(int i = 0; i < 5; i++) {
        cin >> score;
        total_score += max(40, score);
    }

    cout << total_score / 5 << endl;
}

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

int main(int argc, char const *argv[]) {
	int tensu[5], ave = 0;

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

	ave /= 5;

	cout << ave << endl;

	return 0;
}

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

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

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

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

using namespace std;

int main()
{
    int a = 0;
    for (int i = 0; i < 5; i++){
        int p;
        scanf("%d", &p);
        a += max(8, p / 5);
    }
    printf("%d\n", a);
    
    return (0);
}

C++: #include<iostream>

using namespace std;

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

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) 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 r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int a[5],s=0;
r(i,5)cin>>a[i];
r(i,5){
if(a[i]<40)s+=40;
else s+=a[i];
}
cout<<s/5<<endl;
}

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>

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

	return 0;
}

C++: #include<iostream>
using namespace std;
int maxnum(int x,int y);
int main(){
    int score[5] = {0};
    int ssub = 0;
    for(int i = 0;i < 5;i++){
        cin >> score[i];
        if(score[i] < 40){
            score[i] = 40;
        }
        ssub+=score[i];
    }

    cout << ssub/5 << 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++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int a = 0;
    for (int i = 0; i < 5; i++){
        int p;
        scanf("%d", &p);
        a += min(8, p / 5);
    }
    printf("%d\n", a);
    
    return (0);
}

C++: #include <stdio.h>

int main(void) {
	int i, x, sum = 0;
	for(i = 0; i < 5; ++i) {
		scanf("%d", &x);
		if(x < 40) {
			sum += 40;
		} else {
			sum += x;
		}
	}
	printf("%d\n", sum / 5);
	return 0;
}

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

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

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

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

C++: #include<stdio.h>

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

printf("%d\n",x/5);
return 0;
}

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

int main(){
  int a[5];
  int b=0;
  for(int i; i<5; i++){
    cin>>a[i];
    a[i]=a[i]/5
      if(a[i]<8){
      a[i]=8}
    b=b+a[i];
    
      }
  cout<<b<<endl;
}

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 <bits/stdc++.h>
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;
}

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

int main(){
  int total = 0;

  for(int i = 0; i < 5; i++){
    int x;
    cin >> x;
    total += max(40, x);
  }

  cout << total / 5 << endl;
}

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

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