This answer-chaining challenge is officially over, resulting in the win of Wheat Wizard, with a total of 7 answers. Any other answer is welcome, but it won't influence the accepted answer for this challenge, nor the winner.
Task:
Print all the positive divisors of a number x
taken as input.
Input:
A single number x
which is the number (in base 10) whose positive divisors should be computed.
Output:
All the positive divisors of x
. Any format is allowed, including \n
,,
,;
and whitespace as separators, as long as it's understandable. The output can be an array of Integers or Strings, too (e.g: [1, 2, 3, 5, 30]
). You may output the divisors to stdout, console or the equivalent in your language or they can be returned from a function.
Rules
- A user may not answer twice in a row
- Your answer may remove, add or replace at most 15 characters from the previous answer (whitespace does not count), besides for Answer 2 which can "transform" up to 20 characters to get things started
- You are not allowed to post an answer in a programming language that already has an answer, the exception being a completely different version of that language (e.g: If I post an answer in
Python 2.7
, you can submit one inPython 3
, but not inPython 2.6
) - Standard loopholes are not allowed
- You are not allowed to use built-ins for getting divisors, for the sake of this challenge
- You must include the answer's number and the language name in the question's title and the number of characters changed from the previous answer
Scoring
The user with the most submissions once the things settle out wins. In case of a tie, the user with the highest score on one of their answer wins. If there is a tie at the score as well, then the user with the oldest submission(oldest highest-scored answer) will be declared the winner.
Note: "settle out" <=> 7 3 days have passed since the last answer was submitted
Examples:
Input, Output:
14 => [1, 2, 7, 14]
25 => [1, 5, 25]
65 => [1, 5, 13, 65]
114 => [1, 2, 3, 6, 19, 38, 57, 114]
Or any other equivalent output satisfying the mentioned conditions.
Final Note: This question is better if you sort the answers by the oldest. I'll post the first answer in Python 2.7, so you should post the second answer depending on that one. Good luck and have fun!
Leaderboard:
This list may be outdated, fell free to edit it:
1) Wheat Wizard [Current Leader 🏆]: 7 answers - Python 1.6, 05AB1E, Actually, Del|m|t, WSF, Brain-Flak, Lenguage
2) Riley: 3 answers - Seriously, CJam, 2sable
3) Jonathan Allan: 2 answers - Python 3, Jelly
3) ETHproductions: 2 answers - Japt, Pyth
3) Mistah Figgins: 2 answers - Befunge-98, Brain-Flak Classic
6) Riker: 1 answer - MATL
6) dzaima: 1 answer - SOGL 0.8.2
6) LegionMammal978: 1 answer - Whitespace
6) Nick Clifford: 1 answer - Ohm
6) Lynn: 1 answer - GolfScript
6) MickyT: 1 answer - Cubix
Distance calculator
You can use this snippet to calculate the distance between two entries:
function L(s,t){if(s===t)return 0;var S=s.length,T=t.length;if(S*T===0)return S+T;for(var i=0,v0=[],v1=[];i<=T;i++)v0[i]=i;for(i=0;i<S;i++){v1[0]=i+1;for(var j=0;j<T;j++)v1[j+1]=Math.min(v1[j]+1,v0[j+1]+1,v0[j]+(s[i]!=t[j]));for(j=0;j<=T;j++)v0[j]=v1[j]}return v1[T]}
<textarea id=A rows=10></textarea><textarea id=B rows=10></textarea><br>
Distance: <span id=O>0</span> <button onclick="O.innerHTML=L(A.value.replace(/\s/g,''),B.value.replace(/\s/g,''))">Run</button>