-
Notifications
You must be signed in to change notification settings - Fork 0
/
0008.cc
57 lines (49 loc) · 910 Bytes
/
0008.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <set>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <sstream>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <cassert>
#include <utility>
#include <utility>
//n = a + b + c + dの組み合わせを答える
//見提出
using namespace std;
int main(int argc, char *argv[])
{
int n=0;
while((std::cin >> n) != NULL ){
if(n>36){
std::cout << 0 << std::endl;
}else{
int count = 0;
for(int a = 9;a>=0;--a){
for(int b = 9;b>=0;--b){
for(int c = 9;c>=0;--c){
for(int d = 9;d>=0;--d){
if(n == a + b + c + d){
++count;
}
}
}
}
}
std::cout << count << std::endl;
}
}
return 0;
}