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

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

C++: #include "iostream"
#include "math.h"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
using namespace std;

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

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

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,con;

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

	cout << con / 5 << endl;
}

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

int main() {
	vector<int> a(5);
	for (int& i : a) {
		cin >> i;
		i = max(40, i);
	}
	cout << accumulate(a.begin(), a.end(), 0) / 5 << endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

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

C++: #include<iostream>
using namespace std;
int main() {
	int a, sum = 0;
		for (int i = 0; i < 4; i++) {
			cin >> a;
			sum += a;
	}
		cout << sum / 60 << endl << sum % 60 << endl;
}
/*#include<iostream>
using namespace std;
int main() {
	int min1 = 2000, min2 = 2000, a;
	for (int i = 0; i < 3; i++) {
		cin >> a;
		if (min1 > a)min1 = a;
	}
	for (int i = 0; i < 2; i++) {
		cin >> a;
		if (min2 > a)min2 = a;
	}
	cout << min1 + min2-50 << endl;
}*/
/*#include<iostream>
using namespace std;
int main() {
	int a[5], b[2] = {1}, sum = 0;
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
	}
	while (a[1] > a[3]*b[0]) {
		b[0]++;
		//cout << "bakatoy" << endl;
	}
	while (a[2] > a[4]*b[1]) {
		b[1]++;
		//cout << "bakatoy" << endl;
	}
	if (b[0] > b[1]) {
		cout << a[0]-b[0] << endl;
	}
	else {
		cout << a[0]-b[1] << endl;
	}
}*/

C++: #include<iostream>
using namespace std;
int main() {
	int p[5];
	int a = 0, b = 0;
	for (int i = 0; i < 5; ++i) {
		cin >> p[i];
		if (p[i] < 40) {
			p[i] = 40;
		}
		a = a + p[i];
	}
	b = a / 5;
	cout << b << endl;
	system("pause");
}

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

int main(){


	int a,b,c,d,e;
	cin >> a >> b >> c >> d >> e ;


	int answer;
	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;
	}
	answer=(a+b+c+d+e)/5;
	cout <<answer <<endl;





	/*
	int a,b,c,d,e; 
	cin >> a >> b >> c >> d >> e;
	int answer;


	if(a<0){
		answer=-a*c+e*b+d;
	      }

	if(a>0){
		answer=e*b-e*a;
	}
	cout << answer <<endl;
	*/

	return 0;
}

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

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

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

int main()
{
int a,b,c,d,e;
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;

cout<<(a+b+c+d+e)/5<<'\n';

return 0;
}

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

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,con;

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

	cout << con / 5 << endl;
}

C++: #include <stdio.h>
int main () {
    int data[5],i,avg;
    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];
    }
    avg = sum / 5;
    printf("%d\n",avg);
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,d,e,s;
	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;}

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

	cout<<s<<endl;

	return 0;
}

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

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

	return 0;
}

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

int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
		}
		
		for(int i=0;i<5;i++){
			if(a[i]<40)
			a[i]=40;
			}
			int f=a[0]+a[1]+a[2]+a[3]+a[4];
				cout<<f/5<<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("%d\n" sum / 5);

	return 0;
}

C++: #include <stdio.h>

int main(){
   int i1[2] = {};
   for(int n = 0; n < 5; n++){
     scanf("%d",&i1[1]);
     if(i1[1] <= 40) i1[0] += 40;
     else i1[0] += i1[1];
   }
   printf("%d\n",i1[0] / 5);
}

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