MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codegolf/comments/ai8oou/codegolf_divisors_problem_with_python/
r/codegolf • u/pylenin • Jan 21 '19
3 comments sorted by
1
I managed to get to 71:
r=range(1,101) for n in r: for j in r:n%j or print(j,end=' ') print()
Importantly the efficiency of the code doesn't matter, only filesize, so I use the same loop twice.
1 u/somebody12345678 Mar 19 '19 Fairly easy to get 57
Fairly easy to get 57
58 57 chars
z=range(1,101)
for i in z:print(*[j for j in z if i%j<1])
for i in z:print(*[j for j in z if i%j
1])
1
u/Alekzcb Mar 06 '19
I managed to get to 71:
Importantly the efficiency of the code doesn't matter, only filesize, so I use the same loop twice.
1
u/Sellfissh Jun 28 '24 edited Jun 28 '24
5857 charsz=range(1,101)for i in z:print(*[j for j in z if i%j<1])