Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iomanip>
- #include <iostream>
- #include <functional>
- #include <algorithm>
- #include <math.h>
- #include <cmath>
- #include <string>
- using namespace std;
- int zes(int a)
- {
- a=a / 5;
- if (a == 0)return 0;
- return 1 + zes(a);
- }
- int hah(int a){
- a = a / 5;
- if (a == 0)return 1;
- return 5 * hah(a);
- }
- int main(){
- int v, n, r, c;
- cin >> v;
- r = v / 5;
- c = 5 * v - 5 * (v - 5 * r);
- cout << zes(v);
- if (zes(v))
- if (v <= hah(v)+zes(v)-1){
- cout << 0;
- return 0;
- }
- int viv = hah(v) * 5 + (v - zes(v) - hah(v)) * 5;
- cout << 5 << "\n";
- for (int i = viv; i < viv + 5; i++)cout << i << " ";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement