+ 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

26th Sep 2017, 6:14 AM
Arthur Queiroz Moura
Arthur Queiroz Moura - avatar
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
26th Sep 2017, 3:56 PM
Arthur Queiroz Moura
Arthur Queiroz Moura - avatar
26th Sep 2017, 10:19 AM
Ali Rashidi
Ali Rashidi - avatar
+ 1
https://code.sololearn.com/ccvPOq7y9qDP/?ref=app
26th Sep 2017, 11:51 AM
Arnold
Arnold - avatar
+ 1
Here you go. Checks for valid input. https://code.sololearn.com/c7ixO8Dmk2C5/?ref=app
27th Sep 2017, 11:26 AM
Vari93
Vari93 - avatar
0
my practice on python https://code.sololearn.com/ci5wwFK0T3AX/#py plus i'll the number when check TLE runs with 5433, 5430 ones
27th Sep 2017, 4:06 AM
ysraelcon
ysraelcon - avatar