문제를 풀었습니다


Conta Consoantes
Dada uma string A, retorne a quantidade de consoantes de A; ContaConsoantes('Hello World') = 7;

11개월 전

문제를 풀었습니다


Triangulo Semelhante
Dados dois vetores A = (a1, a2, a3) e B = (b1, b2, b3) sendo referentes a arestas de triangulos. Verifique se os triangulos são ...

11개월 전

문제를 풀었습니다


Lista Ordenada
Dado um vetor V, verifique se o vetor está ordenado, retorne true ou false. Ordenado([1 2 3 4]) = true;

11개월 전

문제를 풀었습니다


Juros Compostos
Faça uma função que receba um capital inicial (C), uma taxa de juros a ser aplicada (i) e um tempo (t) para qual será aplicado o...

11개월 전

문제를 풀었습니다


Juros Simples
Faça uma função que calcule o montagem de um investimento com juros simples que receba como argumentos o capital inicial C, a ta...

11개월 전

문제를 풀었습니다


Tabuada
Dado um inteiro N, retorne um vetor contendo a tabuada de N de 1 a 10; ex: Tabuada(5) = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50...

11개월 전

문제를 풀었습니다


Loja de tintas
Faça um programa para uma loja de tintas. O programa deverá receber o tamanho em metros quadrados da área a ser pintada. Conside...

11개월 전

문제를 풀었습니다


Caracteres Unicos
Dada uma string, verifique se a string é composta de caracteres únicos, ou seja, nenhuma letra se repete. Retorne true ou false;...

11개월 전

문제를 풀었습니다


Multiplos 7
Escreva um programa que mostre todos os números entre 5 e 100 que são divisíveis por 7, mas não são múltiplos de 5. Os números o...

11개월 전

문제를 풀었습니다


Tipos de Triangulos
Dados os tamanhos dos lados de um triangulos A, B e C. Retorne qual o tipo do triangulo: 'equilátero', 'escaleno' ou 'isósceles'...

11개월 전

문제를 풀었습니다


Remove Repetidos e Ordena
Dado um vetor A, remove todos os valores repetidos deixando apenas 1 valor, e ordene o vetor. RemoveRepetidosEOrdena([1 1 2 3])...

11개월 전

문제를 풀었습니다


Maior Primo
Dado um valor inteiro N, qual o maior valor primo <= N MaiorPrimo(5) = 5; MaiorPrimo(10) = 7;

11개월 전

문제를 풀었습니다


Distancia Vetores
Dados dois vetores a = (x1, y1) e b = (x2, y2). Calcule a distância entre os vetores e verifique se estão perto (distancia < 10)...

11개월 전

문제를 풀었습니다


Buzz
Dado um número inteiro n, retorne 'buzz' se esse valor for multiplo de 5, ou retorne o valor caso contrario. Buzz(5) = 'buzz'; ...

11개월 전

문제를 풀었습니다


Fizz
Dado um número inteiro n, retorne 'fizz' se esse valor for multiplo de 3, ou retorne o valor caso contrario. Fizz(3) = 'fizz'; ...

11개월 전

문제를 풀었습니다


Odd row
Create a row 'y' with odd numbers where the potential maximum number is given by 'x' and the space between them by 'm'. The firs...

11개월 전

문제를 풀었습니다


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

11개월 전

문제를 풀었습니다


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

11개월 전

문제를 풀었습니다


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


Find out if Quadratic Equation has real roots or not?
Input [a b c] ax^2+bx+c=0 Output [1 or 0] 1= Quadratic Equation has real roots 0= Quadratic Equation has imaginary roots

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...

11개월 전

문제를 풀었습니다


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

11개월 전

문제를 풀었습니다


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...

11개월 전

문제를 풀었습니다


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...

11개월 전

더 보기