No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
time limit per test: 0.25 sec.

memory limit per test: 4096 KB

memory limit per test: 4096 KB

input: standard input

output: standard output

output: standard output

You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the trail.

One number Q written in the input (0<=Q<=10^8).

Write "No solution", if there is no such number N, and N otherwise.

Input

2

Output

10

Author: | Andrew V. Lazarev |

Resource: | Saratov Subregional School Team Contest, 2002 |

Date: | Spring, 2002 |

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/04/2021 07:22:57 (h2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|