Risolto


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

7 mesi fa

Risolto


Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...

7 mesi fa

Risolto


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cornelius...

8 mesi fa

Risolto


How to get the additive inverse of a uint8.
Given x as a uint8 find the additive inverse y.

8 mesi fa

Risolto


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

8 mesi fa

Risolto


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

8 mesi fa

Risolto


Possible American Football Scoring Combinations
With inspiration from Problem 56195. Possible Ruby Scores, given the final score for two teams in an American football game (sco...

8 mesi fa

Risolto


Make a "better" checkerboard matrix
This problem seeks to expand the task in Cody Problem 4 by allowing for the creation of checkerboard matrices that can be rectan...

8 mesi fa

Risolto


Would Homer Like It?
Given a matrix of ones and zeros, you must determine if there are any doughnuts present (would Homer Simpson like it?). A doug...

8 mesi fa

Risolto


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

8 mesi fa

Risolto


Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...

8 mesi fa

Risolto


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...

8 mesi fa

Risolto


Make a Plot with Functions
Make a plot and test

8 mesi fa

Risolto


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

8 mesi fa

Risolto


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

9 mesi fa

Risolto


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

11 mesi fa

Risolto


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

11 mesi fa

Risolto


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to co...

11 mesi fa

Risolto


Project Euler: Problem 11, Largest product in a grid
What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

11 mesi fa

Risolto


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

11 mesi fa

Risolto


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

circa un anno fa

Risolto


Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...

circa un anno fa

Risolto


Create block matrix of integers (j+k-1) - Part II
Given m, n, p, and q, create an m-by-n matrix made up of submatrices, each sized p-by-q (if possible - the last row and column o...

circa un anno fa

Risolto


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

circa un anno fa

Risolto


Wordle
Wordle is an english game where you need to guess a 5 letter word. For each guess you'll receive a feedback for the placement of...

oltre un anno fa

Risolto


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

oltre un anno fa

Risolto


Dartboard Average I
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

oltre un anno fa

Risolto


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. Fun note: technically it...

oltre un anno fa

Risolto


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

oltre un anno fa

Risolto


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

oltre un anno fa

Carica altro