fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define H1 (10)
  5. #define H2 (10*10)
  6. #define H3 (10*10*10)
  7. #define H4 (10*10*10*10)
  8. #define H5 (10*10*10*10*10)
  9.  
  10. int n;
  11.  
  12. int main() {
  13. cin >> n;
  14.  
  15. cout << n/H5 << " ";
  16. cout << ((n/H4)%10) << " ";
  17. cout << ((n/H3)%10) << " ";
  18. cout << ((n/H2)%10) << " ";
  19. cout << ((n/H1)%10) << " ";
  20. cout << (n%10) << endl;
  21. }
Success #stdin #stdout 0s 16064KB
stdin
334910
stdout
3 3 4 9 1 0