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

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

int main(){
int n;
while(~scanf("%d",&n)){
int res = 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) res++;
printf("%d\n",res);
}

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <map>

using namespace std;

int memo[100] = {0};

int main() {
	map<int, bool> m;
	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) {
					vector<int> v;

					v.push_back(a);
					v.push_back(b);
					v.push_back(c);
					v.push_back(d);

					sort( v.begin(), v.end() );

					int code = 0;
					for (int i = 0, k = 1; i < v.size(); ++i, k *= 10)
						code += v[i] * k;

					if ( !m[code] ) ++memo[a+b+c+d];
					else m[code] = true;
				}

	int n;
	while (scanf("%d", &n) != EOF) {
		cout << memo[n] << endl;
	}
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t] = a[t]/6;
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

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

void solve()
{
	int input;
	while(cin >> input)
	{
		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 == input)
						{
							++ans;
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
}

int main()
{
	solve();
	return(0);
}

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

int main(void) {
  int sum;
  while (scanf("%d", &sum)+1) {
    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<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int ans = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
	for(int k=0; k<10; k++)
	  if(n-i-j-k>=0 && n-i-j-k<10) ans++;
    cout <<ans<<endl;
  }
  return 0;
}

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

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

using namespace std;

int main(void)
{
	int n;
	while(scanf("%d",&n) != EOF){
		if(n>36)
			cout<<"0"<<endl;
		else
			cout<<"4"<<endl;
	}
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a, b, c, d;
    int n;
    int sum = 0; //条件を満たす組み合わせの数

    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) sum++; 
                    }
                }
            }
        }
        cout << sum << endl;
        sum = 0;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	ios :: sync_with_stdio(false);
	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 << '\n';
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int N;
 
int solve(){
    int ans = 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){
                    int tmp = i + j + k + l;
                    if(tmp == N) ans++;
                }
            }
        }
    }
    return ans;
}
 
int main(){
    while(cin >> N){
        int ans = solve();
        cout << ans << endl;
    }
}

C++: #include<iostream>
using namespace std;
#define RENT 100000
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;
    }
}

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

int main(){
  int n;
  cin >> n;

  if (n % 4 == 0) cout << 1 << endl;
  else cout << 4 << endl;

  return 0;
}

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

int keta(int x){
	int i=0;
	while (x/pow(10,i)>=1){
		i++;
	}
	if (x==0){
		return 1;
	}
	else
	return i;
	}


int main(){
int n;
while (cin>>n){
	int count=0;
for (int i=0;i<10;i++){
    for (int j=0;j<10;j++){
	   for (int k=0;k<10;k++){
		   if (0<=n-i-j-k&&n-i-j-k<10){
			   count+=1;
		   }

		   }
	   }
	}
cout<<count<<endl;
}
	}

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

using namespace std;

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

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <math.h>
#include <algorithm>
using namespace std;

int main()
{
int n;
int count;

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

    cout<<count<<endl;
return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	for(int x;cin>>x;)
	{
		if(x<0 || x >36) break;
		if(x>18)
			x=36-x;
		int sum=1;
		for(int i=1;i<=x;i++)
		{
			int a=(1+i+1)*(i+1)/2;
			sum +=a;
		}
		cout<<sum<<endl;
	}
	return 0;
}