diff --git a/solution2.c b/solution2.c new file mode 100644 index 0000000..2bfd2f1 --- /dev/null +++ b/solution2.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; +}