2014. Sum of digits

单点时限: 2.0 sec

内存限制: 256 MB

Let us denote the sum of digits of the number N by S(N). In this problem, we want you to determine, how often the following equality holds:

S(A+B) = S(A) + S(B)

输入格式

There are several test cases.Each input contains a single positive integer K, 2 ≤ K ≤ 50.

输出格式

You should output the number of pairs of K-digit numbers A and B to satisfy the above equality. Counting that number you should be aware of the following:

  1. Numbers A and B should not have leading zeroes

  2. While counting the total number of pairs, the order of numbers A and B matters, thus, for instance, (12, 26) and (26, 12) are different pairs that satisfy the conditions of the problem.

样例

Input
2
Output
1980

27 人解决,44 人已尝试。

37 份提交通过,共有 113 份提交。

5.1 EMB 奖励。

创建: 16 年,11 月前.

修改: 7 年,2 月前.

最后提交: 1 年,4 月前.

来源: USU Internal Contest, March 2002

题目标签