Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                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++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

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 += 1;
                            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>
using namespace std;

int main() {
	// your code goes here
	int n;
	cin>>n;
	int count=0;
	if(n>36){cout<<0<<endl;}else{
		for(int i=9; i>=0; i--){
			for(int j=i; j>=0; j--){
				for(int k=j; k>=0; j--){
					for(int l=k; l>=0; l--){
						if(i+j+k+l==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
 
int main()
{
int n;
while(cin>>n)
{
int combo=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)
combo++;
}}}
cout<<combo<<endl;
}

return 0;
}

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

int main()
{
  int n;
  int a, b, c, d;
  int combi=0;

  while(cin >> n) {
    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) {
              combi++;
            }
          }
        }
      }
    }
    cout << combi << "\n";
    combi=0;
  }
  return 0;
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int main(){
  int n;
  while(cin>>n){
    int co=0;
    rep(a,10){
      rep(b,10){
	rep(c,10){
	  if(n-a-b-c>=0&&n-a-b-c<10)co++;
	}
      }
    }
    cout<<co<<endl;
  }

}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0;
    int n;
    scanf( "%d",&n );

    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( i+j+k+l == n ) nCount++;
                }
            }
       }
    }

    printf( "%d\n",nCount );
    return 0;
}

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

// 9C4

//指定された桁の値を返す手続きを定義する
/* 123の2けた、123 = 123 % 100 - 123 % 10 
                   = 23 - 3
				   = 20
   123の１けた、123 = 123 % 10 - 123 % 1
                    = 3 - 0
					= 3 */
int girder_number(int keta,int n)
{
	return (keta % int(pow(10,n)) - keta % int(pow(10,n-1))) / pow(10,n-1);
}
	
int* make_list_n_4(int n)
{
	int num[4];
	// sは桁数、この場合は4桁なのでs=4-1=3
	int s = 4-1;
	for (int i=0;i<=s;i++){
		num[i]=girder_number(n,i+1);
		// cout << "make_list_n_4[" << i << "]=" << num[i] << endl;
	}
	return num;
}

int how_much_plus_pair(int n)
{
	int a=0;
	int i=0;
	int ans = 0;
	if (n == 0)
		return 1;
	else if(n > 36)
		return 0;
	else {
		for(int i=0;i<=9999;i++)
		{
			ans = 0;
			for (int k=0;k<=3;k++)
				ans += make_list_n_4(i)[k];
			if (n == ans)
				a++;
		}
	return a;
	}
}

int main()
{
	/* for (int i=0;i<=3;i++)
		cout << make_list_n_4(1234)[i] << "," ;*/
	int n;
	while(cin >> n){
		// cout << "make_list_n_4(n)=" << make_list_n_4(n) << endl;
		int testaa[] = {1,2,3,4};
		int ans = 0;
		cout << how_much_plus_pair(n) << endl;
	}
	return 0;
}

C++: #include <cstdio>

int main(void)
{
  int a, b, c, d, n, cnt;

  while (std::scanf("%d", &n) != EOF) {
    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++;
            }
          }
        }
      }
    }
    std::printf("%d\n", cnt);
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int cnt=0;
		if(n>36){
			cout<<0<<endl;
			continue;
		}
		for(int a=0;a<10;a++)
			for(int b=0;b<=a;b++)
				for(int c=0;c<=b;c++)
					for(int d=0;d<=c;d++)
						if(a+b+c+d==n){
							if(a==b&&b==c&&c==d)	cnt+=1;
							else if(a==b&&b==c)		cnt+=4;
							else if(a==b&&c==d)		cnt+=6;
							else if(b==c&&c==d)		cnt+=4;
							else cnt+=24;
						}
		cout<<cnt<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int a,b,c,d;
	int cnt;
	int i,j,k,l;

	while(scanf("%d",&n) != EOF){
		cnt = 0;
		if(n <= 36){
			for(i = 1;i < 10;i++){
				for(j = 1;j < 10;j++){
					for(k = 1;k < 10;k++){
						for(l = 1;l < 10;l++){
							if(i+j+k+l == n)
								cnt++;
						}
					}
				}
			}
			printf("%d\n",cnt);
		}
		else
			printf("0\n");
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int 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(n==a+b+c+d)cnt++;
		cout<<cnt<<endl;
	}

}

C++: #include <cstdio>
#define F(i)for(int i=0;i<=9;i++)
int main() {
	int n;
	while(scanf("%d",&n)!=EOF) {
		int count=0;
		F(i)F(j)F(k)F(l) {
			if((i+j+k+l)==n) count++;
		}
		printf("%d\n",count);
	}
}

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

int main()
{
	int n, t = 0;
	cin >> n;
	for (int a = 0; a < 10; ++a)
	{
		for (int b = 0; b < 10; ++b)
		{
			for (int c = 0; c < 10; ++c)
			{
				if(n - (a + b + c ) <= 9 && 0 <= n - (a + b + c )){
					t++;
				}
			}
		}
	}
	cout << t << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;





int main()
{
	int n;
	int sum;
	int k[19];//k[i]???i?????????????¶?????????§??????????????¨?????????????????????
	while (cin >> n) {
		sum = 0;
		if (n > 36) {
			cout << "0" << endl;
			break;
		}
		else{
			
			for (int i = 0; i < 19; i++) {
				if (i < 10) {
					k[i] = i + 1;
				}
				else {
					k[i] = 19 - i;
				}
			}
			for (int i = max({0,n-18}); i <= min({ 18,n }); i++) {
				sum += k[i] * k[n - i];
			}
		}
		cout << sum << endl;
	}





}