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中所有的数。