fork download
  1. #include <stdio.h>
  2.  
  3. char *function(int num, char str[10])
  4. {
  5. int i=0, len=0, temp=num;
  6. while(temp>0)
  7. {
  8. temp /= temp;
  9. len++;
  10. }
  11. str[len--]='\0';
  12. while(i<=len)
  13. {
  14. str[len--]=num%10;
  15. num /= num;
  16. }
  17. return str;
  18. }
  19.  
  20. int main()
  21. {
  22. int a = 1650;
  23. char str[10];
  24. function(a,str);
  25. printf("%s",str);
  26. return 0;
  27. }
  28.  
Time limit exceeded #stdin #stdout 5s 9280KB
stdin
Standard input is empty
stdout
Standard output is empty