fork(2) download
  1. /*Nuclear Reactor problem of www.codechef.com */
  2. #include<stdio.h>
  3.  
  4. int main() {
  5. int a,n,k,i,j=0;
  6. scanf("%d%d%d",&a,&n,&k);
  7. int b[k];
  8. for(i=0;i<k;i++)
  9. b[i]=0;
  10. i=n+1;
  11.  
  12. while(a) {
  13. b[j]=a%i;
  14. a/=i;
  15. j++;
  16. }
  17.  
  18. for(i=0;i<k;i++)
  19. printf("%d ",b[i]);
  20. printf("\n");
  21. return 0;
  22. }
  23.  
Runtime error #stdin #stdout 0.02s 2680KB
stdin
100 0 1000
stdout
Standard output is empty