Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	sum := 0
	for i := 0; i < 5; i++ {
		score := nextInt()
		if score < 40 {
			sum += 40
		} else {
			sum += score
		}
	}
	// fmt.Println(sum)
	fmt.Println(sum / 5)
}

Python: N=0
for i in range(5):
  N=N+max(40,int(input()))
print(N//5)

Python: s = 0
for i in range(5):
    x = int(input())
    if x < 40:
        x = 40
    s += x
print(s // 5)

Python: x=0
for i in range(5):
    n=int(input())
    if n < 40:
        n=40
    else:
        pass
    x+=n
print(x//5)

Python: lst=[]
for i in range(5):
    a=int(input())
    
    if a>=40:
        a=a
    
    else:
        a=40
    
    lst.append(a)
    
x=sum(lst)
x=int(x/5)
print(x)

Python: sum = 0
for i in range(5):
    score = int(input())
    if score <40:
        score = 40
    sum += score
print(sum//5)

Python: s=0

for i in range(5):
    a=int(input())
    if a <40:
        a=40
    s+=a

print(s//5)

Python: t=0
for i in range(5):
    s=int(input())
    if s<40:s=40
    t+=s
print(t//5)

Python: print(sum([max(int(input()),40) for _ in range(5)]) // 5)

Python: lst=[]
for i in range(5):
    x=int(input())
    if x<40:
        x=40
    lst.append(x)
print(sum(lst)//5)

Python: x=[]
for i in range(5):
    s=int(input())
    if s<40:
        s=40
    x.append(int(s))
total=sum(x)
ave=total/5
print(int(ave))

Python: a=0
for i in range(5):
    b=int(input())
    if b<40:b=40
    a+=b
print(a//5)

Python: a = []
for i in range(5):
    n = int(input())
    if n < 40:
        n = 40
    a.append(n)
A = sum(a) / 5
print(int(A))

Python: print(sum([max(40,int(input())) for _ in range(5)])//5)

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

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
print((a+b+c+d+e)//5)

Python: s = 0
for i in range(5):
    p = int(input())
    if p < 40:
        s += 40
    else:
        s += p
print(s//5)

Python: a=int(input())
if a<40:
    a=40
    
b=int(input())
if b<40:
    b=40
    
c=int(input())
if c<40:
    c=40
    

d=int(input())
if d<40:
    d=40
    

e=int(input())
if e<40:
    e=40
    

print(int((a+b+c+d+e)/5))

Python: N=5
sum=0
for _ in range(N):
    i=int(input())
    if 40<i:
        sum=sum+i
        
    else:
        i=40
        sum=sum+40
print(sum//5)

Python: def main():
    a = []
    for _ in range(5):
        hoge = int(input())
        if hoge < 40:
            hoge = 40
        else:
            pass
        a.append(hoge)

    total = 0
    for score in a:
        total += score

    print(total // 5)


if __name__ == "__main__":
    main()

Python: s = 0
for i in range(5):
    p = int(input())
    if p <= 40 :
        p=40
    s+=p
print(s//5)

Python: sum = 0
for i in range(5):
 a = int(input())
 if a <= 40: a = 40
 sum += a
print(sum//5)

Python: a = [int(input()) for _ in range(5)]
b = [a if a >= 40 else 40 for a in a]
print(sum(b) // 5)

Python: scores = []
for _ in range(5):
    score = int(input())
    if score < 40:
        scores.append(40)
    else:
        scores.append(score)
print(sum(scores)//5)

Python: s=0
for i in range(5):
    a=int(input())
    if a>=40:
        s+=a
    else:
        s+=40
print(int(s/5))

Python: sum=0
for i in range(5):
    a=int(input())
    for j in range(5):
        if a<40:
            a=40
        else:
            a=a
    sum+=a
    

print(int(sum/5))

Python: from statistics import mean

score = [int(input()) for i in range(5)]
score = [score[i] if score[i] >= 40 else 40 for i in range(5)]

print(mean(score))

Python: 
a=[0]*5
for i in range(5):
    a[i] = int(input())
    if a[i]<=40:
        a[i]=40
print(sum(a)//5)

Python: s = 0
for i in range(5):
	a = int(input())
	if a < 40: a = 40
	s += a
print(s//5)

Python: l=[]
for i in range(5):
    n=int(input())
    if n>40:
        l.append(n)
    else:
        l.append(40)
ave = sum(ｌ) / 5
print(int(ave))

Python: a = 0
for i in range(5) :
    b = int(input())
    if b < 40 :
        a += 40
    else :
        a += b
print(a // 5)

Python: s=0
for i in range(5):
    ai=int(input())
    if ai<40:
        ai=40
    s+=ai
print(s//5)

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <random>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int a,b,c,d,e; cin >> a >> b >> c >> d >> e;
	cout << (max(a,40)+max(b,40)+max(c,40)+max(d,40)+max(e,40))/5 << endl;
}

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 <cstdio>
#include <utility>
#include <algorithm>
using namespace std;

#define gcu getchar_unlocked
int in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;}
int in() {return in(gcu());}
bool scan(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bool scan(char &c){c=gcu();gcu();return c!=EOF;}
//bool scan(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
template <typename head, typename... tail>
bool scan(head &h, tail&&... t){return scan(h) && scan(t...);}
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
//vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail> vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T> vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

int main() {
	int sum = 0;
	for (int i = 5; i; i--)
		sum += max(40, in());
	out(sum / 5, '\n');
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
#define INF LLONG_MAX
typedef long long ll;

int tensu(int k)
{
	int score, sum = 0;
	rep(i, k)
	{
		cin >> score;
		if(score<40) sum += 40;
		else sum += score;
	}
	return sum;
}

int ave(int sum, int n)
{
	return sum/n;
}

int main(void)
{
	int score_sum = tensu(5);
	int ans = ave(score_sum, 5);
	cout << ans << endl;
	return 0;
}

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

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

int main(){
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	a=max(40,a);
	b=max(40,b);
	c=max(40,c);
	d=max(40,d);
	e=max(40,e);
	cout << (a+b+c+d+e)/5<<endl;
	return 0;
}