+ 1
CHALLENGE
CHALLENGE ==> make a program that takes as input a natural number N that isnt divisible by 2 or 5 and output the number of algarisms of the lowest number composed only by algarisms 1 that N divides. For instance if our input is 3 we should output 3 because 111%3==0; if our input is 7 we should output 6 because 111111%7==0
5 Answers
+ 2
Ali Rashidi's and arjun's codes are too unefficcient , it gives TLE when I put a high number like 9967, that needs 9966 ones
+ 1
My try in c++ :
https://code.sololearn.com/cV0cSK8hlGh9/?ref=app
+ 1
https://code.sololearn.com/ccvPOq7y9qDP/?ref=app
+ 1
Here you go. Checks for valid input.
https://code.sololearn.com/c7ixO8Dmk2C5/?ref=app
0
my practice on python https://code.sololearn.com/ci5wwFK0T3AX/#py
plus i'll the number when check TLE
runs with 5433, 5430 ones