Advertisement
jeff69

Untitled

Feb 26th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1.  
  2. #include <iomanip>
  3. #include <iostream>
  4. #include <functional>
  5. #include <algorithm>
  6. #include <math.h>
  7. #include <cmath>
  8. #include <string>
  9.  
  10. using namespace std;
  11.  
  12. int zes(int a)
  13. {
  14. a=a / 5;
  15. if (a == 0)return 0;
  16. return 1 + zes(a);
  17. }
  18. int hah(int a){
  19.  
  20. a = a / 5;
  21. if (a == 0)return 1;
  22. return 5 * hah(a);
  23. }
  24. int main(){
  25.  
  26. int v, n, r, c;
  27. cin >> v;
  28. r = v / 5;
  29. c = 5 * v - 5 * (v - 5 * r);
  30. cout << zes(v);
  31. if (zes(v))
  32. if (v <= hah(v)+zes(v)-1){
  33. cout << 0;
  34.  
  35. return 0;
  36. }
  37. int viv = hah(v) * 5 + (v - zes(v) - hah(v)) * 5;
  38. cout << 5 << "\n";
  39. for (int i = viv; i < viv + 5; i++)cout << i << " ";
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement