Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 0

		for i := 0; i < 10; i++ {
			for j := 0; j < 10; j++ {
				for k := 0; k < 10; k++ {
					for l := 0; l < 10; l++ {
						if i+j+k+l == a {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

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

int main(){
    int n;
    while(1){
	cin >> n;
	if (cin.eof()) break;
	int cmb = 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 (i + j + k + l == n) cmb++;
	cout << cmb << endl;
    }
}

C++: #include <cstdio>
using namespace std;
int memo[51];

int main() {
  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) {
          memo[a + b + c + d]++;
        }
      }
    }
  }
  int n;
  while (~scanf("%d", &n)) {
    printf("%d\n", memo[n]);
  }
}

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

int main(){
	int input, i, a, c;
	while(cin>>input){
		a=0;
		c=0;
		if(input>18){
			input = 36-input;
		}
		for(i=1;i<=input;i++){
				c = c+i;
				a = a+c;
		}
		cout << a << endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
	int t[19];
	int n = 0;
	int c = 0;
	for(int i=0;i<19;++i){
		t[i] = 0;
	}
	for(int i=0;i<=9;++i){
		for(int j=0;j<=9;++j){
			t[i+j]++;
		}
	}

	while(scanf("%d", &n) != EOF){
		c = 0;
		for(int i=0;i<19&&i<=n; ++i){
			if(n - i > 18){ continue; }
			c += t[i] * t[n - i];
		}
		printf("%d\n", c);
	}
	return 0;
}

C++: //
// Created by Tian Wang on 16/4/17.
//

#include <iostream>
using namespace std;



int main() {
    int n;
    int out;
    while(cin >> n){
        out=0;
        for(int i = 0; i <= 9 && i <= n; i ++) {
            for(int j = 0; j<=9 && j <= n; j++) {
                for(int k = 0; k<=9 && j <= n; k++) {
                    if(i+j+k <= n && i+j+k >= n-9) {
                        out+=1;
                    }
                }
            }
        }
        cout << out << endl;
    }
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n = 0;
  cin >> n;

  int num = 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) num++;
        }
      }
    }
  }

  cout << num << '\n';

  return 0;
}

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

using namespace std;

int main(void)
{
	int n;

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

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

		result.push_back(count);
		count = 0;
	}

	for(const int& x : result){
		cout << x << endl;
	}


	return 0;
}

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


int main(void) {
	int a, b, c, d, n, ans;
	while (cin >> n) {
		ans = 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) {
							ans++;
						}
					}
				}
			}
		}
	}
		cout << ans << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n = 0;
  cin >> n;

  int num = 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) num++;
        }
      }
    }
  }

  cout << num << '\n';

}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    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++)
                {
                    for (int l = 0; l <= 9; l++)
                    {
                        if (i + j + k + l == n)
                        {
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
    
    
    
    
    return 0;
}

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

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑

int main() {
	int n;
	while (cin >> n) {
		int ans = 0;
		for (int i = 0; i <= 9; ++i) {
			for (int j = 0; j = 9; ++j) {
				for (int k = 0; k <= 9; ++k) {
					int mon = n - i - j - k;
					if (0 <= mon && mon <= 9) { ++ans; }
				}
			}
		}
		cout << ans << endl;
	}
}

C++: #include<iostream>

using namespace std;

int main(void){
	int n, cnt;
	
	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; 
	}
	return 0;
}

C++: #include<stdio.h>

int main(void){

	int a,b,c,d,n,count,i,j,k;

	scanf("%d",&n);
	
	if(n>50){
		return 0;
	}
	
	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(n==a+b+c+d){
						count++;
					}
				}
			}
		}
	}

	printf("%d\n",count);

}

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

int main(){
	int n,ans;

	while( cin >> n ){
		ans = 0;
		if(n<=36){
			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){
								ans++;
							}
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
}

C++: #include<iostream>

using namespace std;

int main(){
    int n;
    while (cin >> n){
        int result = 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)
                        {
                            result++;
                        }
                    }
                }
            }
        }
        cout << result << endl;
    }
    return 0;
}