A résolu


Integer Persistence, Product
Let's construct a sequence as follows: is a given natural number, and is the product of the digits of . The persistence of i...

environ 2 ans il y a

A résolu


Battery Charge Indicator
Write a function called battery_charge that visually represents the charge of a battery. The function takes an integer paramete...

environ 2 ans il y a

A résolu


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

environ 2 ans il y a

A résolu


Find the triplet
Given an array x of size n > 3 and an integer N, return the indices of three elements in the array that sum up to the given inte...

environ 2 ans il y a

A résolu


Find Next Strictly Greater Element
Given an array of numbers, create a new array where each element represents the next strictly greater element to the right of th...

environ 2 ans il y a

A résolu


Absolute Sorting
Given an array with various numbers, your have to sort it by absolute value in ascending order. For example, for the array [-2...

environ 2 ans il y a

A résolu


Remove Unique Elements
Given a list of integers, we want to keep only the non-unique elements in this list. To do this, we need to remove all the uniqu...

environ 2 ans il y a

A résolu


Find the largest sum of any contiguous subarray
Given an array of N integers, find the contiguous subarray (which must contain at least one number) with the maximum sum and ret...

environ 2 ans il y a

A résolu


Reverse Integer
You are given an integer, reverse its digits. For negative integers, the sign should remain in the front. For instance, 12340 s...

environ 2 ans il y a

A résolu


Find the number of diagonals in a n sided polygon.
Find the number of diagonals in a n sided polygon.

environ 2 ans il y a

A résolu


Recursive triangle area
Given triangle 1 with sides of length a, b, and c. Triangle 2 is constructed within triangle 1 by bisecting each side. Triangl...

environ 2 ans il y a

A résolu


Compute the Ramanujan tau function for large numbers
The Ramanujan tau function is defined by the relation where . The first few values of are 1, -24, 252, -1472, and 4830. Wr...

environ 2 ans il y a

Problème


Compute the Ramanujan tau function for large numbers
The Ramanujan tau function is defined by the relation where . The first few values of are 1, -24, 252, -1472, and 4830. Wr...

environ 2 ans il y a | 0 | 4 solveurs

A résolu


Find the square root of x
Determine the square root of x. For example square root of 4 is 2.

environ 2 ans il y a

A résolu


Compute the Ramanujan tau function
The Ramanujan tau function is defined by the relation where . The first few values of are 1, -24, 252, -1472, and 4830. W...

environ 2 ans il y a

A résolu


addition
x+ 1 = 13

plus de 2 ans il y a

A résolu


Successive zeros
Suppose n is the number of digits a number contains. Now, 12032 - is a valid n=5 digit number. But 10023 - is defined as i...

plus de 2 ans il y a

A résolu


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

plus de 2 ans il y a

A résolu


No of squares in a grid
given a m*n grid calculate the no of possible squares & rectangles on that grid. output: y=[no of rectangles , no of sqa...

plus de 2 ans il y a

A résolu


chess position
given the position of a chess piece in algebric notation, convert it into 8 by 8 matrix format. For example, * 'Qd5' >> [3,4]...

plus de 2 ans il y a

A résolu


Out-of-Place Elements Count
Determine the number of elements in a list of integers that are not in their original order after sorting the list in ascending ...

plus de 2 ans il y a

A résolu


List the segmented numbers
The sequence of segmented numbers begins 1, 2, 4, 5, 8, 10, 14, 15, 16. Notice that none of the terms is the sum of consecutive ...

plus de 2 ans il y a

A résolu


Determine if the square root is an integer.
Write code that returns true if perfect square and returns false if square root is not an integer.

plus de 2 ans il y a

A résolu


Remove runs of at least n consecutive NaNs
This problem is inspired by Dyuman Joshi's problem 58329. Given a row vector x and a natural number n, remove all runs of at lea...

plus de 2 ans il y a

A résolu


Convert vector of strings to lower triangular matrix
Given a non-empty vector vec of strings, please put its elements into the lower triangular half of a square matrix M column-wise...

plus de 2 ans il y a

A résolu


Count the ways to write 1/n as the sum of two unit fractions
The number 1/2 can be written as 1/3+1/6 and 1/4+1/4, and the number 1/9 can be written as 1/18+1/18, 1/12+1/36, and 1/10+1/90. ...

plus de 2 ans il y a

A résolu


List the ways to write 1/n as the sum of two unit fractions
Cody Problem 59841 involved counting the ways that can be written as the sum of two unit fractions (those with a numerator of 1...

plus de 2 ans il y a

A résolu


Calculate the Area of the Ring
You have Ring which consist of inner and outer Circles with Radius r and R which are not given but you'll be given Hprizontal ...

plus de 2 ans il y a

A résolu


Sequencing Odd Even numbers
Given an input value n, create a vector which contains all odd numbers & even numbers centered around mean of vector. If the me...

plus de 2 ans il y a

A résolu


Determine whether a number is a Gaussian prime
A Gaussian prime is a number that cannot be factored. For example, is not a Gaussian prime because it can be factored as the p...

plus de 2 ans il y a

Charger plus