Let us define the operation of rebasing a number as writing out its digits in decimal form, then interpreting them in the smallest base N possible (2 <= n <= 10). For example, rebasing the number 1234 gives 194, since the smallest base that "1234" can be interpreted in is base 5, and "1234" interpreted in base 5 is 194 in decimal. Challenge Given a positive integer n, output n rebased as a decimal integer. Expected output Below is a list of the results of rebasing each number from 1 to 200: 1...| Recent Questions - Code Golf Stack Exchange
inspired by Count down from infinity Given a non-negative integer N, output the number of repetitions of the following steps it takes to reach 0: Convert N to binary (4812390 -> 10010010110111001100110) Flip each bit (10010010110111001100110 -> 01101101001000110011001) Trim leading zeroes (01101101001000110011001 -> 1101101001000110011001) Convert back to decimal (1101101001000110011001 -> 3576217) Rules Input and output may be in any unambiguous, consistent format The input will be within th...| Recent Questions - Code Golf Stack Exchange
What would you say if I told you that in math everything is a set? That, whatever mathematical object you name, it can be defined using sets? And not sets, that contains some special ingredient somewhere deep inside - but by basically wrapping up empty sets and merging it with more wrapped empty sets in various degree of wrapping?| kubuszok.com
Getting the sum of a list of numbers is a common scenario on the command line, whether you are checking local filesystem utilization or parsing infrastructure reports for total cpu counts. There are multiple ways this can be done, but one of the simplest is to use awk. Let’s use a a sequence of numbers ... Bash: calculate sum from a list of numbers| Fabian Lee : Software Engineer