Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

// 2つの値の和がaとなる順列の数。
int func2(int a) {
	if (a > 18) {
		return 0;
	}
	int count = 0;
	
	for (int i = 0; i <= min(a, 9); ++i) {
		if (a - i < 10) {
			++count;
		}
	}
	return count;
}

// 3つの値の和がaとなる順列の数
int func3(int a) {
	if (a > 27) {
		return 0;
	}
	int count = 0;

	for (int i = 0; i <= min(a, 9); ++i) {
		count += func2(a - i);
	}
	return count;
}

// 4つの値の和がaとなる順列の数
int func4(int a) {
	if (a > 36) {
		return 0;
	}
	int count = 0;
	for (int i = 0; i <= min(a, 9); ++i) {
		count += func3(a - i);
	}
	return count;
}

int main() {
	int n;

	while (cin >> n) {
		cout << func4(n) << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
  int n;
  int cnt = 0;

  while(scanf("%d",&n) != EOF){

    cnt = 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(a+b+c+d == n){
	      cnt++;
	    }
	  }
	}
      }
    }
    cout << cnt << endl;
  }
}

C++: #include<iostream>
int main(){
	int a,b,c,d,i,n;
	std::cin>>n;
	i=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){
						i++;
						}
					}
				}	
			}		
		}
	std::cout<<i<<std::endl;
	
	
    return 0;
}

C++: #include <stdio.h>
int main(){
int n;
int a, b, c, d;
int count;
while(scanf("%d", &n) != EOF){
count = 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){
count++;
break;
}
}
}
}
}
printf("%d\n", count);
}
return 0;
}

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