# Search Results

Results tagged with Search options user 31516
89 results

This challenge is intended to be solved by using, manipulating, accepting as input, or outputting numeric values.

Octave, 39 35 28 bytes @(x)sum(x)/2<sum(x(1:end/2)) Input integers as a string '12345678'. Takes the sum of all the digits (as ASCII-values), and divides it by two, to get the mean of the two side …
answered May 5 '17 by Stewie Griffin
MATL, 4 bytes (Non-competing) 64+c Try it online! Because, why not. Takes input implicitly, pushes 64 and adds it to the input number. Finally it converts the number to its ASCII-equivalent using c. …
answered Nov 28 '17 by Stewie Griffin
Challenge: Take a vector / list of integers as input, and output the largest number that's adjacent to a zero. Specifications: As always, optional input and output format You may assume that …
asked Sep 21 '16 by Stewie Griffin
try to open the lock without looking at it. He starts turning the dial to the right, counting the numbers while he passes them. He then, at the correct number starts turning the dial to the left, still … printed to the screen / otherwise displayed (not to file) Assume that the starting position is not the same as the first number, and that all three numbers in the combination are unique It's the lock …
asked Oct 29 '15 by Stewie Griffin
and operators). However, there's a very large number of people who have answered, and 10% of those people are right! Let's find the right answer! Take an integer, percent, decimal value in 0-1, or … number that 100-N percent of the test group answered and output it. If there are more than one answer that matches this criterion, then you must output all of them. If there are no answers that are …
asked Oct 2 '17 by Stewie Griffin
You must take two lists of positive integers as input, let's call these n and m. You may assume that: All integers in n are part of m All integers in m are unique The lists are non-empty Challen …
asked May 1 '17 by Stewie Griffin
schedule. The input will be a time on the format hh:mm:ss (or (optional) h:mm:ss if it's been less than 10 hours) and a decimal number telling how far he has come (in km). The distances for each of the …
asked Sep 16 '15 by Stewie Griffin
MATLAB, 105 bytes x=input('');y=input('');t={'less than','greater than','equal to'}; sprintf('%i is %s %i',x,t{(x>=y)+(x==y)+1},y) Added a line break before sprintf, to ease readability. It works b …
answered Aug 31 '15 by Stewie Griffin
A number is balanced if the sum of the digits on each half of the number is equal, so: 1423 is balanced because 1+4 = 2+3, so is: 42615 because 4+2=1+5. Note that the middle digit is not included on … either side (or it's included on both sides) if there's an odd number of digits. Challenge: Take a positive integer as input, and output a truthy value if it's balanced and a falsy value if it's …
asked Sep 23 '16 by Stewie Griffin
Octave, 25 23 21 bytes @(n).55*n^5+n^3/4+n/5 Try it online! Uses the formula from the OEIS-entry. Saved two four bytes by rearranging the formula and using .55 instead of 11/20, thanks to fəˈnɛt …
answered Apr 28 '17 by Stewie Griffin
Challenge: Given a square input matrix A, pad the matrix with one row and one column on all four sides. The value of each element in the top and bottom row should be the sum of the elements in each …
asked Jul 4 '17 by Stewie Griffin