#302. Sramoc 问题 (sramoc)

Sramoc 问题 (sramoc)

Description

Sramoc ( K , M ) 表示用数字 0、1、2…、K-1 组成的自然数中能被 M 整除的最小数。

给定 K、M,求 Sramoc ( K,M )。例如 K=2,M=7 的时候,Sramoc( 2 , 7 ) = 1001。

Format

Input

从文件 SRAMOC.in 读入数据。第一行为两个整数 K、M 满足 2<=K<=10、1<=M<=1000。

Output

输出 Sramoc(K,M) 到 SRAMOC.OUT。

Samples

2 7 
1001

##数据保证答案在int64内。不一定要用到0,1,2,……,k-1中所有的数。