diff --git a/solution1.c b/solution1.c new file mode 100644 index 0000000..941f73f --- /dev/null +++ b/solution1.c @@ -0,0 +1,16 @@ +#include + +int main() +{ + int n; + scanf("%d", &n); + int counts[5] = {1, 1, 1, 1, 1}; + while (n > 1) + { + n -= 1; + for (int i = 1; i < 5; i++) + counts[i] += counts[i - 1]; + } + printf("%d", counts[0] + counts[1] + counts[2] + counts[3] + counts[4]); + return 0; +}