Code Festival C Div and Add by cympfh

#include<stdio.h>
int t[200],i;int main(j){for(i=t[1]=1;++i<200;t[i]+=i%10+(i%100)/10+(i>99))for(j=0;++j<i;i%j||t[i]<t[j]&&(t[i]=t[j]));for(;~scanf("%d",&j);printf("%d\n",t[j]));}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page