Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int n;
- char s[100];
- scanf(" %d", &n);
- scanf(" %s", s);
- int cnt = 0;
- for(int a = 0; a < n; ++a)
- for(int b = a + 1; b < n; ++b)
- for(int c = b + 1; c < n; ++c)
- for(int d = c + 1; d < n; d++)
- printf("%c %c %c %c\n", s[a], s[b], s[c], s[d]), cnt++;
- printf("%d\n", cnt);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement