The Luckiest Number 题目大意:给你一个int范围内的正整数n,求这样的最小的x,使得:连续的x个8可以被n整除. 注释:如果无解输出0.poj多组数据,第i组数据前面加上Case i: 即可. 想法:这题还是挺好的.我最开始的想法是一定有超级多的数输出0.然后...我就在哪里找啊找....其实这道题是一道比较好玩儿的数论题.我们思考:连续的8可用什么来表示出来?$\frac{(10^x-1)}{9}\cdot 8$.其实想到这一步这题就做完了.这题的精髓就在于告诉我们连续的连…
Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 26926 Accepted: 11174 Special Judge Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains…
Ones Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11461 Accepted: 6488 Description Given any integer 0 <= n <= 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many d…