Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		for a:=0; a<=9; a++{
			for b:=0; b<=9; b++{
				for c:=0; c<=9; c++{
					for d:=0; d<=9; d++{
						if a+b+c+d==n{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <iostream>
using namespace std;
int main(void){
    int n, x, cnt;
    while(cin >> n){
        x = 0;
        for(int i = 0; i < 10; i++){
            for(int j = i; j < 10; j++){
                for(int k = j; k < 10; k++){
                    for(int l = k; l < 10; l++){
                        if(n == i + j + k + l){
                            cnt = 0;
                            if(i == j || i == k || i == l)  cnt++;
                            if(j == k || j == l)    cnt++;
                            if(k == l)  cnt++;
                            if(cnt == 3)   x ++;
                            else if(cnt == 2)   x += 4; 
                            else if(cnt == 1){
                                if(i == j && j != k && k != l)  x += 12;
                                else if(j == k && i != j && k != l)  x += 12;
                                else if(k == l && i != j && j != k)  x += 12;
                                else    x += 4;
                            }
                            else    x += 24;
                        }
                    }
                }
            }
        }
        cout << x << endl;
    }
    
    return 0;
}

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

int main() {

    vector<int> result (51);

    for (int a = 0; a < 10; a++) {
        for (int b = 0; b < 10; b++) {
            for (int c = 0; c < 10; c++) {
                for (int d = 0; d < 10; d++) {
                    result[a+b+c+d] += 1;
                }
            }
        }
    }

    int n;
    while (cin >> n) {
        cout << result[n] << endl;
    }
     
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, t, cnt;

	while (cin >> n)
	{
		cnt = 0;

		for (int i = 0; i < 10; i++)
		{
			for (int j = 0; j < 10; j++)
			{
				for (int k = 0; k < 10; k++)
				{
					t = n - (i + j + k);

					if (0 <= t && t < 10) { cnt++; }
				}
			}
		}

		cout << cnt << endl;
	}

	return 0;
}

C++: #include<stdio.h>

int main(void){
  int n;
  int answer;

  while(scanf("%d",&n)!=EOF){
    answer=0;
    for(int a=0;a<=9;a++){
        for(int b=0;b<=9;b++){
            for(int c=0;c<=9;c++){
                for(int d=0;d<=9;d++){
                    if((a+b+c+d)==n){answer++;}
                }
            }
        }
    }
    printf("%d\n",answer);
  }
        return 0;
}

C++: #include <stdio.h>
int main(void){
    int n,a,b,c,d,x;
    while(~scanf("%d",&n)){
        x=0;
        for(a=0;a<=9;a++)
        for(b=0;b<=9;b++)
        for(c=0;c<=9;c++)
        for(d=0;d<=9;d++)
            if(a+b+c+d==n)x++;
        printf("%d\n",x);
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long


int main()
{
	int n;
	while (cin >> n)
	{
		int cnt = 0;
		REP(i, 10)REP(j, 10)REP(k, 10)REP(l, 10)
		{
			if (i + j + k + l == n)
			{
				cnt++;
			//	cout << i << " " << j << " " << k << " " << l << endl;
			}
		}
		cout << cnt<<endl;
	}
	return 0;
}

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

int main() {
	ios_base::sync_with_stdio( false );

	int n;
	while( cin >> n ) {
		int count = 0;

		for( int i = 0; i <= 9; ++i ) {
			for( int j = 0; j <= 9; ++j ) {
				for( int k = 0; k <= 9; ++k ) {
					uint32_t x = n - (i+j+k);

					if( x <= 9 ) {
						count += 1;
					}
				}
			}
		}

		cout << count << endl;
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
    int n;
    int cnt = 0;
    while (cin >> n)
    {
        cnt = 0;
    for (int a = 0 ; a <= 9 ; a++)
    {
        for (int b = 0 ; b <= 9 ; b++)
        {
            for (int c = 0 ; c <= 9 ; c++)
            {
                for (int d = 0 ; d <= 9 ; d++)
                {
                    if (a+b+c+d == n)
                        cnt ++;
                }
            }
        }
    }
    cout << cnt << endl;
    }
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,d,n,count=0;
    while(cin>>n){ count=0;
    for(a=0;a<=9;a++){
        for(b=0;b<=9;b++){
            for(c=0;c<=9;c++){
                for(d=0;d<=9;d++){
                    if(a+b+c+d==n) count++;;
                }
            }
        }
    }
    cout<<count<<endl;
    }
}

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

int main() {
  int n;
  while (cin >> n) {
    int a, b, c, d, cnt = 0;
    for (a = 0; a < 10; a++)
      for (b = 0; b < 10; b++)
	for (c = 0; c < 10; c++)
	  for (d = 0; d < 10; d++)
	    if (a + b + c + d == n)
	      cnt++;
    cout << cnt << endl;
  }
}

C++: #include <cstdio>

using namespace std;

int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    int count = 0;
    for (int a = 0; a <= 9; a++)
      for (int b = 0; b <= 9; b++)
        for (int c = 0; c <= 9; c++)
          for (int d = 0; d <= 9; d++)
            if (a + b + c + d == n)
              count++;
    printf("%d\n", count);
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
int main(){
	int sum;
	while(cin>>sum){
		int ans=0;
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				for(int k=0;k<10;k++){
					for(int l=0;l<10;l++){
						if(sum==i+j+k+l) ans++;
					}
				}
			}
		}
		cout<<ans<<endl;
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n, cnt;
    while(cin >> n) {
        cnt = 0;
        for(int i = 0; i <= 9; i++) {
            for(int j = 0; j <= 9; j++) {
                for(int k = 0; k <= 9; k++) {
                    for(int l = 0; l <= 9; l++) {
                        if((i+j+k+l) == n) cnt++;
                    }
                }
            }
        }
        cout << cnt << endl;
    }
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int n, sum;
	while(cin >> n){
		sum = 0;
		for(int a = 0; a < 10; a++){
			for(int b = 0; b < 10; b++){
			   for(int c = 0; c < 10; c++){
				   for(int d = 0; d < 10; d++){
					   if(n == a + b + c + d){
					   sum++;
					   }
				   }
			   }
			}
		}
		cout << sum << endl;
	}
	return 0;
}