int main(){ clock_t begin, end; double time_spent; begin = clock(); // Begin solution char *prod = malloc( sizeof(char) * ( n + 1 ) ); for (int i = 0; i < n; i++) prod[i] = '0'; prod[n-1] = '1'; for(int i = 2;i < 100; i++){ multiply_by(prod, i); } int result = sum_digits(prod); printf("%d\n",result); free(prod); // End solution end = clock(); time_spent = (double)(end - begin) / CLOCKS_PER_SEC; printf("Found result in %f time\n", time_spent); return 0; }
int main() { int ad = add_by(); int mb = multiply_by(); return ad | mb; }