1. Abridged Problem Statement
Given a non-negative integer Q (0 ≤ Q ≤ 10^8), find the smallest positive integer N such that the number of trailing zeros in N! (in base 10) is exactly Q. If no such N exists, print "No solution.".

2. Detailed Editorial
Overview
• Trailing zeros in N! arise from factors of 10, i.e. pairs of 2×5. Since factorials have many more factors of 2 than 5, the count of trailing zeros is governed by the number of times 5 divides into the product 1×2×…×N.
• The standard formula for the number of trailing zeros in N! is:
  Z(N) = ⌊N/5⌋ + ⌊N/5^2⌋ + ⌊N/5^3⌋ + …
  where terms stop when 5^k > N.

Monotonicity and Search
• Z(N) is non-decreasing as N increases. It jumps by 1 at values of N that are multiples of 5 (more at multiples of higher powers of 5). Because of those larger jumps some Q values are skipped entirely, in which case no N produces exactly Q zeros.
• To find the minimal N with Z(N) = Q (if it exists), we can binary-search on N over a sufficiently large range.

Key Steps
1. Define eval(x) = Z(x).
2. Binary search low = 1, high = 2×10^12 (safe upper bound for Q up to 10^8).
   – At each step, compute mid = (low+high)//2.
   – If eval(mid) ≥ Q, record mid as a candidate and move high = mid−1.
   – Otherwise, move low = mid+1.
3. After search, check if eval(candidate) == Q.
   – If yes, print candidate.
   – Otherwise, print "No solution.".

The evaluation here sweeps powers of 5 from the largest not exceeding x down to 5, accumulating ⌊x/5^i⌋ using incremental counts.

Complexity
• Computing eval(x) takes O(log_5 x) steps.
• Binary search does O(log high) iterations.
Overall O(log high · log_5 high), fast enough under 0.25 s.

3. C++ Solution
```cpp
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

int q;

void read() { cin >> q; }

int64_t trailing_zeros(int64_t x) {
    int64_t ret = 0, c = 0, cc = 1, l = 5;
    while(l <= x) {
        cc++;
        l *= 5ll;
    }

    while(l > 1) {
        ret += cc * (x / l - c);
        c += x / l - c;
        cc--;
        l /= 5ll;
    }

    return ret;
}

void solve() {
    // The number of trailing zeros of N! equals the exponent of 5 in N!,
    // i.e. floor(N/5) + floor(N/25) + floor(N/125) + ... This count is
    // non-decreasing in N, so we binary search for the smallest N whose
    // count is at least Q. If that minimal N actually hits exactly Q we
    // print it; since the count jumps by more than one at multiples of 25,
    // 125, ... some Q values are skipped entirely and we report "No
    // solution.". The count is evaluated by sweeping powers of 5 from the
    // largest not exceeding N down to 5.

    int64_t low = 1, high = (int64_t)2e12, ret = -1;
    while(low <= high) {
        int64_t mid = (low + high) >> 1;
        if(trailing_zeros(mid) >= q) {
            ret = mid;
            high = mid - 1;
        } else {
            low = mid + 1;
        }
    }

    if(trailing_zeros(ret) != q) {
        cout << "No solution.\n";
    } else {
        cout << ret << '\n';
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}
```

4. Python Solution
```python
import sys

def eval_zeros(x):
    """Return the number of trailing zeros in x!."""
    total = 0
    power = 5
    # Keep dividing x by powers of 5
    while power <= x:
        total += x // power
        power *= 5
    return total

def find_min_n(q):
    """Binary-search minimal n so that eval_zeros(n) >= q."""
    low, high = 1, 2 * 10**12
    answer = -1
    while low <= high:
        mid = (low + high) // 2
        if eval_zeros(mid) >= q:
            answer = mid
            high = mid - 1  # search lower half
        else:
            low = mid + 1   # search upper half
    return answer

def main():
    data = sys.stdin.read().strip()
    if not data:
        return
    q = int(data)
    n = find_min_n(q)
    # Verify exact match
    if n == -1 or eval_zeros(n) != q:
        print("No solution.")
    else:
        print(n)

if __name__ == "__main__":
    main()
```

5. Compressed Editorial
Count trailing zeros via Z(N)=∑⌊N/5^i⌋. Because Z(N) is non-decreasing, binary-search N in [1,2×10^12] to find the smallest N with Z(N)=Q. If none matches exactly, report "No solution.".
