You are viewing a single comment's thread. Return to all comments →
I am not able to figure out the mistake in this code any help wud be appreciated
int main() { long int a,b,c,t,d,e; scanf("%ld",&t); while(t--) { scanf("%ld %ld %ld",&a,&b,&c); e=a/b; d=e;
long int count=0; while(e>=c) { e=e-c; count++; e=e+count; } printf("%ld",(count+d)); printf("\n"); }
return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
I am not able to figure out the mistake in this code any help wud be appreciated
include
include
include
include
int main() { long int a,b,c,t,d,e; scanf("%ld",&t); while(t--) { scanf("%ld %ld %ld",&a,&b,&c); e=a/b; d=e;
return 0; }