#abc203b. B - AtCoder Condominium

B - AtCoder Condominium

Score : 200200 points

问题描述

AtCoder 公寓中,有 NN 层楼,分别称为第1层到第 NN 层。每层楼有 KK 个房间,依次称为第1间房到第 KK 间房。

这里,NNKK 都是一位整数,且第 ii 层的第 jj 个房间的房间号为 i0j。例如,第1层的第2个房间的房间号为 102102

身为经理的高桥对公寓中所有房间的房间号之和产生了兴趣,这里的每个房间号都被视为一个三位整数。请计算这个总和。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

A condominium AtCoder has NN floors, called the 11-st floor through the NN-th floor. Each floor has KK rooms, called the 11-st room through the KK-th room.

Here, both NN and KK are one-digit integers, and the jj-th room on the ii-th floor has the room number i0j. For example, the 22-nd room on the 11-st floor has the room number 102102.

Takahashi, the manager, got interested in the sum of the room numbers of all rooms in the condominium, where each room number is seen as a three-digit integer. Find this sum.

Constraints

  • 1N,K91 \leq N,K \leq 9
  • NN and KK are integers.

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the answer.

Sample Input 1

1 2

Sample Output 1

203

The condominium has two rooms 101101 and 102102. We have 101+102=203101+102=203.

Sample Input 2

3 3

Sample Output 2

1818

update @ 2024/3/10 09:15:21

}