its my code for above ques plzz tell me where is my fault
here’s the link of main code and output1
created
last reply
- 1
reply
- 500
views
- 2
users
- 1
link
its my code for above ques plzz tell me where is my fault
here’s the link of main code and output1
Link to the problem will be helpful [if its any problem from spoj?]
What is !3 [!5, !7…] in this series?
long int == int [int32] on SPOJ [32bit system]
long long == long long int == [int64bit on 32 or 64 bit systems]
long int … sum, …
long long … sum = 0,
PS
I don’ t read your code very careful, but maybe it will be helpful:
sum = X
for (d = 5; d <= N; d += 4)
sum += pow(X, d) / ! d;
for (d = 3; d <= N; d += 4)
sum -= pow(X, d) / ! d;