Feeds
解決済み
sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...
3ヶ月 前
解決済み
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...
3ヶ月 前
解決済み
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
3ヶ月 前
解決済み
surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...
3ヶ月 前
解決済み
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
3ヶ月 前
解決済み
Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.
3ヶ月 前
解決済み
area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...
3ヶ月 前
解決済み
Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...
3ヶ月 前
解決済み
Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...
3ヶ月 前
解決済み
Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...
3ヶ月 前
解決済み
Find Air Temperature from Cricket Stridulation Rate
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...
3ヶ月 前
解決済み
Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
3ヶ月 前
解決済み
2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...
3ヶ月 前
解決済み
Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?
3ヶ月 前
解決済み
Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...
3ヶ月 前
解決済み
Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...
3ヶ月 前
解決済み
Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]
3ヶ月 前
解決済み
Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...
3ヶ月 前
解決済み
Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...
3ヶ月 前
解決済み
Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...
3ヶ月 前
解決済み
Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...
3ヶ月 前
解決済み
Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...
3ヶ月 前
解決済み
Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...
3ヶ月 前