fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int N= 59056;
  6. int i=0, j= 1,k= 0,r = 0;
  7. int hassix = 0;
  8. for(i=1;j<N;i++){
  9. hassix = 0;
  10. k= i;
  11. while(k>0){
  12. r = k%10;
  13. k = k/10;
  14. if(r== 6)
  15. hassix = 1;
  16. }
  17. if(hassix == 0)
  18. j++;
  19. }
  20. printf("N:%d J: %d i: %d", N,j,i);
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
N:59056    J: 59056 i: 100008