#P8599. [蓝桥杯 2013 省 B] 带分数
[蓝桥杯 2013 省 B] 带分数
Problem Description
can be written as a mixed fraction: .
It can also be written as: .
Note the feature: in the mixed fraction, the digits to each appear exactly once (digit is not included).
For mixed fractions like this, has different representations.
Input Format
Read a positive integer from standard input.
Output Format
Output the total number of ways to represent as a mixed fraction formed by using the digits to exactly once each, with no repetition and no omission.
Note: You do not need to output each representation; only count how many there are.
100
11
105
6
Hint
In the original problem, the time limit is 3 seconds and the memory limit is 64 MB. This is from the 4th Lanqiao Cup Provincial Contest in 2013.
Translated by ChatGPT 5