#272. 实践 24-4 sramoc问题

实践 24-4 sramoc问题

时间限制:1 sec1 \ sec ;空间限制:128 MB128\ MB

题目描述

Sramoc(K,M)Sramoc(K,M) 表示用数字 0,1,2,...,K10,1,2,...,K-1 组成的非零自然数中能被 MM 整除的最小数。给定 K,MK,M ,求 Sramoc(K,M)Sramoc(K,M) 。例如 K=2,M=7K=2,M=7 的时候, Sramoc(2,7)=1001Sramoc(2,7)=1001

输入格式

第一行为两个整数 K,MK,M

输出格式

一个整数,表示符合条件的数。

样例输入

2 7

样例输出

1001

样例分析

每个位上的数 <2 \lt 2 ,能被 77 整除的最小数字是 10011001

数据范围

100%100\% 的数据: 2K10;1M10002 \leq K \leq 10 ; 1 \leq M \leq 1000