buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <stdio.h>
int main(int argc, const char *argv[]) {
int n, i, j, k, l, count = 0;
while (scanf("%d", &n) != EOF) {
count = 0;
if (n >= 37)
printf("0\n");
else {
for (i = 0; i <= 9; i++)
for (j = 0; j <= 9; j++)
for (k = 0; k <= 9; k++)
for (l = 0; l <= ... | #include <stdio.h>
int main(int argc, const char *argv[]) {
int n, i, j, k, l, count = 0;
while (scanf("%d", &n) != EOF) {
count = 0;
if (n >= 37)
printf("%d\n", count);
else {
for (i = 0; i <= 9; i++)
for (j = 0; j <= 9; j++)
for (k = 0; k <= 9; k++)
for (l = ... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 57, 64, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 7, 8, 7, 8, 57, 64, 9, 0, 46], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 0 | 152 | 6 |
#include <stdio.h>
int main(void) {
int n, a, b, c, d;
int count = 0;
while (scanf("%d", &n) != EOF) {
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++;
... | #include <stdio.h>
int main(void) {
int n, a, b, c, d;
int count = 0;
while (scanf("%d", &n) != EOF) {
count = 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) == n) {
count+... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 15, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["-", 15, 23, 0, 16, 31, 16, 12, 23, 0, 24]] | 0 | 135 | 6 |
#include <stdio.h>
int main(void) {
int a, b, c, d;
int n;
int x = 0;
int y = 0;
int ans;
while (scanf("%d", &n) != EOF) {
ans = 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) == ... | #include <stdio.h>
int main(void) {
int a, b, c, d;
int n;
int x = 0;
int y = 0;
int ans;
while (scanf("%d", &n) != EOF) {
ans = 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) == ... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 0 | 146 | 2 |
#include <stdio.h>
int main(void) {
int a, b, c, d, n;
int i, j, l, k;
int p = 0;
while (scanf("%d", &n) != EOF) {
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) {
p++;
... | #include <stdio.h>
int main(void) {
int a, b, c, d, n;
int i, j, l, k;
int p = 0;
while (scanf("%d", &n) != EOF) {
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) {
p++;
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 142 | 4 |
#include <stdio.h>
int main(void) {
int n, a, b, c, d, sum, key;
while (scanf("%d", &n) != EOF) {
key = 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 (n == a + b + c + d) {
key++;
... | #include <stdio.h>
int main(void) {
int n, a, b, c, d, sum, key;
while (scanf("%d", &n) != EOF) {
key = 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 (n == a + b + c + d) {
key++;
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 133 | 1 |
i, a, d, e;
main(n) {
for (; ~scanf("%d", &n); printf("%d\n", a))
for (i = 0, a = d = 1, e = 2, n > 18 && (n = 36 - n); i < n;
e += i++ < 8 ? 1 : -3, a += d)
d += e;
} | i, a, d, e;
main(n) {
for (; ~scanf("%d", &n); printf("%d\n", n < 0 ? 0 : a))
for (i = 0, a = d = 1, e = 2, n > 18 && (n = 36 - n); i < n;
e += i++ < 8 ? 1 : -3, a += d)
d += e;
} | [["+", 26, 2, 3, 4, 0, 41, 15, 16, 31, 22], ["+", 26, 2, 3, 4, 0, 41, 15, 16, 17, 18], ["+", 26, 2, 3, 4, 0, 41, 15, 16, 12, 13], ["+", 0, 7, 26, 2, 3, 4, 0, 41, 0, 101], ["+", 0, 7, 26, 2, 3, 4, 0, 41, 64, 13], ["+", 0, 7, 26, 2, 3, 4, 0, 41, 0, 102]] | 0 | 89 | 6 |
#include <stdio.h>
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int i, j, k, l, count;
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 (n == i + j + k + l)
count++;
}
... | #include <stdio.h>
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int i, j, k, l, count;
count = 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 (n == i + j + k + l)
count++;
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 126 | 4 |
#include <stdio.h>
int main(void) {
int a, b, c, d, n, count;
while (1) {
if (scanf("%d", &n) == EOF)
break;
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++;... | #include <stdio.h>
int main(void) {
int a, b, c, d, n, count;
while (1) {
count = 0;
if (scanf("%d", &n) == EOF)
break;
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)
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 132 | 4 |
#include <iostream>
using namespace std;
int main() {
int L = 0, N, A, B, C, D;
while (cin >> N) {
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) {
L++;
};
... | #include <iostream>
using namespace std;
int main() {
int L = 0, N, A, B, C, D;
while (cin >> N) {
L = 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) {
L++;
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 131 | 4 |
#include <iostream>
using namespace std;
int main() {
int n, count;
int a, b, c, d;
while (cin >> n) {
// a>=b>=c>=dと仮定
count = 0;
for (a = 0; a < 10; a++) {
if (a > n)
continue;
for (b = 0; b < a + 1; b++) {
if (a + b > n)
continue;
for (c = 0; c < b ... | #include <iostream>
using namespace std;
int main() {
int n, count;
int a, b, c, d;
while (cin >> n) {
// a>=b>=c>=dと仮定
count = 0;
for (a = 0; a < 10; a++) {
if (a > n)
continue;
for (b = 0; b < a + 1; b++) {
if (a + b > n)
continue;
for (c = 0; c < b ... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 208 | 5 |
#include <iostream>
using namespace std;
int main(void) {
int c;
while (cin >> c) {
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 == c)
cnt++;
cout << c... | #include <iostream>
using namespace std;
int main(void) {
int c;
while (cin >> c) {
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 == c)
cnt++;
cout << c... | [["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 48], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 72], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 72], ["-", 8, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 17, 72]] | 1 | 109 | 6 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a[5][51];
int b;
int c;
int d;
b = 1;
while (b < 5) {
c = 0;
while (c < 51) {
a[b][c] = 0;
c = c + 1;
}
b = b + 1;
}
b = 0;
while (b < 10) {
a[1][b] = 1;
b = b + 1;
}
b = 2;
while (... | #include <iostream>
#include <string>
using namespace std;
int main() {
int a[5][51];
int b;
int c;
int d;
b = 1;
while (b < 5) {
c = 0;
while (c < 51) {
a[b][c] = 0;
c = c + 1;
}
b = b + 1;
}
b = 0;
while (b < 10) {
a[1][b] = 1;
b = b + 1;
}
b = 2;
while (... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]] | 1 | 219 | 2 |
#include <iostream>
using namespace std;
int main() {
int num;
int a, b, c, d, cnt = 0;
while (cin >> num, !cin.eof()) {
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 == num)
cnt++;
... | #include <iostream>
using namespace std;
int main() {
int num;
int a, b, c, d, cnt = 0;
while (cin >> num, !cin.eof()) {
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 == num)
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 119 | 4 |
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define rep(n) REP(i, n)
int main() {
int n;
while (cin >> n) {
int ans = 0;
REP(i, 10) REP(j, 10) REP(k, 10) {
if ((i + j + k) < n && (i + ... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define rep(n) REP(i, n)
int main() {
int n;
while (cin >> n) {
int ans = 0;
REP(i, 10) REP(j, 10) REP(k, 10) {
if ((i + j + k) <= n && (i +... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19]] | 1 | 109 | 2 |
#include <iostream>
using namespace std;
int main() {
int n;
int a, b, c, d;
int combsum = 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)
combsum++;
co... | #include <iostream>
using namespace std;
int main() {
int n;
int a, b, c, d;
int combsum = 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)
combsum++;
co... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 113 | 4 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, n;
while (cin >> n) {
int count = 0;
if (n <= 36) {
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) {
... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, n;
while (cin >> n) {
int count = 0;
if (n <= 36) {
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) {
... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 149 | 2 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, n, count = 0;
while (scanf("%d", &n) != EOF) {
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)
... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, n, count = 0;
while (scanf("%d", &n) != EOF) {
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)
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 131 | 4 |
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int sum = 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) {
sum++;
... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int sum = 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) {
sum++;
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 116 | 2 |
#include <algorithm>
#include <iostream>
#include <string>
int main() {
int n, x;
int i, j, k, l;
while (std::cin >> n) {
x = 0;
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
for (k = 1; k < 10; k++) {
for (l = 1; l < 10; l++) {
if (n == i + j + k + l) {
... | #include <algorithm>
#include <iostream>
#include <string>
int main() {
int n, x;
int i, j, k, l;
while (std::cin >> n) {
x = 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 (n == i + j + k + l) {
... | [["-", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 127 | 8 |
#include <iostream>
using namespace std;
int main() {
int num;
cin >> num;
while (cin >> num) {
int answer = 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 == num)
... | #include <iostream>
using namespace std;
int main() {
int num;
while (cin >> num) {
int answer = 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 == num)
ans... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 118 | 4 |
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int n;
while (scanf("%d", &n) != EOF) {
int count = 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 +... | #include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int n;
while (scanf("%d", &n) != EOF) {
int count = 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 +... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 127 | 2 |
#include <cstdio>
using namespace std;
int main(void) {
int i, j, k, l, ans = 0, n;
while (scanf("%d", &n) != EOF) {
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 == n) {
ans++;
... | #include <cstdio>
using namespace std;
int main(void) {
int i, j, k, l, ans, n;
while (scanf("%d", &n) != EOF) {
ans = 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 == n) {
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 134 | 6 |
#include <stdio.h>
int main(void) {
int n;
int a, b, c, d;
int cnt;
int i, j, k, l;
while (scanf("%d", &n) != EOF) {
cnt = 0;
if (n <= 36) {
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
for (k = 1; k < 10; k++) {
for (l = 1; l < 10; l++) {
i... | #include <stdio.h>
int main(void) {
int n;
int a, b, c, d;
int cnt;
int i, j, k, l;
while (scanf("%d", &n) != EOF) {
cnt = 0;
if (n <= 36) {
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
i... | [["-", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 158 | 8 |
#include <iostream>
using namespace std;
int main() {
int n, t;
int out[100] = {0};
while (cin >> n) {
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) {
out[t]... | #include <iostream>
using namespace std;
int main() {
int n, t = 0;
int out[100] = {0};
while (cin >> n) {
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) {
ou... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22]] | 1 | 147 | 4 |
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int a, b, c, d, n, k;
cin >> n;
k = 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) {
k = k +... | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int a, b, c, d, n, k;
while (cin >> n) {
k = 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)... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 126 | 6 |
#include <iostream>
using namespace std;
int main() {
int num;
int c = 0;
while (cin >> num) {
c = 0;
if (num > 36 || num < 0) {
cout << 0 << endl;
continue;
} else {
for (int i = 0; i <= 9; i++)
for (int j = 0; j <= 9; j++)
for (int k = 0; k <= 9; k++)
... | #include <iostream>
using namespace std;
int main() {
int num;
int c = 0;
while (cin >> num) {
c = 0;
if (num > 36 || num < 0) {
cout << 0 << endl;
continue;
} else {
for (int i = 0; i <= 9; i++)
for (int j = 0; j <= 9; j++)
for (int k = 0; k <= 9; k++)
... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 137 | 4 |
#include <iostream>
using namespace std;
int seach(int n, int m) {
if (m == 4) {
return (n == 0);
} else {
int res = 0;
for (int i = 0; i < 10; i++) {
res += seach(n - i, m + 1);
}
return res;
}
}
int main() {
int n;
cin >> n;
cout << seach(n, 0) << endl;
return 0;
} | #include <iostream>
using namespace std;
int seach(int n, int m) {
if (m == 4) {
return (n == 0);
} else {
int res = 0;
for (int i = 0; i < 10; i++) {
res += seach(n - i, m + 1);
}
return res;
}
}
int main() {
int n;
while (cin >> n)
cout << seach(n, 0) << endl;
return 0;
} | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25]] | 1 | 99 | 4 |
while line = gets
number = line.chomp.to_i
puts 0 if number > 36
counter = 0
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
counter += 1 if (a + b + c + d) == number
end
end
end
end
puts counter
end
| while line = gets
number = line.chomp.to_i
if number > 36
puts 0
else
counter = 0
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
counter += 1 if (a + b + c + d) == number
end
end
end
end
puts counter
end... | [["-", 0, 89, 8, 170, 0, 751, 8, 652, 735, 22], ["-", 8, 170, 0, 751, 8, 652, 3, 4, 0, 612], ["+", 8, 170, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612], ["+", 0, 89, 8, 170, 0, 121, 75, 95, 0, 95], ["+", 0, 493, 0, 89, 8, 170, 0, 121, 0, 444]] | 4 | 86 | 6 |
n = gets.chomp.to_i
ans = 0
i = 0
while i <= 9
j = 0
while j <= 9
k = 0
while k <= 9
l = 0
while l <= 9
ans += 1 if i + j + k + l == n
l += 1
end
k += 1
end
j += 1
end
i += 1
end
puts ans
| while n = gets
n = n.chomp.to_i
ans = 0
i = 0
while i <= 9
j = 0
while j <= 9
k = 0
while k <= 9
l = 0
while l <= 9
ans += 1 if i + j + k + l == n
l += 1
end
k += 1
end
j += 1
end
i += 1
end
puts ans
end
| [["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 8, 170, 0, 662, 12, 652, 486, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 89, 8, 170, 0, 444]] | 4 | 69 | 5 |
# Sum of 4 Integers
x = Array.new(50, 0)
i = j = k = l = 10
i.times { |i| j.times { |j| k.times { |k| l.times { |l| x[i + j + k + l] += 1 } } } }
while line = ARGF.gets
puts x[line.to_i]
end
| # Sum of 4 Integers
x = Array.new(51, 0)
i = j = k = l = 10
i.times { |i| j.times { |j| k.times { |k| l.times { |l| x[i + j + k + l] += 1 } } } }
while line = ARGF.gets
puts x[line.to_i]
end
| [["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612]] | 4 | 78 | 2 |
while n = gets
n.chomp.to_i
m = 0
(0..9).each do |i|
(0..9).each do |j|
(0..9).each do |k|
(0..9).each do |l|
m += 1 if i + j + k + l == n
end
end
end
end
puts m
end
| while n = gets
n = n.chomp.to_i
m = 0
(0..9).each do |i|
(0..9).each do |j|
(0..9).each do |k|
(0..9).each do |l|
m += 1 if i + j + k + l == n
end
end
end
end
puts m
end
| [["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 8, 170, 0, 662, 12, 652, 486, 652, 486, 22]] | 4 | 76 | 2 |
cnt = 0
while line = gets
n = line.to_i
if n > 36
puts 0
else
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
cnt += 1 if a + b + c + d == n
end
end
end
end
puts cnt
end
end
| while line = gets
n = line.to_i
cnt = 0
if n > 36
puts 0
else
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
cnt += 1 if a + b + c + d == n
end
end
end
end
puts cnt
end
end
| [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 12, 612]] | 4 | 84 | 6 |
$stdin.gets.split("\n").map(&:chomp).map(&:to_i).each do |n|
count = 0
10.times do |a|
10.times do |b|
10.times do |c|
10.times do |d|
count += 1 if a + b + c + d == n
end
end
end
end
puts count
end
| $stdin.read.split("\n").map(&:chomp).map(&:to_i).each do |n|
count = 0
10.times do |a|
10.times do |b|
10.times do |c|
10.times do |d|
count += 1 if a + b + c + d == n
end
end
end
end
puts count
end
| [["-", 486, 652, 486, 652, 486, 652, 486, 652, 735, 22], ["+", 486, 652, 486, 652, 486, 652, 486, 652, 735, 22]] | 4 | 79 | 2 |
#!/usr/local/bin/ruby
n = gets.to_i
m = 0
(0..9).to_a.repeated_permutation(4) do |a, b, c, d|
m += 1 if a + b + c + d == n
end
puts m.to_s
| #!/usr/local/bin/ruby
while line = gets
n = line.to_i
m = 0
(0..9).to_a.repeated_permutation(4) do |a, b, c, d|
m += 1 if a + b + c + d == n
end
puts m.to_s
end
| [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 89, 8, 170, 0, 4... | 4 | 49 | 7 |
#!/usr/local/bin/ruby
n = gets.to_i
count = 0
(0..9).to_a.repeated_permutation(4) do |a, b, c, d|
if a + b + c + d == n
# printf("(%d, %d, %d, %d)\n",a,b,c,d)
count += 1
end
end
puts count
| #!/usr/local/bin/ruby
while line = gets
n = line.to_i
count = 0
(0..9).to_a.repeated_permutation(4) do |a, b, c, d|
if a + b + c + d == n
# printf("(%d, %d, %d, %d)\n",a,b,c,d)
count += 1
end
end
puts count
end
| [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 89, 8, 170, 0, 4... | 4 | 49 | 7 |
def fact(n)
if n.zero?
1
else
n * fact(n - 1)
end
end
def c(n, r)
fact(n) / (fact(n - r) * fact(r))
end
def calcCombine(n)
n = 36 - n
if (n >= 0) && (n <= 9)
c(n + 3, 3)
elsif (n >= 10) && (n <= 18)
c(n + 3, 3) - 4 * c(n - 7, 3)
else
0
end
end
input = []
while (line = gets) != ... | def fact(n)
if n.zero?
1
else
n * fact(n - 1)
end
end
def c(n, r)
fact(n) / (fact(n - r) * fact(r))
end
def calcCombine(n)
n = n > 18 ? 36 - n : n
if (n >= 0) && (n <= 9)
c(n + 3, 3)
elsif (n >= 10) && (n <= 18)
c(n + 3, 3) - 4 * c(n - 7, 3)
else
0
end
end
input = []
while (lin... | [["+", 8, 736, 0, 662, 12, 754, 15, 738, 31, 22], ["+", 8, 736, 0, 662, 12, 754, 15, 738, 17, 47], ["+", 8, 736, 0, 662, 12, 754, 15, 738, 12, 612], ["+", 0, 735, 8, 736, 0, 662, 12, 754, 0, 101], ["+", 8, 736, 0, 662, 12, 754, 64, 738, 12, 22], ["+", 0, 735, 8, 736, 0, 662, 12, 754, 0, 102]] | 4 | 146 | 6 |
count = []
(0..36).each do |num|
count[num] = 0
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
count[num] += 1 if a + b + c + d == n
end
end
end
end
end
def answer(n)
if n.negative? || (n > 36)
0
else
count[n]
end
end
while... | $count = []
(0..36).each do |num|
$count[num] = 0
(0..9).each do |a|
(0..9).each do |b|
(0..9).each do |c|
(0..9).each do |d|
$count[num] += 1 if a + b + c + d == num
end
end
end
end
end
def answer(n)
if n.negative? || (n > 36)
0
else
$count[n]
end
end... | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 744], ["-", 196, 737, 8, 736, 0, 662, 31, 742, 500, 22], ["+", 196, 737, 8, 736, 0, 662, 31, 742, 500, 744], ["-", 8, 736, 0, 751, 8, 755, 31, 742, 500, 22], ["+", 8, 736, 0, 751, 8, 755, 31, 742, 500, 744], ["-", 196, 737, 8, 736... | 4 | 121 | 10 |
#define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, counter = 0;
while (scanf("%d", &n) == -1) {
for (int a =... | #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, counter = 0;
while (scanf("%d", &n) != -1) {
counter = 0;... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 142 | 6 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int cou = 0;
cin >> n;
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 ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int cou = 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 == ... | [["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 134 | 4 |
#include <iostream>
using namespace std;
int main() {
int n, count = 0;
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 << e... | #include <iostream>
using namespace std;
int main() {
int n, count = 0;
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 << e... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 104 | 4 |
#include <iostream>
using namespace std;
int main() {
int n, a;
while (cin >> n) {
int x = 0;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
for (int k = 0; k < 9; k++) {
a = n - i - j - k;
if (a >= 0 && a <= 9)
x++;
}
}
}
co... |
#include <iostream>
using namespace std;
int main() {
int n, a;
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++) {
a = n - i - j - k;
if (a >= 0 && a <= 9)
x++;
}
}
}
... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 110 | 6 |
#include <stdio.h>
int main() {
int i, j, k, l, cou, n;
while (scanf("%d", &n) != EOF) {
cou = 0;
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
if (i + j + k + l == n)
cou++;
}
}... | #include <stdio.h>
int main() {
int i, j, k, l, cou, n;
while (scanf("%d", &n) != EOF) {
cou = 0;
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
if (i + j + k + l == n)
cou++;
}
}... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 129 | 2 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count = 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) {
++count;
}
}
... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int count = 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) {
++count;
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 114 | 6 |
#include <iostream>
using namespace std;
int main() {
int s;
while (cin >> s) {
int c = 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) == s) {
c++;
... | #include <iostream>
using namespace std;
int main() {
int s;
while (cin >> s) {
int c = 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) == s) {
c++;
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 115 | 2 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int counter = 0;
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
if (0 <= n - a - b - c && n - a - b - c <= 9) {
counter++;
}
}
}
}
cout << counte... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int counter = 0;
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
if (0 <= n - a - b - c && n - a - b - c <= 9) {
counter++;
}
}
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 108 | 6 |
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int cnt;
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++;
}
... | #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++;
... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 111 | 10 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <vector>
int n;
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
while (cin >> n) {
int counter = 0;
for (int i = 0; i <= 9; i++) {
for (... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <vector>
int n;
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
while (cin >> n) {
int counter = 0;
for (int i = 0; i <= 9; i++) {
for (... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 44]] | 1 | 139 | 4 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, n;
int x = 0;
while (cin >> n) {
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++;... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, n;
int x = 0;
while (cin >> n) {
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++;... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 126 | 4 |
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n, a, ans = 0;
while (cin >> n) {
rep(i, 10) {
rep(j, 10) {
rep(k, 10) {
a = n - i - j - k;
if (a >= 0 && a < 10) {
ans++;
}
}
}
}
... | #include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n, a, ans = 0;
while (cin >> n) {
rep(i, 10) {
rep(j, 10) {
rep(k, 10) {
a = n - i - j - k;
if (a >= 0 && a < 10) {
ans++;
}
}
}
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 92 | 4 |
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int count = 0;
if (n <= 36) {
for (int a = 0; a <= n; a++) {
for (int b = 0; b <= n; b++) {
for (int c = 0; c <= n; c++) {
for (int d = 0; d <= n; d++) {
if (a + b + c + d == ... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int count = 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 == ... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 126 | 8 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int a;
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)
a... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int a = 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)
... | [["+", 0, 52, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 117 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a = 0, b = 0;
while (cin >> 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 == a) {
b++... | #include <iostream>
#include <string>
using namespace std;
int main() {
int a = 0, b = 0;
while (cin >> a) {
b = 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 == a) {
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 121 | 6 |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(void) {
// n<=50
int n, i, j, k, l, cnt;
while (cin >> n) {
cnt = 0;
for (i = 0; i <= 9; i++) {
for (j = i; j <= 9; j++) {
for (k = j; k <= 9; k++) {
for (l = k; l <= 9; l++)
if (i +... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(void) {
// n<=50
int n, i, j, k, l, cnt;
while (cin >> n) {
cnt = 0;
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++)
if (i +... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 57, 64, 1, 0, 11, 17, 107], ["-", 0, 7, 8, 57, 64, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 57, 64, 1, 0, 27, 17, 29]] | 1 | 126 | 9 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a;
while (cin >> a) {
cin >> a;
int b = 0;
for (int c = 0; c < 10; c++)
for (int d = 0; d < 10; d++)
for (int e = 0; e < 10; e++)
for (int f = 0; f < 10; f++) {
if (c + d + e + f == a)
... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a;
while (cin >> a) {
int b = 0;
for (int c = 0; c < 10; c++)
for (int d = 0; d < 10; d++)
for (int e = 0; e < 10; e++)
for (int f = 0; f < 10; f++) {
if (c + d + e + f == a)
b =... | [["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 116 | 4 |
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
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 (in... | // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
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++) ... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 124 | 6 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int count = 0, num;
while (cin >> num) {
num ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int count = 0, num;
while (cin >> num) {
coun... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 138 | 2 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n = 0;
int C = 0;
int a, b, c, d;
while (scanf("%d", &n) != EOF) {
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 ... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n = 0;
int C = 0;
int a, b, c, d;
while (scanf("%d", &n) != EOF) {
C = 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 + ... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 135 | 4 |
#include "bits/stdc++.h"
using namespace std;
int main() {
int x;
cin >> x;
int ans = 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 == x)
ans++;
}
}
}
}... | #include "bits/stdc++.h"
using namespace std;
int main() {
int x;
while (cin >> x) {
int ans = 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 == x)
ans++;
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 111 | 6 |
#include <iostream>
using namespace std;
int main() {
int n, i, j, k, l, C = 0;
while (cin >> n) {
C = 0;
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
for (k = 1; k < 10; k++) {
for (l = 1; l < 10; l++) {
if (n == i + j + k + l) {
C = C + 1;
... | #include <iostream>
using namespace std;
int main() {
int n, i, j, k, l, C = 0;
while (cin >> n) {
C = 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 (n == i + j + k + l) {
C = C + 1;
... | [["-", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 128 | 8 |
#include <iostream>
using namespace std;
#define RENT 100000
int main() {
int n, ans;
int counter = 0;
while (cin >> n) {
ans = 0;
for (int i = 0; i < 10; i++) {
for (int q = 0; q < 10; q++) {
for (int w = 0; w < 10; w++) {
for (int e = 0; e < 10; e++) {
ans = i + q + ... | #include <iostream>
using namespace std;
#define RENT 100000
int main() {
int n, ans;
int counter = 0;
while (cin >> n) {
counter = 0;
for (int i = 0; i < 10; i++) {
for (int q = 0; q < 10; q++) {
for (int w = 0; w < 10; w++) {
for (int e = 0; e < 10; e++) {
ans = i + ... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 129 | 2 |
#include <bits/stdc++.h>
using namespace std;
int a, b, x;
int mySet(int d) {
for (int i = 0; i < 10; i++) {
if (d < 3) {
mySet(d + 1);
} else if (d == 3) {
if (a == x) {
b++;
}
}
a++;
}
return a = a - 10;
}
int main(void) {
while (scanf("%d", &x) != EOF) {
mySet... | #include <bits/stdc++.h>
using namespace std;
int a, b, x;
int mySet(int d) {
for (int i = 0; i < 10; i++) {
if (d < 3) {
mySet(d + 1);
} else if (d == 3) {
if (a == x) {
b++;
}
}
a++;
}
return a = a - 10;
}
int main(void) {
while (scanf("%d", &x) != EOF) {
mySet... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 119 | 4 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
int count = 0;
while (cin >> N) {
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++) {
int s = a + b + c + d;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
int count = 0;
while (cin >> N) {
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++) {
int s = a + b + c + d;
... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 132 | 6 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int n, ans, i, j, k, l;
cin >> n;
ans = 0;
for (i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int n, ans, i, j, k, l;
while (cin >> n) {
ans = ... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 142 | 6 |
#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++;
}
... | #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++;
}
... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 116 | 6 |
#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++;
}
}
... | #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++;
}
}
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 130 | 15 |
#include <iostream>
using namespace std;
int main(void) {
int cnt = 0, n;
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)
++cnt;
cout << cnt << en... | #include <iostream>
using namespace std;
int main(void) {
int cnt = 0, n;
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... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 108 | 4 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n) {
int s = 0;
for (int i = 1; i <= 9; i++)
for (int j = 1; j <= 9; j++)
for (int k = 1; k <= 9; k++)
for (int l = 1; l <= 9; l++)
if (i +... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n) {
int s = 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 +... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 7, 8, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 7, 8, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 7, 8, 7, 10, 43, 49, 50, 51, 13]] | 1 | 111 | 8 |
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int num = 0;
if (n > 36) {
cout << "0" << endl;
} else {
for (int i = 0; i < 10; i++) {
if (i > n) {
break;
}
for (int j = 0; j < 10; j++) {
if (i + j > n) {
... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int num = 0;
if (n > 36) {
cout << "0" << endl;
} else {
for (int i = 0; i < 10; i++) {
if (i > n) {
break;
}
for (int j = 0; j < 10; j++) {
if (i + j > n) {
... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 189 | 2 |
#include <iostream>
using namespace std;
int main() {
int n, a, b, c, d, cnt = 0;
while (cin >> n) {
cnt = 0;
for (a = 0; a < 10 && a < n; a++) {
for (b = 0; b < 10 && b < n; b++) {
for (c = 0; c < 10 && c < n; c++) {
for (d = 0; d < 10 && d < n; d++) {
if (a + b + c + d ... | #include <iostream>
using namespace std;
int main() {
int n, a, b, c, d, cnt = 0;
while (cin >> n) {
cnt = 0;
for (a = 0; a < 10 && a <= n; a++) {
for (b = 0; b < 10 && b <= n; b++) {
for (c = 0; c < 10 && c <= n; c++) {
for (d = 0; d < 10 && d <= n; d++) {
if (a + b + c ... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 19], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]] | 1 | 143 | 10 |
#include <cstdio>
using namespace std;
int main() {
int n;
while (scanf(" %d ", &n) == 1) {
int c = 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) {
c++;
... | #include <cstdio>
using namespace std;
int main() {
int n;
while (scanf(" %d ", &n) == 1) {
int c = 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) {
c++... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 127 | 8 |
#include <iostream>
using namespace std;
int main(void) {
int n, i = 0;
while (cin >> n, !cin.eof()) {
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 (n == a + b + c + d) {
i = i +... | #include <iostream>
using namespace std;
int main(void) {
int n, i = 0;
while (cin >> n, !cin.eof()) {
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 (n == a + b + c + d) {
i = i +... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 128 | 6 |
#include <cstdio>
int solve(int a, int b) {
if (a == 0) {
if (0 <= b && b <= 9)
return 1;
else
return 0;
}
int res = 0;
for (int i = 0; i < 10; i++) {
res += solve(a - 1, b - i);
}
return res;
}
int main() {
int a;
scanf("%d", &a);
printf("%d\n", solve(3, a));
return 0;
} | #include <cstdio>
int solve(int a, int b) {
if (a == 0) {
if (0 <= b && b <= 9)
return 1;
else
return 0;
}
int res = 0;
for (int i = 0; i < 10; i++) {
res += solve(a - 1, b - i);
}
return res;
}
int main() {
int a;
while (~scanf("%d", &a))
printf("%d\n", solve(3, a));
ret... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["+", 8, 9, 0, 52, 15, 339, 51, 91, 17, 92], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25]] | 1 | 112 | 5 |
#include <stdio.h>
int main() {
int in, out, a, b, c, d;
while (scanf("%d", in) != EOF) {
out = 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) == in) {
out++;
... | #include <stdio.h>
int main() {
int in, out, a, b, c, d;
while (scanf("%d", &in) != EOF) {
out = 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) == in) {
out++;
... | [["+", 0, 16, 31, 2, 3, 4, 0, 66, 17, 67]] | 0 | 132 | 1 |
int a, i, j;
main() {
for (; ~scanf("%d", &i);) {
for (j = 0, a = 9999; a--;)
(a % 10 + a / 10 % 10 + a / 100 % 10 + a / 1000 - i) ? 0 : j++;
printf("%d\n", j);
}
} | int a, i, j;
main() {
for (; ~scanf("%d", &i);) {
for (j = 0, a = 10000; a--;)
(a % 10 + a / 10 % 10 + a / 100 % 10 + a / 1000 - i) ? 0 : j++;
printf("%d\n", j);
}
} | [["-", 8, 9, 0, 7, 10, 34, 12, 11, 12, 13], ["+", 8, 9, 0, 7, 10, 34, 12, 11, 12, 13]] | 0 | 83 | 14 |
int a, i, j;
main() {
for (; ~scanf("%d", &i);) {
for (j = 0, a = 9999; a--;)
(a % 10 + a / 10 % 10 + a / 100 % 10 + a / 1000 - i) ? 0 : j++;
printf("%d\n", j);
}
} | main(a, i, j) {
for (; ~scanf("%d", &i);) {
for (j = 0, a = 10000; a--;)
(a % 10 + a / 10 % 10 + a / 100 % 10 + a / 1000 - i) ? 0 : j++;
printf("%d\n", j);
}
} | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 1, 0, 2, 63, 22], ["+", 0, 30, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 36, 36, 0, 30, 0, 1, 0, 2, 63, 22], ["-", 0, 30, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 7, 10, 34, 12, 11, 12, 13], ["+", 8, 9, 0, 7, 10, 34,... | 0 | 83 | 14 |
f(a, b, c) { return c ? f(a - b, 9, c - 1) + (b || f(a, b - 1, c)) : !a; }
main(n) {
for (; ~scanf("%d", &n); printf("%d\n", f(n, 9, 4)))
;
} | f(a, b, c) { return c ? f(a - b, 9, c - 1) + (b ? f(a, b - 1, c) : 0) : !a; }
main(n) {
for (; ~scanf("%d", &n); printf("%d\n", f(n, 9, 4)))
;
} | [["-", 0, 41, 64, 16, 12, 23, 0, 16, 17, 106], ["+", 0, 41, 64, 16, 12, 23, 0, 41, 0, 101], ["+", 0, 41, 64, 16, 12, 23, 0, 41, 0, 102], ["+", 0, 41, 64, 16, 12, 23, 0, 41, 75, 13]] | 0 | 82 | 4 |
#include <stdio.h>
int main(int argc, char **argv) {
int i, j, k, l, m = 0, n;
while (scanf("%d", &n) != EOF) {
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 == n)
m++;
... | #include <stdio.h>
int main(int argc, char **argv) {
int i, j, k, l, m, n;
while (scanf("%d", &n) != EOF) {
m = 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 == n)
m++;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 134 | 6 |
#include <stdio.h>
int main() {
int n;
int m;
int a, b, c, d;
int result;
while (scanf("%d", &n) != EOF) {
result = 0;
if (n > 36) {
printf("0\n");
}
if (n > 9) {
m = 10;
} else {
m = n + 1;
}
for (a = 0; a < m; a++) {
for (b = 0; b < m; b++) {
for ... | #include <stdio.h>
int main() {
int n;
int m;
int a, b, c, d;
int result;
while (scanf("%d", &n) != EOF) {
result = 0;
if (n > 36) {
printf("0\n");
} else {
if (n > 9) {
m = 10;
} else {
m = n + 1;
}
for (a = 0; a < m; a++) {
for (b = 0; b < m... | [["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 0 | 176 | 3 |
#include <stdio.h>
int func2(int n) {
int count = 0;
int a, b, c;
/* 4つの数の和では求まらないパターンの排除 */
if (n < 36) {
for (a = 0; a < 10; a++) {
if (n - a < 0)
break; /* この時点までに解が存在しないと分かったとき */
for (b = 0; b < 10; b++) {
if (n - (a + b) < 0)
break; /* この時点までに解が存在しないと分かったとき */
... | #include <stdio.h>
int func2(int n) {
int count = 0;
int a, b, c;
/* 4つの数の和では求まらないパターンの排除 */
if (n < 37) {
for (a = 0; a < 10; a++) {
if (n - a < 0)
break; /* この時点までに解が存在しないと分かったとき */
for (b = 0; b < 10; b++) {
if (n - (a + b) < 0)
break; /* この時点までに解が存在しないと分かったとき */
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 178 | 2 |
#include <stdio.h>
int main(void) {
int n, a, b, c, d;
int count = 0;
while (scanf("%d", &n) != EOF) {
if (n <= 36) {
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) {
... | #include <stdio.h>
int main(void) {
int n, a, b, c, d;
int count = 0;
while (scanf("%d", &n) != EOF) {
if (n <= 36) {
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) {
... | [["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 0 | 152 | 4 |
#include <stdio.h>
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int a, b, c, d, k = 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 == n)
k++;
}
}
... | #include <stdio.h>
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int a, b, c, d, k = 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 == n)
k++;
}
}
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 127 | 1 |
#include <stdio.h>
int main(void) {
int n, a, b, c, d, i = 0;
while ((scanf("%d", &n)) != EOF) {
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)
i++;
}
}
... | #include <stdio.h>
int main(void) {
int n, a, b, c, d, i = 0;
while ((scanf("%d", &n)) != EOF) {
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)
i++;
}
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 130 | 14 |
#include <stdio.h>
int main() {
int a, b, c, d, n;
int count = 0;
while (scanf("%d", &n) == 1) {
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++;
}
... | #include <stdio.h>
int main() {
int a, b, c, d, n;
int count = 0;
while (scanf("%d", &n) == 1) {
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++;
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 130 | 4 |
#include <stdio.h>
int main(void) {
int n, h, a, b, c, d;
while (scanf("%d", &n) != EOF) {
h = 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) {
h++;
}
... | #include <stdio.h>
int main(void) {
int n, h, a, b, c, d;
while (scanf("%d", &n) != EOF) {
h = 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) {
h++;
}
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 133 | 1 |
#include <stdio.h>
int main(int argc, const char *argv[]) {
int sum;
int cnt = 0;
int i, j, k, l;
while (scanf("%d", &sum) != EOF) {
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 == sum) {
... | #include <stdio.h>
int main(int argc, const char *argv[]) {
int sum;
int cnt = 0;
int i, j, k, l;
while (scanf("%d", &sum) != EOF) {
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 == sum) {
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 142 | 4 |
#include <stdio.h>
int main() {
int i, j, k, l;
int num;
int count = 0;
int res;
while (1) {
res = scanf("%d", &num);
if (res == EOF)
break;
if (num < 36) {
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l ... | #include <stdio.h>
int main() {
int i, j, k, l;
int num;
int count = 0;
int res;
while (1) {
res = scanf("%d", &num);
if (res == EOF)
break;
if (num <= 36) {
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 156 | 2 |
#include <stdio.h>
int main(void) {
int i, j, k, l, o, n = 0;
while (scanf("%d", &i) != EOF) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
for (o = 0; o <= 9; o++) {
if (i == j + k + l + o) {
n++;
}
}
... | #include <stdio.h>
int main(void) {
int i, j, k, l, o, n = 0;
while (scanf("%d", &i) != EOF) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
for (o = 0; o <= 9; o++) {
if (i == j + k + l + o) {
n++;
}
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 130 | 4 |
#include <stdio.h>
int main(void) {
// your code goes here
int z, a, b, c, d, ans = 0;
while (scanf("%d", &z) != EOF) {
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) == z) {
ans... | #include <stdio.h>
int main(void) {
// your code goes here
int z, a, b, c, d, ans = 0;
while (scanf("%d", &z) != EOF) {
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) == z) {
ans... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 137 | 1 |
#include <stdio.h>
int main() {
int a, b, c, d, n, m = 0;
while (scanf("%d", &n) != EOF) {
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) {
m++;
}
}
... | #include <stdio.h>
int main() {
int a, b, c, d, n, m = 0;
while (scanf("%d", &n) != EOF) {
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) {
m++;
}
}
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 132 | 1 |
#include <stdio.h>
main() {
int i, j, k, l, n, cnt = 0;
while (1) {
if (scanf("%d", &n) == EOF)
break;
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
if (i + j + k + l == n)
cnt++;
... | #include <stdio.h>
main() {
int i, j, k, l, n, cnt = 0;
while (1) {
if (scanf("%d", &n) == EOF)
break;
cnt = 0;
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
for (l = 0; l <= 9; l++) {
if (i + j + k + l == n)
cnt... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 133 | 4 |
#include <stdio.h>
main() {
int n, h, i, j, k, smp = 0;
n <= 50;
while (scanf("%d", &n) != EOF)
;
for (h = 0; h <= 9; h++) {
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
if (n == h + i + j + k)
smp++;
}
}
}
}
p... | #include <stdio.h>
main() {
int n, h, i, j, k, smp = 0;
n <= 50;
while (scanf("%d", &n) != EOF) {
for (h = 0; h <= 9; h++) {
for (i = 0; i <= 9; i++) {
for (j = 0; j <= 9; j++) {
for (k = 0; k <= 9; k++) {
if (n == h + i + j + k)
smp++;
}
}
... | [["-", 0, 30, 0, 9, 0, 52, 8, 1, 0, 35], ["+", 0, 30, 0, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 9, 0, 52, 8, 9, 0, 46]] | 0 | 130 | 7 |
#include <stdio.h>
main() {
int n, a, b, c, d, i = 0;
while (scanf("%d", &n) != EOF) {
for (a = 9; a >= 0; a--) {
for (b = 9; b >= 0; b--) {
for (c = 9; c >= 0; c--) {
for (d = 9; d >= 0; d--) {
if (a + b + c + d == n) {
i = i + 1;
}
}
... | #include <stdio.h>
main() {
int n, a, b, c, d, i = 0;
while (scanf("%d", &n) != EOF) {
for (a = 9; a >= 0; a--) {
for (b = 9; b >= 0; b--) {
for (c = 9; c >= 0; c--) {
for (d = 9; d >= 0; d--) {
if (a + b + c + d == n) {
i = i + 1;
}
}
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 135 | 1 |
#include <iostream>
using namespace std;
int n;
int bfs(int now, int d) {
int ans = 0;
if (d == 4) {
if (now == n)
return 1;
else
return 0;
} else {
for (int i = 0; i < 10; i++)
ans += bfs(now + i, d + 1);
}
return ans;
}
int main() {
cin >> n;
cout << bfs(0, 0) << endl;
} | #include <iostream>
using namespace std;
int n;
int bfs(int now, int d) {
int ans = 0;
if (d == 4) {
if (now == n)
return 1;
else
return 0;
} else {
for (int i = 0; i < 10; i++)
ans += bfs(now + i, d + 1);
}
return ans;
}
int main() {
while (cin >> n)
cout << bfs(0, 0) <<... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25]] | 1 | 100 | 4 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int sum = 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)
sum++;
}
}
}
}
cou... | #include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int sum = 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)
sum++;
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 109 | 6 |
#include <iostream>
using namespace std;
int main() {
int n, ans = 0;
while (cin >> n) {
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)
ans++;
}
... | #include <iostream>
using namespace std;
int main() {
int n, ans = 0;
while (cin >> n) {
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)
ans++;
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 112 | 4 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
#define pi 3.141592653589793283462
int main() {
int c;
int d = 0;
while (cin >> c) {
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int ... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
#define pi 3.141592653589793283462
int main() {
int c;
int d = 0;
while (cin >> c) {
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int ... | [["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 125 | 6 |
#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 230 | 4 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
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, c... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
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, c... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 122 | 6 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
while (cin >> n) {
int count = 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+... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int count = 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++) {
... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 126 | 4 |
// Sum of 4 Integers
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = 0;
while (scanf("%d", &n) != EOF) {
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)
... | // Sum of 4 Integers
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = 0;
while (scanf("%d", &n) != EOF) {
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... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 120 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.