Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

oltre 10 anni fa

Risolto


Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

oltre 10 anni fa

Risolto


Genome Sequence 004: Long 3rd Generation Segment Correction
The Melopsittacus undulates genome, Parrot Budgerigar, was successfully sequenced in July 2012 using long 3rd Gen sequences prov...

oltre 10 anni fa

Problema


Get me! v3
A harder version of Get me! I *think* I only left one door open.. we could be close to a perfect anti-cheating engine,

oltre 10 anni fa | 4 | 18 risolutori

Risolto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

oltre 10 anni fa

Risolto


Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

oltre 10 anni fa

Risolto


Hack not this Test Suite you will
Another Hack 10000 Challenge. I am thinking of an integer between 1 and 10000. Return a value between 1 and 10000. I ma...

oltre 10 anni fa

Problema


Get me! v2
Exploiting cody v2

oltre 10 anni fa | 1 | 21 risolutori

Risolto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

oltre 10 anni fa

Risolto


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

oltre 10 anni fa

Risolto


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

oltre 10 anni fa

Risolto


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

oltre 10 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

oltre 10 anni fa

Risolto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

oltre 10 anni fa

Risolto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

oltre 10 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

oltre 10 anni fa

Risolto


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

oltre 10 anni fa

Risolto


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

oltre 10 anni fa

Risolto


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

oltre 10 anni fa

Risolto


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

oltre 10 anni fa

Risolto


Add two numbers
Given a and b, return the sum a+b in c.

oltre 10 anni fa

Risolto


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

oltre 10 anni fa

Risolto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

oltre 10 anni fa

Problema


Get me!
Inspired by Now! problems. Do your best!

oltre 10 anni fa | 1 | 24 risolutori

Risolto


Now! (Anticheating version 1)
By now, _Problem 901. Now!_ has not been solved without the use of cheats or hacks. <http://www.mathworks.com/matlabcentral/c...

oltre 10 anni fa

Risolto


What? Paradox?
What's going on here?

oltre 10 anni fa

Risolto


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

oltre 10 anni fa

Problema


What? Paradox?
What's going on here?

oltre 10 anni fa | 1 | 15 risolutori

Risolto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre 10 anni fa

Risolto


Metamorphosis
Inspired by problem <http://www.mathworks.com/matlabcentral/cody/problems/866-community-problem-500 866>. Can you make your c...

oltre 10 anni fa

Carica altro