Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

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

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

C++: #include <iostream>

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    int n;
    while (std::cin >> n) {
        int cnt = 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)
                            ++cnt;
        std::cout << cnt << std::endl;
    }
}

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

using namespace std;

int calc(int i, int count,int sum){
	if (count == 0){
		if (sum == i){
			return 1;
		}
		else{
			return 0;
		}
	}
	else{
		int count2 = 0;
		for (int j = 0; j < 10; j++){
			count2+=calc(i, count - 1, sum + j);
		}
		return count2;
	}

}

int main(){
	int i;
	while (cin >> i){
		cout << calc(i, 4, 0) << endl;
	}
	return 0;
}

C++: using System;

class aoj
{
	static void Main()
	{
		int[] ans = new int[50];
		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++)
					{
						ans[i + j + k +l] += 1;	
					}
				}
			}
		}

		while (true)
		{
			string input = Console.ReadLine();
			if (input == null) { break; }

			int inputNumber = int.Parse(input);
			Console.WriteLine(ans[inputNumber]);
		}
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, total;

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

C++: #include<iostream>

int main(){
	int a,b,c,d,i,n;
	
	i=0;
	while(std::cin>>n)
	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 <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
//ranker
using namespace std;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


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 <stdio.h>

int main(){
	
	int a,b,c,d,n,t;
	
	while(scanf("%d",&n)!=EOF){
		
		t=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){
							
							t++;
						}
					}
				}
			}
		}
		printf("%d\n",t);
	}
	return 0;
}

C++: #include<stdio.h>
#include<math.h>

int bruteforce(int N,int M,int a){
  int i;
  int b;
  b=a;
  if(M==1){
    if(-1<N||N<10){
      return 1;
    }
    else{
      return 0;
    }
  }
  else {
    M=M-1;
    for(i=fmax(N-M*9,0);i<=fmin(N,9);i++){
      a=a+bruteforce(N-i,M,b);
    }
  }

  return a;
}


int main(){
  int n;
  while(scanf("%d",&n)!=EOF){
    printf("%d\n",bruteforce(n,4,0));
  }

  return 0;
}

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

C++: #include<stdio.h>

main(){

    int n;

    while(~scanf("%d",&n)){

        int a,b,c,f=0;

        // for(a=0;a<10;a++)

        //     for(b=0;b<10;b++)

        //         for(c=0;c<10;c++)

        //             if(n-a-b-c < 10 && n-a-b-c >=0)f++;

        // printf("%d\n",f);



        int k,i;

        f = 0;

        for(i=0; k = n-(i/100)-((i/10)%10)-i%10, i < 1000; ++i)

            if(k < 10 && k >= 0) f++;

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

    }

}

C++: 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>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <string>

int main(int,char**){
	int n,cnt;
	while(std::cin >>n){
		cnt = 0;
		for(int a(0);a<10;++a){
			if(a>n) continue;
			for(int b(0);b<10;++b){
				if(a+b>n) continue;
				for(int c(0);c<10;++c){
					if(a+b+c>n) continue;
					for(int d(0);d<10;++d){
						if(a+b+c+d==n) ++cnt;
					}
				}
			}
		}

		std::cout << cnt <<std::endl;
	}
	return 0;
}

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

int main(){
  int n;
  while(cin >> n){
    int a, b, c, d, 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;
  }
  
}