You are viewing a single comment's thread. Return to all comments →
My C Solution......
#include<stdio.h> int main() { int i=0,j=0,k=0,x=0,rem=0,sum=0,count=0; scanf("%d%d%d",&i,&j,&k); for(i;i<=j;i++) { x=i; while(x!=0) { rem=x%10; sum=(sum*10)+rem; x=x/10; } if(abs(i-sum)%k==0) count=count+1; sum=0; } printf("%d",count); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Days at the Movies
You are viewing a single comment's thread. Return to all comments →
My C Solution......