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

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

int main(void){

  int buf,res=0;

  for(int i=0;i<5;i++){
    cin >> buf;
    res += (buf < 40)? 40 : buf;
  }

  res /= 5;

  cout << res << endl;

  return 0;
}

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

using namespace std;

int main(void) {
  int s = 0;
  for (int i = 0; i < 5; i++) {
    int a;
    cin >> a;
    s += a < 40 ? 40 : a;
  }

  cout << s / 5 << endl;

  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

int main() {
  int a, b = 0;
  for(int i = 0; i < 5; i++) {
    cin >> a;
    b += a < 40 ? 40 : a;
  }
  cout << b << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c, d, e,f;
cin >> a, b, c, d, e;
f =(a + b + c + d + e) / 5
cout << f<< endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using PL = pair<ll, ll>;
// Welcome to my source code!

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

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

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

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

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int main()
{
	int sum = 0;
	for(int i = 0; i < 5; i++)
	{
		sum += max(40, in());
	}
	printf("%d\n", sum / 5);
	return (0);
}