Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- int eax, ecx, edx;
- int *esi, *edi;
- int n, k;
- int a[21], b[21];
- scanf("%d%d", &n, &k);
- esi = a;
- edi = b;
- *esi = 1;
- ecx = 0;
- while (ecx != n) {
- ecx++;
- *edi = 1;
- edx = 0;
- while (edx != ecx) {
- edx++;
- *(edi + edx) += *(esi + edx - 1);
- }
- *(edi + edx) = 1;
- int *tmp = esi;
- esi = edi;
- edi = tmp;
- }
- eax = *(esi + k);
- printf("%d\n", eax);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement