Lucky Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 294 Accepted Submission(s): 49 Problem Description “Ladies and Gentlemen, It’s show time! ” “A thief is a creative artist who ta…
Description A lucky number is a number whose decimal representation contains only the digits \(4\) and \(7\). An almost lucky number is a number that is divisible by a lucky number. For example, \(14\), \(36\) and \(747\) are almost lucky, but \(2\)…
Problem description Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Unfortunate…
CF1478-B. Nezzar and Lucky Number 题意: 题目给出一个数字\(d(1\leq d \leq 9)\)代表某个人最喜欢的数字. 题目定义了幸运数字,它的含义为:若一个数字的每个数位上至少出现一次这个人最喜欢的数字那么就称这个数字为幸运数字.例如这个人非常喜欢\(7\),那么\(711\)就是一个幸运数字,因为\(711\)的百位上有一个数字\(7\),而\(113\)就不是一个幸运数字,因为它的各个数位上都没有数字\(7\). 题目任意给出一个数字\(a\),问你…
当进制转换后所剩下的为数较少时(2位.3位),相应的base都比較大.能够用数学的方法计算出来. 预处理掉转换后位数为3位后,base就小于n的3次方了,能够暴力计算. . .. Lucky Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 521 Accepted Submission(s): 150 Probl…
A. Nearly Lucky Number time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations con…