Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

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

using namespace std;

int solve(const int n) {
	set< vector<int> > s;
	vector<int> v(4);
	for (v[0] = 0; v[0] < 10; v[0]++)
		for (v[1] = 0; v[1] < 10; v[1]++)
			for (v[2] = 0; v[2] < 10; v[2]++)
				for (v[3] = 0; v[3] < 10; v[3]++) {
					int sum = 0;
					for (int i = 0; i < 4; i++) sum += v[i];
					if (sum == n) {
						s.insert(v);
						break;
					}
				}
	return s.size();
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (cin)) {
		int n;
		cin >> n;
		cout << solve(n) << endl;
	}
	return 0;
}

C++: #include<stdio.h>
    int main(void){
    int i,j,k,l,n,m,cut;
    while(scanf("%d",&n)!=EOF){
    cut=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++){
                    m=i+j+k+l;
                    if(n==m){
                        cut++;
                    }
                }
            }
        }
    }
        printf("%d",cut);
    }
    return 0;
    }

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

int main() {
  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++) {
          for (int d = 0; d <= 9; d++) {
            if (a + b + c + d == n) ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
int n, a, b, c, d, hasil;
int main(){
	while(cin >> n){
		hasil = 0;
		for(int j = 0; j <= 9; j++){
			for(int k = 0; k <= 9; k++){
				for(int l = 0; l <= 9; l++){
					for(int m = 0; m <= 9; m++){
						if(j + k + l + m == n){
							hasil++;
						}
					}
				}
			}
		}
		cout << hasil << "\n";	
	}
	return 0;
}

C++: #include <iostream>
#include<algorithm>
#include<cstdio>
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;
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
int n,S;
int a[4];

while(cin>>n)
{
S=0;
a[0]=0;
a[1]=0;
a[2]=0;
a[3]=0;
for(int i=0;i<10;i++)
{
	a[0]=i;
	for(int j=0;j<10;j++)
{
	a[1]=j;
	for(int k=0;k<10;k++)
{
	a[2]=k;
		for(int l=0;l<10;l++)
{
	a[3]=l;
	if(a[0]+a[1]+a[2]+a[3]==n)
	{
		S++;
	}
}
}	
}
}
cout<<S<<endl;	
}
return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int a, b, c, d;
	int n;

	while(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){
						count = count +1;
					}
				}
			}
		}
	}

	cout << count <<endl;
}
}

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

int main(void) {
  int sum;
  while (scanf("%d", &sum)+1) {
    if (sum > 36) {
      printf("0\n");
    }

    int count = 0;
    int a = 0;
    int b = 0;
    int c = 0;
    int d = 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) == sum) count++;
          }
        }
      }
    }
    printf("%d\n", count);
  }
}

C++: #include<cstdio>
int ans=0;
int n;
class Sumof4Integers{
    public:
        void solve(){ 
            dfs(0,0);
            printf("%d\n",ans);
        }
        void dfs(int d,int sum){ 
            if(d==4){
                if(n==sum)ans++;
                return;
            }
            for(int i=0;i<10;i++){
                dfs(d+1,sum+i);
            }
        }
};
int main(){ 
    scanf("%d",&n);
    Sumof4Integers inst;
    inst.solve();
}

C++: #include<bits/stdc++.h>
using namespace std;
int n;
int main(){
	while(cin>>n){
		int ans=0;
		
		for(int a=0;a<10;a++){
			for(int b=0;b<10;b++){
				for(int i=0;i<10;i++){
					for(int j=0;j<10;j++){
						if(n==a+b+i+j){
							++ans;
						}
					}
				}
			}
		}
	cout<<ans<<endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

int main() {
    int n[50] = {0};
    REP(a,10) {
        REP(b,10) {
            REP(c,10) {
                REP(d,10) {
                    if (a+b+c+d>0 && a+b+c+d<=50) n[a+b+c+d-1]++;
                }
            }
        }
    }
    
    int k;
    while(cin >> k) {
        cout << n[k-1] << endl;
    }
}

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



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

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

using namespace std;

int main(){
  int a,b,c,d,sum,n,count=0,num;
  vector<int> nl;
  while(cin >> n){
    nl.push_back(n);
  }

  for(int j=0; j<nl.size(); j++){
    count = 0;
    n = nl[j];
    for(int i=0; i < 10000; i++){
      num = i;
      a = num/1000;num%=1000;
      b = num/100;num%=100;
      c = num/10;num%=10;
      d = num;
      sum = a+b+c+d; 
      if(n == sum){
        count++;
      }
    }

    cout << count << endl;
  }
}

C++: #include <stdio.h>
#include <Windows.h>
#include <string.h>

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( true ){
        gets( str );
        if(( n[m] = atoi(str)) == -1 ) break;
        m++;
    }
    for( int a = 0;a < m+1;a++ ){
    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[a] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    nCount = 0;
    }
    return 0;
}

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

int main(){
    int n,cnt=0;
    while(cin >> n){
        
        if(n > 36){
        }
        else if(n == 36){
            cnt = 1;
        }
        else{
            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;
                                break;
                            }
                        }
                    }
                }
            }
        }
        cout << cnt << endl;
        cnt = 0;
    }
}

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



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