UVa 11723

From Algorithmist
Jump to navigation Jump to search

UVa 11723 - Numbering Roads[edit]

Summary[edit]

It's a simple mathematical problem. Your Task is to find out the minimum number of possibility to numbering all the roads with the given number of roads & numbers.

Explanation[edit]

The solution of this problem is the answer of this: (number of road - 1)/number of numbers.

Notes[edit]

Remember one thing. If your answer is more then 26, it's impossible to process.

Implementations[edit]

Take road number & number of numbers as long long integer.

Input[edit]

8 5

100 2

0 0

Output[edit]

Case 1: 1

Case 2: impossible