From 0d53170798117c7ba8b94de62c6131f090325cf4 Mon Sep 17 00:00:00 2001 From: Beau Carnes Date: Mon, 8 Oct 2018 13:51:51 -0400 Subject: [PATCH] docs: add rest of Spanish docs for project Euler --- .../problem-1-multiples-of-3-and-5.spanish.md | 74 +++++ .../problem-10-summation-of-primes.spanish.md | 99 ++++++ ...roblem-100-arranged-probability.spanish.md | 58 ++++ .../problem-101-optimum-polynomial.spanish.md | 76 +++++ ...roblem-102-triangle-containment.spanish.md | 62 ++++ ...103-special-subset-sums-optimum.spanish.md | 64 ++++ ...m-104-pandigital-fibonacci-ends.spanish.md | 59 ++++ ...105-special-subset-sums-testing.spanish.md | 61 ++++ ...pecial-subset-sums-meta-testing.spanish.md | 62 ++++ .../problem-107-minimal-network.spanish.md | 71 +++++ ...m-108-diophantine-reciprocals-i.spanish.md | 60 ++++ .../problem-109-darts.spanish.md | 102 ++++++ ...em-11-largest-product-in-a-grid.spanish.md | 189 +++++++++++ ...-110-diophantine-reciprocals-ii.spanish.md | 59 ++++ .../problem-111-primes-with-runs.spanish.md | 108 +++++++ .../problem-112-bouncy-numbers.spanish.md | 61 ++++ .../problem-113-non-bouncy-numbers.spanish.md | 60 ++++ ...4-counting-block-combinations-i.spanish.md | 163 ++++++++++ ...-counting-block-combinations-ii.spanish.md | 62 ++++ ...lem-116-red-green-or-blue-tiles.spanish.md | 131 ++++++++ ...em-117-red-green-and-blue-tiles.spanish.md | 141 +++++++++ ...oblem-118-pandigital-prime-sets.spanish.md | 57 ++++ ...hly-divisible-triangular-number.spanish.md | 106 +++++++ .../problem-120-square-remainders.spanish.md | 58 ++++ ...roblem-121-disc-game-prize-fund.spanish.md | 59 ++++ ...em-122-efficient-exponentiation.spanish.md | 63 ++++ ...lem-123-prime-square-remainders.spanish.md | 59 ++++ .../problem-124-ordered-radicals.spanish.md | 98 ++++++ .../problem-125-palindromic-sums.spanish.md | 58 ++++ .../problem-126-cuboid-layers.spanish.md | 63 ++++ .../problem-127-abc-hits.spanish.md | 68 ++++ ...-128-hexagonal-tile-differences.spanish.md | 65 ++++ ...roblem-129-repunit-divisibility.spanish.md | 59 ++++ .../problem-13-large-sum.spanish.md | 296 ++++++++++++++++++ ...tes-with-prime-repunit-property.spanish.md | 60 ++++ ...blem-131-prime-cube-partnership.spanish.md | 59 ++++ ...oblem-132-large-repunit-factors.spanish.md | 58 ++++ .../problem-133-repunit-nonfactors.spanish.md | 59 ++++ ...oblem-134-prime-pair-connection.spanish.md | 58 ++++ .../problem-135-same-differences.spanish.md | 59 ++++ ...roblem-136-singleton-difference.spanish.md | 59 ++++ ...em-137-fibonacci-golden-nuggets.spanish.md | 77 +++++ ...138-special-isosceles-triangles.spanish.md | 61 ++++ .../problem-139-pythagorean-tiles.spanish.md | 61 ++++ ...lem-14-longest-collatz-sequence.spanish.md | 101 ++++++ ...dified-fibonacci-golden-nuggets.spanish.md | 68 ++++ ...numbers-n-which-are-also-square.spanish.md | 60 ++++ ...m-142-perfect-square-collection.spanish.md | 56 ++++ ...-torricelli-point-of-a-triangle.spanish.md | 61 ++++ ...ple-reflections-of-a-laser-beam.spanish.md | 65 ++++ ...ers-are-there-below-one-billion.spanish.md | 60 ++++ ...6-investigating-a-prime-pattern.spanish.md | 58 ++++ ...ctangles-in-cross-hatched-grids.spanish.md | 67 ++++ ...-148-exploring-pascals-triangle.spanish.md | 135 ++++++++ ...g-for-a-maximum-sum-subsequence.spanish.md | 72 +++++ .../problem-15-lattice-paths.spanish.md | 74 +++++ ...sub-triangle-having-minimum-sum.spanish.md | 81 +++++ ...sizes-an-expected-value-problem.spanish.md | 63 ++++ ...alf-as-a-sum-of-inverse-squares.spanish.md | 60 ++++ ...investigating-gaussian-integers.spanish.md | 100 ++++++ ...m-154-exploring-pascals-pyramid.spanish.md | 63 ++++ ...155-counting-capacitor-circuits.spanish.md | 65 ++++ .../problem-156-counting-digits.spanish.md | 88 ++++++ ...olving-the-diophantine-equation.spanish.md | 78 +++++ ...after-its-neighbour-to-the-left.spanish.md | 63 ++++ ...tal-root-sums-of-factorisations.spanish.md | 81 +++++ .../problem-16-power-digit-sum.spanish.md | 90 ++++++ ...m-160-factorial-trailing-digits.spanish.md | 61 ++++ .../problem-161-triominoes.spanish.md | 70 +++++ ...problem-162-hexadecimal-numbers.spanish.md | 63 ++++ ...lem-163-cross-hatched-triangles.spanish.md | 63 ++++ ...-sum-greater-than-a-given-value.spanish.md | 56 ++++ .../problem-165-intersections.spanish.md | 73 +++++ .../problem-166-criss-cross.spanish.md | 68 ++++ ...67-investigating-ulam-sequences.spanish.md | 61 ++++ .../problem-168-number-rotations.spanish.md | 59 ++++ ...pressed-as-a-sum-of-powers-of-2.spanish.md | 62 ++++ ...problem-17-number-letter-counts.spanish.md | 135 ++++++++ ...ormed-by-concatenating-products.spanish.md | 65 ++++ ...uares-of-the-digits-is-a-square.spanish.md | 60 ++++ ...umbers-with-few-repeated-digits.spanish.md | 56 ++++ ...ow-square-laminae-can-be-formed.spanish.md | 60 ++++ ...three-...-distinct-arrangements.spanish.md | 62 ++++ ...pressed-as-a-sum-of-powers-of-2.spanish.md | 65 ++++ ...triangles-that-share-a-cathetus.spanish.md | 57 ++++ ...7-integer-angled-quadrilaterals.spanish.md | 61 ++++ .../problem-178-step-numbers.spanish.md | 61 ++++ ...9-consecutive-positive-divisors.spanish.md | 56 ++++ .../problem-18-maximum-path-sum-i.spanish.md | 97 ++++++ ...f-a-function-of-three-variables.spanish.md | 64 ++++ ...ifferent-colours-can-be-grouped.spanish.md | 59 ++++ ...em-183-maximum-product-of-parts.spanish.md | 71 +++++ ...triangles-containing-the-origin.spanish.md | 62 ++++ .../problem-185-number-mind.spanish.md | 93 ++++++ ...-186-connectedness-of-a-network.spanish.md | 68 ++++ .../problem-187-semiprimes.spanish.md | 61 ++++ ...hyperexponentiation-of-a-number.spanish.md | 61 ++++ ...tri-colouring-a-triangular-grid.spanish.md | 68 ++++ .../problem-19-counting-sundays.spanish.md | 76 +++++ ...0-maximising-a-weighted-product.spanish.md | 60 ++++ .../problem-191-prize-strings.spanish.md | 68 ++++ ...problem-192-best-approximations.spanish.md | 63 ++++ .../problem-193-squarefree-numbers.spanish.md | 58 ++++ ...lem-194-coloured-configurations.spanish.md | 66 ++++ ...es-with-one-angle-of-60-degrees.spanish.md | 62 ++++ .../problem-196-prime-triplets.spanish.md | 82 +++++ ...-a-recursively-defined-sequence.spanish.md | 60 ++++ .../problem-198-ambiguous-numbers.spanish.md | 62 ++++ ...em-199-iterative-circle-packing.spanish.md | 64 ++++ ...roblem-2-even-fibonacci-numbers.spanish.md | 81 +++++ .../problem-20-factorial-digit-sum.spanish.md | 66 ++++ ...g-the-contiguous-sub-string-200.spanish.md | 63 ++++ ...m-201-subsets-with-a-unique-sum.spanish.md | 87 +++++ .../problem-202-laserbeam.spanish.md | 65 ++++ ...quarefree-binomial-coefficients.spanish.md | 69 ++++ ...204-generalised-hamming-numbers.spanish.md | 63 ++++ .../problem-205-dice-game.spanish.md | 61 ++++ .../problem-206-concealed-square.spanish.md | 56 ++++ ...207-integer-partition-equations.spanish.md | 77 +++++ .../problem-208-robot-walks.spanish.md | 63 ++++ .../problem-209-circular-logic.spanish.md | 66 ++++ .../problem-21-amicable-numbers.spanish.md | 83 +++++ ...lem-210-obtuse-angled-triangles.spanish.md | 61 ++++ .../problem-211-divisor-square-sum.spanish.md | 58 ++++ ...-212-combined-volume-of-cuboids.spanish.md | 70 +++++ .../problem-213-flea-circus.spanish.md | 59 ++++ .../problem-214-totient-chains.spanish.md | 75 +++++ .../problem-215-crack-free-walls.spanish.md | 65 ++++ ...ty-of-numbers-of-the-form-2n2-1.spanish.md | 61 ++++ .../problem-217-balanced-numbers.spanish.md | 60 ++++ ...-perfect-right-angled-triangles.spanish.md | 70 +++++ .../problem-219-skew-cost-coding.spanish.md | 68 ++++ .../problem-22-names-scores.spanish.md | 74 +++++ .../problem-220-heighway-dragon.spanish.md | 71 +++++ ...roblem-221-alexandrian-integers.spanish.md | 75 +++++ .../problem-222-sphere-packing.spanish.md | 58 ++++ ...almost-right-angled-triangles-i.spanish.md | 58 ++++ ...lmost-right-angled-triangles-ii.spanish.md | 58 ++++ ...lem-225-tribonacci-non-divisors.spanish.md | 62 ++++ ...oblem-226-a-scoop-of-blancmange.spanish.md | 65 ++++ .../problem-227-the-chase.spanish.md | 63 ++++ .../problem-228-minkowski-sums.spanish.md | 78 +++++ ...r-representations-using-squares.spanish.md | 74 +++++ .../problem-23-non-abundant-sums.spanish.md | 65 ++++ .../problem-230-fibonacci-words.spanish.md | 82 +++++ ...sation-of-binomial-coefficients.spanish.md | 60 ++++ .../problem-232-the-race.spanish.md | 62 ++++ ...-233-lattice-points-on-a-circle.spanish.md | 59 ++++ ...oblem-234-semidivisible-numbers.spanish.md | 63 ++++ ...n-arithmetic-geometric-sequence.spanish.md | 63 ++++ .../problem-236-luxury-hampers.spanish.md | 68 ++++ ...-tours-on-a-4-x-n-playing-board.spanish.md | 66 ++++ ...roblem-238-infinite-string-tour.spanish.md | 89 ++++++ ...m-239-twenty-two-foolish-primes.spanish.md | 61 ++++ ...m-24-lexicographic-permutations.spanish.md | 64 ++++ .../problem-240-top-dice.spanish.md | 67 ++++ ...roblem-241-perfection-quotients.spanish.md | 64 ++++ .../problem-242-odd-triplets.spanish.md | 64 ++++ .../problem-243-resilience.spanish.md | 64 ++++ .../problem-244-sliders.spanish.md | 81 +++++ .../problem-245-coresilience.spanish.md | 66 ++++ ...blem-246-tangents-to-an-ellipse.spanish.md | 73 +++++ ...m-247-squares-under-a-hyperbola.spanish.md | 71 +++++ .../problem-249-prime-subset-sums.spanish.md | 58 ++++ ...-25-1000-digit-fibonacci-number.spanish.md | 82 +++++ .../problem-251-cardano-triplets.spanish.md | 66 ++++ .../problem-252-convex-holes.spanish.md | 82 +++++ .../problem-253-tidying-up.spanish.md | 74 +++++ ...em-254-sums-of-digit-factorials.spanish.md | 66 ++++ ...roblem-255-rounded-square-roots.spanish.md | 79 +++++ .../problem-256-tatami-free-rooms.spanish.md | 81 +++++ .../problem-257-angular-bisectors.spanish.md | 68 ++++ ...258-a-lagged-fibonacci-sequence.spanish.md | 60 ++++ .../problem-259-reachable-numbers.spanish.md | 66 ++++ .../problem-26-reciprocal-cycles.spanish.md | 65 ++++ .../problem-260-stone-game.spanish.md | 75 +++++ .../problem-262-mountain-range.spanish.md | 71 +++++ ...63-an-engineers-dream-come-true.spanish.md | 75 +++++ .../problem-264-triangle-centres.spanish.md | 76 +++++ .../problem-265-binary-circles.spanish.md | 69 ++++ .../problem-266-pseudo-square-root.spanish.md | 63 ++++ .../problem-267-billionaire.spanish.md | 61 ++++ ...nct-prime-factors-less-than-100.spanish.md | 58 ++++ ...-with-at-least-one-integer-root.spanish.md | 66 ++++ .../problem-27-quadratic-primes.spanish.md | 70 +++++ .../problem-270-cutting-squares.spanish.md | 63 ++++ ...roblem-271-modular-cubes-part-1.spanish.md | 61 ++++ ...roblem-272-modular-cubes-part-2.spanish.md | 61 ++++ .../problem-273-sum-of-squares.spanish.md | 62 ++++ ...em-274-divisibility-multipliers.spanish.md | 68 ++++ ...problem-275-balanced-sculptures.spanish.md | 64 ++++ ...problem-276-primitive-triangles.spanish.md | 58 ++++ ...277-a-modified-collatz-sequence.spanish.md | 80 +++++ ...near-combinations-of-semiprimes.spanish.md | 66 ++++ ...ral-sides-and-an-integral-angle.spanish.md | 56 ++++ ...blem-28-number-spiral-diagonals.spanish.md | 80 +++++ .../problem-280-ant-and-seeds.spanish.md | 61 ++++ .../problem-281-pizza-toppings.spanish.md | 64 ++++ ...blem-282-the-ackermann-function.spanish.md | 63 ++++ ...ea--perimeter-ratio-is-integral.spanish.md | 62 ++++ .../problem-284-steady-squares.spanish.md | 63 ++++ .../problem-285-pythagorean-odds.spanish.md | 65 ++++ ...oblem-286-scoring-probabilities.spanish.md | 60 ++++ ...-a-simple-compression-algorithm.spanish.md | 71 +++++ ...oblem-288-an-enormous-factorial.spanish.md | 71 +++++ .../problem-289-eulerian-cycles.spanish.md | 70 +++++ .../problem-29-distinct-powers.spanish.md | 80 +++++ .../problem-290-digital-signature.spanish.md | 56 ++++ .../problem-291-panaitopol-primes.spanish.md | 59 ++++ ...roblem-292-pythagorean-polygons.spanish.md | 63 ++++ ...em-293-pseudo-fortunate-numbers.spanish.md | 68 ++++ ...4-sum-of-digits---experience-23.spanish.md | 67 ++++ .../problem-295-lenticular-holes.spanish.md | 78 +++++ ...96-angular-bisector-and-tangent.spanish.md | 61 ++++ ...m-297-zeckendorf-representation.spanish.md | 64 ++++ .../problem-298-selective-amnesia.spanish.md | 130 ++++++++ ...lem-299-three-similar-triangles.spanish.md | 69 ++++ .../problem-3-largest-prime-factor.spanish.md | 78 +++++ .../problem-30-digit-n-powers.spanish.md | 68 ++++ .../problem-300-protein-folding.spanish.md | 73 +++++ .../project-euler/problem-301-nim.spanish.md | 71 +++++ ...lem-302-strong-achilles-numbers.spanish.md | 74 +++++ ...303-multiples-with-small-digits.spanish.md | 60 ++++ .../problem-304-primonacci.spanish.md | 71 +++++ .../problem-305-reflexive-position.spanish.md | 67 ++++ .../problem-306-paper-strip-game.spanish.md | 73 +++++ .../problem-307-chip-defects.spanish.md | 63 ++++ ...zing-prime-generating-automaton.spanish.md | 94 ++++++ .../problem-309-integer-ladders.spanish.md | 66 ++++ .../problem-31-coin-sums.spanish.md | 75 +++++ .../problem-310-nim-square.spanish.md | 62 ++++ ...iclinic-integral-quadrilaterals.spanish.md | 70 +++++ ...yclic-paths-on-sierpiski-graphs.spanish.md | 74 +++++ .../problem-313-sliding-game.spanish.md | 66 ++++ ...oblem-314-the-mouse-on-the-moon.spanish.md | 73 +++++ ...problem-315-digital-root-clocks.spanish.md | 102 ++++++ ...6-numbers-in-decimal-expansions.spanish.md | 70 +++++ .../problem-317-firecracker.spanish.md | 63 ++++ .../problem-319-bounded-sequences.spanish.md | 71 +++++ .../problem-32-pandigital-products.spanish.md | 102 ++++++ ...als-divisible-by-a-huge-integer.spanish.md | 64 ++++ .../problem-321-swapping-counters.spanish.md | 70 +++++ ...al-coefficients-divisible-by-10.spanish.md | 60 ++++ ...r-operations-on-random-integers.spanish.md | 63 ++++ .../problem-324-building-a-tower.spanish.md | 59 ++++ .../problem-325-stone-game-ii.spanish.md | 80 +++++ .../problem-326-modulo-summations.spanish.md | 69 ++++ .../problem-327-rooms-of-doom.spanish.md | 77 +++++ .../problem-328-lowest-cost-search.spanish.md | 78 +++++ .../problem-329-prime-frog.spanish.md | 67 ++++ ...m-33-digit-cancelling-fractions.spanish.md | 113 +++++++ .../problem-330-eulers-number.spanish.md | 96 ++++++ .../problem-331-cross-flips.spanish.md | 74 +++++ ...problem-332-spherical-triangles.spanish.md | 69 ++++ .../problem-333-special-partitions.spanish.md | 71 +++++ .../problem-334-spilling-the-beans.spanish.md | 151 +++++++++ ...problem-335-gathering-the-beans.spanish.md | 64 ++++ ...roblem-336-maximix-arrangements.spanish.md | 69 ++++ ...337-totient-stairstep-sequences.spanish.md | 65 ++++ ...-cutting-rectangular-grid-paper.spanish.md | 73 +++++ .../problem-339-peredur-fab-efrawg.spanish.md | 65 ++++ .../problem-34-digit-factorials.spanish.md | 60 ++++ .../problem-340-crazy-function.spanish.md | 68 ++++ ...olombs-self-describing-sequence.spanish.md | 64 ++++ ...e-totient-of-a-square-is-a-cube.spanish.md | 64 ++++ ...roblem-343-fractional-sequences.spanish.md | 77 +++++ .../problem-344-silver-dollar-game.spanish.md | 76 +++++ .../problem-345-matrix-sum.spanish.md | 81 +++++ .../problem-346-strong-repunits.spanish.md | 61 ++++ ...integer-divisible-by-two-primes.spanish.md | 70 +++++ ...-348-sum-of-a-square-and-a-cube.spanish.md | 65 ++++ .../problem-349-langtons-ant.spanish.md | 61 ++++ .../problem-35-circular-primes.spanish.md | 100 ++++++ ...greatest-and-the-greatest-least.spanish.md | 69 ++++ .../problem-351-hexagonal-orchards.spanish.md | 75 +++++ .../problem-352-blood-tests.spanish.md | 93 ++++++ .../problem-353-risky-moon.spanish.md | 84 +++++ ...4-distances-in-a-bees-honeycomb.spanish.md | 67 ++++ ...blem-355-maximal-coprime-subset.spanish.md | 63 ++++ ...gest-roots-of-cubic-polynomials.spanish.md | 63 ++++ ...m-357-prime-generating-integers.spanish.md | 61 ++++ .../problem-358-cyclic-numbers.spanish.md | 84 +++++ .../problem-359-hilberts-new-hotel.spanish.md | 85 +++++ ...blem-36-double-base-palindromes.spanish.md | 64 ++++ .../problem-360-scary-sphere.spanish.md | 67 ++++ ...sequence-of-thue-morse-sequence.spanish.md | 81 +++++ .../problem-362-squarefree-factors.spanish.md | 72 +++++ .../problem-363-bzier-curves.spanish.md | 77 +++++ ...roblem-364-comfortable-distance.spanish.md | 68 ++++ ...365-a-huge-binomial-coefficient.spanish.md | 61 ++++ .../problem-366-stone-game-iii.spanish.md | 79 +++++ .../problem-367-bozo-sort.spanish.md | 72 +++++ ...oblem-368-a-kempner-like-series.spanish.md | 69 ++++ .../problem-369-badugi.spanish.md | 60 ++++ .../problem-37-truncatable-primes.spanish.md | 64 ++++ ...problem-370-geometric-triangles.spanish.md | 62 ++++ .../problem-371-licence-plates.spanish.md | 68 ++++ .../problem-372-pencils-of-rays.spanish.md | 61 ++++ ...oblem-373-circumscribed-circles.spanish.md | 65 ++++ ...ximum-integer-partition-product.spanish.md | 75 +++++ ...lem-375-minimum-of-subsequences.spanish.md | 71 +++++ ...377-sum-of-digits-experience-13.spanish.md | 65 ++++ .../problem-378-triangle-triples.spanish.md | 74 +++++ ...379-least-common-multiple-count.spanish.md | 66 ++++ ...problem-38-pandigital-multiples.spanish.md | 101 ++++++ .../problem-380-amazing-mazes.spanish.md | 69 ++++ ...problem-382-generating-polygons.spanish.md | 79 +++++ ...y-comparison-between-factorials.spanish.md | 66 ++++ ...blem-384-rudin-shapiro-sequence.spanish.md | 80 +++++ ...m-385-ellipses-inside-triangles.spanish.md | 76 +++++ ...-maximum-length-of-an-antichain.spanish.md | 66 ++++ .../problem-387-harshad-numbers.spanish.md | 72 +++++ .../problem-388-distinct-lines.spanish.md | 65 ++++ .../problem-389-platonic-dice.spanish.md | 57 ++++ ...blem-39-integer-right-triangles.spanish.md | 64 ++++ ...ational-sides-and-integral-area.spanish.md | 65 ++++ .../problem-391-hopping-game.spanish.md | 83 +++++ ...roblem-392-enmeshed-unit-circle.spanish.md | 72 +++++ .../problem-393-migrating-ants.spanish.md | 62 ++++ .../problem-394-eating-pie.spanish.md | 72 +++++ .../problem-395-pythagorean-tree.spanish.md | 74 +++++ ...lem-396-weak-goodstein-sequence.spanish.md | 80 +++++ ...roblem-397-triangle-on-parabola.spanish.md | 63 ++++ .../problem-398-cutting-rope.spanish.md | 65 ++++ ...99-squarefree-fibonacci-numbers.spanish.md | 77 +++++ ...em-4-largest-palindrome-product.spanish.md | 73 +++++ ...problem-400-fibonacci-tree-game.spanish.md | 77 +++++ ...-401-sum-of-squares-of-divisors.spanish.md | 67 ++++ ...-402-integer-valued-polynomials.spanish.md | 73 +++++ ...s-enclosed-by-parabola-and-line.spanish.md | 67 ++++ ...problem-404-crisscross-ellipses.spanish.md | 75 +++++ ...roblem-405-a-rectangular-tiling.spanish.md | 77 +++++ .../problem-407-idempotents.spanish.md | 64 ++++ ...admissible-paths-through-a-grid.spanish.md | 65 ++++ .../problem-409-nim-extreme.spanish.md | 62 ++++ .../problem-41-pandigital-prime.spanish.md | 126 ++++++++ ...lem-410-circle-and-tangent-line.spanish.md | 63 ++++ .../problem-411-uphill-paths.spanish.md | 68 ++++ .../problem-412-gnomon-numbering.spanish.md | 70 +++++ .../problem-413-one-child-numbers.spanish.md | 65 ++++ .../problem-414-kaprekar-constant.spanish.md | 87 +++++ .../problem-415-titanic-sets.spanish.md | 65 ++++ .../problem-416-a-frogs-trip.spanish.md | 61 ++++ ...roblem-417-reciprocal-cycles-ii.spanish.md | 78 +++++ ...oblem-418-factorisation-triples.spanish.md | 65 ++++ ...oblem-419-look-and-say-sequence.spanish.md | 73 +++++ ...oblem-42-coded-triangle-numbers.spanish.md | 68 ++++ ...420-2x2-positive-integer-matrix.spanish.md | 68 ++++ ...oblem-421-prime-factors-of-n151.spanish.md | 64 ++++ ...quence-of-points-on-a-hyperbola.spanish.md | 68 ++++ ...blem-423-consecutive-die-throws.spanish.md | 73 +++++ .../problem-424-kakuro.spanish.md | 76 +++++ .../problem-425-prime-connection.spanish.md | 73 +++++ .../problem-426-box-ball-system.spanish.md | 85 +++++ .../problem-427-n-sequences.spanish.md | 66 ++++ ...problem-428-necklace-of-circles.spanish.md | 69 ++++ ...-of-squares-of-unitary-divisors.spanish.md | 64 ++++ ...blem-43-sub-string-divisibility.spanish.md | 65 ++++ .../problem-430-range-flips.spanish.md | 70 +++++ .../problem-431-square-space-silo.spanish.md | 67 ++++ .../problem-432-totient-sum.spanish.md | 61 ++++ ...-433-steps-in-euclids-algorithm.spanish.md | 67 ++++ .../problem-434-rigid-graphs.spanish.md | 71 +++++ ...olynomials-of-fibonacci-numbers.spanish.md | 59 ++++ .../problem-436-unfair-wager.spanish.md | 70 +++++ ...m-437-fibonacci-primitive-roots.spanish.md | 74 +++++ ...-polynomial-equations-solutions.spanish.md | 68 ++++ ...blem-439-sum-of-sum-of-divisors.spanish.md | 61 ++++ .../problem-44-pentagon-numbers.spanish.md | 88 ++++++ .../problem-440-gcd-and-tiling.spanish.md | 70 +++++ ...se-summation-of-coprime-couples.spanish.md | 66 ++++ ...roblem-442-eleven-free-integers.spanish.md | 62 ++++ .../problem-443-gcd-sequence.spanish.md | 68 ++++ ...blem-444-the-roundtable-lottery.spanish.md | 72 +++++ .../problem-445-retractions-a.spanish.md | 65 ++++ .../problem-446-retractions-b.spanish.md | 63 ++++ .../problem-447-retractions-c.spanish.md | 64 ++++ ...8-average-least-common-multiple.spanish.md | 64 ++++ ...lem-449-chocolate-covered-candy.spanish.md | 68 ++++ ...ngular-pentagonal-and-hexagonal.spanish.md | 93 ++++++ ...-hypocycloid-and-lattice-points.spanish.md | 84 +++++ .../problem-451-modular-inverses.spanish.md | 71 +++++ .../problem-452-long-products.spanish.md | 59 ++++ ...blem-453-lattice-quadrilaterals.spanish.md | 64 ++++ ...454-diophantine-reciprocals-iii.spanish.md | 67 ++++ ...455-powers-with-trailing-digits.spanish.md | 64 ++++ ...angles-containing-the-origin-ii.spanish.md | 71 +++++ ...al-modulo-the-square-of-a-prime.spanish.md | 64 ++++ ...lem-458-permutations-of-project.spanish.md | 62 ++++ .../problem-459-flipping-game.spanish.md | 76 +++++ ...m-46-goldbachs-other-conjecture.spanish.md | 108 +++++++ .../problem-460-an-ant-on-the-move.spanish.md | 76 +++++ .../problem-461-almost-pi.spanish.md | 62 ++++ ...permutation-of-3-smooth-numbers.spanish.md | 70 +++++ ...463-a-weird-recurrence-relation.spanish.md | 65 ++++ ...64-mbius-function-and-intervals.spanish.md | 75 +++++ .../problem-465-polar-polygons.spanish.md | 72 +++++ ...terms-in-a-multiplication-table.spanish.md | 71 +++++ .../problem-467-superinteger.spanish.md | 74 +++++ ...visors-of-binomial-coefficients.spanish.md | 70 +++++ .../problem-469-empty-chairs.spanish.md | 66 ++++ ...blem-47-distinct-primes-factors.spanish.md | 111 +++++++ .../problem-470-super-ramvok.spanish.md | 68 ++++ ...1-triangle-inscribed-in-ellipse.spanish.md | 65 ++++ ...lem-472-comfortable-distance-ii.spanish.md | 73 +++++ ...roblem-473-phigital-number-base.spanish.md | 73 +++++ ...lem-474-last-digits-of-divisors.spanish.md | 63 ++++ .../problem-475-music-festival.spanish.md | 63 ++++ .../problem-476-circle-packing-ii.spanish.md | 59 ++++ ...roblem-477-number-sequence-game.spanish.md | 70 +++++ .../problem-478-mixtures.spanish.md | 76 +++++ .../problem-479-roots-on-the-rise.spanish.md | 64 ++++ .../problem-48-self-powers.spanish.md | 81 +++++ .../problem-480-the-last-question.spanish.md | 95 ++++++ .../problem-49-prime-permutations.spanish.md | 105 +++++++ .../problem-5-smallest-multiple.spanish.md | 80 +++++ ...roblem-50-consecutive-prime-sum.spanish.md | 101 ++++++ ...lem-51-prime-digit-replacements.spanish.md | 58 ++++ .../problem-52-permuted-multiples.spanish.md | 88 ++++++ ...blem-53-combinatoric-selections.spanish.md | 91 ++++++ .../problem-54-poker-hands.spanish.md | 79 +++++ .../problem-55-lychrel-numbers.spanish.md | 102 ++++++ .../problem-56-powerful-digit-sum.spanish.md | 57 ++++ ...blem-57-square-root-convergents.spanish.md | 64 ++++ .../problem-58-spiral-primes.spanish.md | 64 ++++ .../problem-59-xor-decryption.spanish.md | 60 ++++ ...problem-6-sum-square-difference.spanish.md | 79 +++++ .../problem-60-prime-pair-sets.spanish.md | 57 ++++ ...em-61-cyclical-figurate-numbers.spanish.md | 91 ++++++ .../problem-62-cubic-permutations.spanish.md | 57 ++++ ...roblem-63-powerful-digit-counts.spanish.md | 57 ++++ ...blem-64-odd-period-square-roots.spanish.md | 179 +++++++++++ .../problem-65-convergents-of-e.spanish.md | 145 +++++++++ ...problem-66-diophantine-equation.spanish.md | 66 ++++ .../problem-67-maximum-path-sum-ii.spanish.md | 62 ++++ .../problem-68-magic-5-gon-ring.spanish.md | 74 +++++ .../problem-69-totient-maximum.spanish.md | 100 ++++++ .../problem-7-10001st-prime.spanish.md | 82 +++++ .../problem-70-totient-permutation.spanish.md | 58 ++++ .../problem-72-counting-fractions.spanish.md | 59 ++++ ...3-counting-fractions-in-a-range.spanish.md | 59 ++++ ...oblem-74-digit-factorial-chains.spanish.md | 67 ++++ ...ingular-integer-right-triangles.spanish.md | 60 ++++ .../problem-76-counting-summations.spanish.md | 63 ++++ .../problem-77-prime-summations.spanish.md | 62 ++++ .../problem-78-coin-partitions.spanish.md | 66 ++++ .../problem-79-passcode-derivation.spanish.md | 58 ++++ ...m-8-largest-product-in-a-series.spanish.md | 101 ++++++ ...0-square-root-digital-expansion.spanish.md | 58 ++++ .../problem-81-path-sum-two-ways.spanish.md | 68 ++++ .../problem-82-path-sum-three-ways.spanish.md | 69 ++++ .../problem-83-path-sum-four-ways.spanish.md | 70 +++++ .../problem-84-monopoly-odds.spanish.md | 130 ++++++++ .../problem-85-counting-rectangles.spanish.md | 59 ++++ .../problem-86-cuboid-route.spanish.md | 61 ++++ .../problem-87-prime-power-triples.spanish.md | 61 ++++ .../problem-88-product-sum-numbers.spanish.md | 62 ++++ .../problem-89-roman-numerals.spanish.md | 67 ++++ ...m-9-special-pythagorean-triplet.spanish.md | 77 +++++ .../problem-90-cube-digit-pairs.spanish.md | 76 +++++ ...angles-with-integer-coordinates.spanish.md | 66 ++++ .../problem-92-square-digit-chains.spanish.md | 61 ++++ ...oblem-93-arithmetic-expressions.spanish.md | 64 ++++ ...94-almost-equilateral-triangles.spanish.md | 58 ++++ .../problem-95-amicable-chains.spanish.md | 61 ++++ .../problem-96-su-doku.spanish.md | 86 +++++ ...lem-97-large-non-mersenne-prime.spanish.md | 58 ++++ .../problem-98-anagramic-squares.spanish.md | 59 ++++ .../problem-99-largest-exponential.spanish.md | 59 ++++ curriculum/challenges/translatemd.js | 6 +- 470 files changed, 33610 insertions(+), 3 deletions(-) create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-10-summation-of-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-100-arranged-probability.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-101-optimum-polynomial.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-102-triangle-containment.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-104-pandigital-fibonacci-ends.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-105-special-subset-sums-testing.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-106-special-subset-sums-meta-testing.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-107-minimal-network.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-108-diophantine-reciprocals-i.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-109-darts.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-11-largest-product-in-a-grid.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-111-primes-with-runs.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-112-bouncy-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-12-highly-divisible-triangular-number.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-120-square-remainders.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-123-prime-square-remainders.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-124-ordered-radicals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-125-palindromic-sums.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-126-cuboid-layers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-127-abc-hits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-129-repunit-divisibility.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-13-large-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-132-large-repunit-factors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-134-prime-pair-connection.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-135-same-differences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-136-singleton-difference.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-139-pythagorean-tiles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-14-longest-collatz-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-140-modified-fibonacci-golden-nuggets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-141-investigating-progressive-numbers-n-which-are-also-square.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-142-perfect-square-collection.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-143-investigating-the-torricelli-point-of-a-triangle.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-144-investigating-multiple-reflections-of-a-laser-beam.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-145-how-many-reversible-numbers-are-there-below-one-billion.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-146-investigating-a-prime-pattern.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-147-rectangles-in-cross-hatched-grids.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-148-exploring-pascals-triangle.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-149-searching-for-a-maximum-sum-subsequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-15-lattice-paths.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-150-searching-a-triangular-array-for-a-sub-triangle-having-minimum-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-152-writing-one-half-as-a-sum-of-inverse-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-153-investigating-gaussian-integers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-154-exploring-pascals-pyramid.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-155-counting-capacitor-circuits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-156-counting-digits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-158-exploring-strings-for-which-only-one-character-comes-lexicographically-after-its-neighbour-to-the-left.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-159-digital-root-sums-of-factorisations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-16-power-digit-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-160-factorial-trailing-digits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-161-triominoes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-162-hexadecimal-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-163-cross-hatched-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-164-numbers-for-which-no-three-consecutive-digits-have-a-sum-greater-than-a-given-value.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-165-intersections.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-166-criss-cross.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-167-investigating-ulam-sequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-168-number-rotations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-17-number-letter-counts.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-170-find-the-largest-0-to-9-pandigital-that-can-be-formed-by-concatenating-products.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-171-finding-numbers-for-which-the-sum-of-the-squares-of-the-digits-is-a-square.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-172-investigating-numbers-with-few-repeated-digits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-173-using-up-to-one-million-tiles-how-many-different-hollow-square-laminae-can-be-formed.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-174-counting-the-number-of-hollow-square-laminae-that-can-form-one-two-three-...-distinct-arrangements.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-175-fractions-involving-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-176-right-angled-triangles-that-share-a-cathetus.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-177-integer-angled-quadrilaterals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-178-step-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-179-consecutive-positive-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-18-maximum-path-sum-i.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-183-maximum-product-of-parts.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-184-triangles-containing-the-origin.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-185-number-mind.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-186-connectedness-of-a-network.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-187-semiprimes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-188-the-hyperexponentiation-of-a-number.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-189-tri-colouring-a-triangular-grid.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-19-counting-sundays.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-191-prize-strings.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-192-best-approximations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-193-squarefree-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-194-coloured-configurations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-195-inscribed-circles-of-triangles-with-one-angle-of-60-degrees.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-196-prime-triplets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-198-ambiguous-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-199-iterative-circle-packing.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-20-factorial-digit-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-200-find-the-200th-prime-proof-sqube-containing-the-contiguous-sub-string-200.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-201-subsets-with-a-unique-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-202-laserbeam.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-203-squarefree-binomial-coefficients.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-204-generalised-hamming-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-205-dice-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-206-concealed-square.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-207-integer-partition-equations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-208-robot-walks.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-209-circular-logic.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-21-amicable-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-210-obtuse-angled-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-211-divisor-square-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-212-combined-volume-of-cuboids.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-213-flea-circus.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-214-totient-chains.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-215-crack-free-walls.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-216-investigating-the-primality-of-numbers-of-the-form-2n2-1.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-217-balanced-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-218-perfect-right-angled-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-219-skew-cost-coding.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-22-names-scores.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-220-heighway-dragon.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-221-alexandrian-integers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-222-sphere-packing.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-223-almost-right-angled-triangles-i.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-224-almost-right-angled-triangles-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-225-tribonacci-non-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-227-the-chase.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-228-minkowski-sums.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-23-non-abundant-sums.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-230-fibonacci-words.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-232-the-race.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-236-luxury-hampers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-238-infinite-string-tour.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-240-top-dice.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-241-perfection-quotients.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-242-odd-triplets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-243-resilience.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-244-sliders.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-245-coresilience.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-246-tangents-to-an-ellipse.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-247-squares-under-a-hyperbola.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-249-prime-subset-sums.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-251-cardano-triplets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-252-convex-holes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-253-tidying-up.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-255-rounded-square-roots.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-257-angular-bisectors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-258-a-lagged-fibonacci-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-259-reachable-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-260-stone-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-262-mountain-range.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-263-an-engineers-dream-come-true.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-264-triangle-centres.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-265-binary-circles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-266-pseudo-square-root.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-267-billionaire.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-27-quadratic-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-270-cutting-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-273-sum-of-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-274-divisibility-multipliers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-275-balanced-sculptures.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-276-primitive-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-277-a-modified-collatz-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-278-linear-combinations-of-semiprimes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-279-triangles-with-integral-sides-and-an-integral-angle.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-280-ant-and-seeds.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-281-pizza-toppings.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-282-the-ackermann-function.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-283-integer-sided-triangles-for-which-the-area--perimeter-ratio-is-integral.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-284-steady-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-285-pythagorean-odds.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-286-scoring-probabilities.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-289-eulerian-cycles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-29-distinct-powers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-290-digital-signature.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-291-panaitopol-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-295-lenticular-holes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-298-selective-amnesia.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-299-three-similar-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-3-largest-prime-factor.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-30-digit-n-powers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-300-protein-folding.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-301-nim.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-304-primonacci.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-305-reflexive-position.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-306-paper-strip-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-307-chip-defects.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-309-integer-ladders.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-31-coin-sums.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-310-nim-square.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-313-sliding-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-315-digital-root-clocks.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-316-numbers-in-decimal-expansions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-317-firecracker.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-319-bounded-sequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-32-pandigital-products.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-321-swapping-counters.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-324-building-a-tower.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-325-stone-game-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-326-modulo-summations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-327-rooms-of-doom.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-328-lowest-cost-search.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-329-prime-frog.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-330-eulers-number.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-331-cross-flips.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-332-spherical-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-333-special-partitions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-334-spilling-the-beans.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-335-gathering-the-beans.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-336-maximix-arrangements.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-337-totient-stairstep-sequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-338-cutting-rectangular-grid-paper.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-339-peredur-fab-efrawg.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-34-digit-factorials.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-340-crazy-function.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-342-the-totient-of-a-square-is-a-cube.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-343-fractional-sequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-344-silver-dollar-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-345-matrix-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-346-strong-repunits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-347-largest-integer-divisible-by-two-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-349-langtons-ant.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-35-circular-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-350-constraining-the-least-greatest-and-the-greatest-least.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-351-hexagonal-orchards.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-352-blood-tests.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-353-risky-moon.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-354-distances-in-a-bees-honeycomb.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-355-maximal-coprime-subset.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-357-prime-generating-integers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-358-cyclic-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-359-hilberts-new-hotel.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-36-double-base-palindromes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-360-scary-sphere.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-361-subsequence-of-thue-morse-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-362-squarefree-factors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-363-bzier-curves.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-364-comfortable-distance.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-366-stone-game-iii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-367-bozo-sort.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-368-a-kempner-like-series.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-369-badugi.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-37-truncatable-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-370-geometric-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-371-licence-plates.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-372-pencils-of-rays.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-373-circumscribed-circles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-374-maximum-integer-partition-product.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-375-minimum-of-subsequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-377-sum-of-digits-experience-13.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-378-triangle-triples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-379-least-common-multiple-count.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-38-pandigital-multiples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-380-amazing-mazes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-382-generating-polygons.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-383-divisibility-comparison-between-factorials.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-384-rudin-shapiro-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-385-ellipses-inside-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-386-maximum-length-of-an-antichain.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-387-harshad-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-388-distinct-lines.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-389-platonic-dice.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-39-integer-right-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-390-triangles-with-non-rational-sides-and-integral-area.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-391-hopping-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-392-enmeshed-unit-circle.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-393-migrating-ants.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-394-eating-pie.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-395-pythagorean-tree.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-396-weak-goodstein-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-397-triangle-on-parabola.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-398-cutting-rope.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-399-squarefree-fibonacci-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-4-largest-palindrome-product.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-400-fibonacci-tree-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-401-sum-of-squares-of-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-402-integer-valued-polynomials.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-404-crisscross-ellipses.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-405-a-rectangular-tiling.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-407-idempotents.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-408-admissible-paths-through-a-grid.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-409-nim-extreme.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-41-pandigital-prime.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-410-circle-and-tangent-line.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-411-uphill-paths.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-412-gnomon-numbering.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-413-one-child-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-414-kaprekar-constant.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-415-titanic-sets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-416-a-frogs-trip.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-417-reciprocal-cycles-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-418-factorisation-triples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-419-look-and-say-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-42-coded-triangle-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-420-2x2-positive-integer-matrix.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-421-prime-factors-of-n151.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-422-sequence-of-points-on-a-hyperbola.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-423-consecutive-die-throws.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-424-kakuro.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-425-prime-connection.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-426-box-ball-system.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-427-n-sequences.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-428-necklace-of-circles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-429-sum-of-squares-of-unitary-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-43-sub-string-divisibility.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-430-range-flips.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-431-square-space-silo.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-432-totient-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-433-steps-in-euclids-algorithm.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-434-rigid-graphs.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-435-polynomials-of-fibonacci-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-436-unfair-wager.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-437-fibonacci-primitive-roots.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-438-integer-part-of-polynomial-equations-solutions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-439-sum-of-sum-of-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-44-pentagon-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-440-gcd-and-tiling.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-441-the-inverse-summation-of-coprime-couples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-442-eleven-free-integers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-443-gcd-sequence.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-444-the-roundtable-lottery.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-445-retractions-a.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-446-retractions-b.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-447-retractions-c.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-448-average-least-common-multiple.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-449-chocolate-covered-candy.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-45-triangular-pentagonal-and-hexagonal.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-450-hypocycloid-and-lattice-points.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-451-modular-inverses.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-452-long-products.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-453-lattice-quadrilaterals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-454-diophantine-reciprocals-iii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-455-powers-with-trailing-digits.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-456-triangles-containing-the-origin-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-457-a-polynomial-modulo-the-square-of-a-prime.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-458-permutations-of-project.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-459-flipping-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-46-goldbachs-other-conjecture.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-460-an-ant-on-the-move.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-461-almost-pi.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-462-permutation-of-3-smooth-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-463-a-weird-recurrence-relation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-464-mbius-function-and-intervals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-465-polar-polygons.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-466-distinct-terms-in-a-multiplication-table.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-467-superinteger.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-468-smooth-divisors-of-binomial-coefficients.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-469-empty-chairs.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-47-distinct-primes-factors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-470-super-ramvok.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-471-triangle-inscribed-in-ellipse.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-473-phigital-number-base.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-475-music-festival.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-476-circle-packing-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-477-number-sequence-game.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-478-mixtures.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-48-self-powers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-480-the-last-question.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-49-prime-permutations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-5-smallest-multiple.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-50-consecutive-prime-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-51-prime-digit-replacements.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-52-permuted-multiples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-53-combinatoric-selections.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-54-poker-hands.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-55-lychrel-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-56-powerful-digit-sum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-57-square-root-convergents.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-58-spiral-primes.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-59-xor-decryption.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-6-sum-square-difference.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-60-prime-pair-sets.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-61-cyclical-figurate-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-62-cubic-permutations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-63-powerful-digit-counts.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-64-odd-period-square-roots.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-65-convergents-of-e.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-66-diophantine-equation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-67-maximum-path-sum-ii.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-68-magic-5-gon-ring.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-69-totient-maximum.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-7-10001st-prime.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-70-totient-permutation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-72-counting-fractions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-73-counting-fractions-in-a-range.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-74-digit-factorial-chains.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-75-singular-integer-right-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-76-counting-summations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-77-prime-summations.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-78-coin-partitions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-79-passcode-derivation.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-8-largest-product-in-a-series.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-80-square-root-digital-expansion.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-81-path-sum-two-ways.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-82-path-sum-three-ways.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-83-path-sum-four-ways.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-84-monopoly-odds.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-85-counting-rectangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-86-cuboid-route.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-87-prime-power-triples.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-88-product-sum-numbers.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-89-roman-numerals.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-9-special-pythagorean-triplet.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-90-cube-digit-pairs.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-92-square-digit-chains.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-93-arithmetic-expressions.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-94-almost-equilateral-triangles.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-95-amicable-chains.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-96-su-doku.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-97-large-non-mersenne-prime.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-98-anagramic-squares.spanish.md create mode 100644 curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-99-largest-exponential.spanish.md diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.spanish.md new file mode 100644 index 0000000000..faeed92b31 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f36e1000cf542c50fe80 +challengeType: 5 +title: 'Problem 1: Multiples of 3 and 5' +--- + +## Description +
+Si enumeramos todos los números naturales por debajo de 10 que son múltiplos de 3 o 5, obtenemos 3, 5, 6 y 9. La suma de estos múltiplos es 23. +Halla la suma de todos los múltiplos de 3 o 5 debajo de number valor del parámetro proporcionado. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: multiplesOf3and5(1000) debe devolver 233168. + testString: 'assert.strictEqual(multiplesOf3and5(1000), 233168, "multiplesOf3and5(1000) should return 233168.");' + - text: multiplesOf3and5(49) debe devolver 543. + testString: 'assert.strictEqual(multiplesOf3and5(49), 543, "multiplesOf3and5(49) should return 543.");' + - text: multiplesOf3and5(19564) debe devolver 89301183. + testString: 'assert.strictEqual(multiplesOf3and5(19564), 89301183, "multiplesOf3and5(19564) should return 89301183.");' + - text: Su función no está devolviendo el resultado correcto utilizando nuestros valores de prueba. + testString: 'assert.strictEqual(multiplesOf3and5(8456), 16687353, "Your function is not returning the correct result using our tests values.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function multiplesOf3and5(number) { + // Good luck! + return true; +} + +multiplesOf3and5(1000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const multiplesOf3and5 = (number) => { + var total = 0; + + for(var i = 0; i < number; i++) { + if(i % 3 == 0 || i % 5 == 0) { + total += i; + } + } + return total; +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-10-summation-of-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-10-summation-of-primes.spanish.md new file mode 100644 index 0000000000..df060187d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-10-summation-of-primes.spanish.md @@ -0,0 +1,99 @@ +--- +id: 5 +localeTitle: 5900f3761000cf542c50fe89 +challengeType: 5 +title: 'Problem 10: Summation of primes' +--- + +## Description +
+La suma de los números primos debajo de 10 es 2 + 3 + 5 + 7 = 17. +Encuentra la suma de todos los números primos debajo de n. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: primeSummation(17) debe devolver 41. + testString: 'assert.strictEqual(primeSummation(17), 41, "primeSummation(17) should return 41.");' + - text: primeSummation(2001) debe devolver 277050. + testString: 'assert.strictEqual(primeSummation(2001), 277050, "primeSummation(2001) should return 277050.");' + - text: primeSummation(140759) debe devolver 873608362. + testString: 'assert.strictEqual(primeSummation(140759), 873608362, "primeSummation(140759) should return 873608362.");' + - text: primeSummation(2000000) debe devolver 142913828922. + testString: 'assert.strictEqual(primeSummation(2000000), 142913828922, "primeSummation(2000000) should return 142913828922.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function primeSummation(n) { + // Good luck! + return true; +} + +primeSummation(2000000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +//noprotect +function primeSummation(n) { + // Initialise an array containing only prime numbers + let primes = [2]; + let result = 2; + + function isPrime(y, primes) { + // Find sqrt(y) + const sqrt = Math.floor(Math.sqrt(y)); + + // Divide y by each applicable prime, return false if any of them divide y + for (let i = 0; i < primes.length && primes[i] <= sqrt; i++) { + if (y % primes[i] === 0) { + return false; + } + } + + // At this point x must be prime + return true; + } + + // For every odd integer, add it to the array if it is prime + for (let x = 3; x < n; x += 2) { + if (isPrime(x, primes)) { + if (x > n) { + return result; + } else { + result += x; + primes.push(x); + } + } + } + + return result; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-100-arranged-probability.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-100-arranged-probability.spanish.md new file mode 100644 index 0000000000..b283a9b724 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-100-arranged-probability.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3d01000cf542c50fee3 +challengeType: 5 +title: 'Problem 100: Arranged probability' +--- + +## Description +
+Si una caja contiene veintiún discos de colores, compuestos por quince discos azules y seis discos rojos, y se tomaron dos discos al azar, se puede ver que la probabilidad de tomar dos discos azules, P (BB) = (15 / 21) × (14/20) = 1/2. +El siguiente acuerdo de este tipo, para el que hay exactamente un 50% de probabilidades de tomar dos discos azules al azar, es una caja que contiene ochenta y cinco discos azules y treinta y cinco discos rojos. +Al encontrar el primer arreglo que contenga más de 1012 = 1,000,000,000,000 de discos en total, determine la cantidad de discos azules que contendría la caja. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler100() debe devolver 756872327473. + testString: 'assert.strictEqual(euler100(), 756872327473, "euler100() should return 756872327473.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler100() { + // Good luck! + return true; +} + +euler100(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-101-optimum-polynomial.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-101-optimum-polynomial.spanish.md new file mode 100644 index 0000000000..fb415dd640 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-101-optimum-polynomial.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f3d21000cf542c50fee4 +challengeType: 5 +title: 'Problem 101: Optimum polynomial' +--- + +## Description +
+Si se nos presentan los primeros k términos de una secuencia, es imposible decir con certeza el valor del siguiente término, ya que hay infinitas funciones polinomiales que pueden modelar la secuencia. +Como ejemplo, consideremos la secuencia de números de cubo. Esto se define por la función de generación, un = n3: 1, 8, 27, 64, 125, 216, ... +Supongamos que solo se nos dieron los dos primeros términos de esta secuencia. Trabajando sobre el principio de que "simple es lo mejor", deberíamos asumir una relación lineal y predecir que el próximo término sea 15 (diferencia común 7). Incluso si se nos presentaran los primeros tres términos, por el mismo principio de simplicidad, se debería asumir una relación cuadrática. +Definiremos OP (k, n) como el noveno término de la función de generación polinomial óptima para los primeros k términos de una secuencia. Debe quedar claro que OP (k, n) generará con precisión los términos de la secuencia para n ≤ k, y potencialmente el primer término incorrecto (FIT) será OP (k, k + 1); en cuyo caso lo llamaremos un mal OP (BOP). +Como base, si solo nos dieran el primer término de secuencia, sería más sensato asumir la constancia; es decir, para n ≥ 2, OP (1, n) = u1. +Por lo tanto se obtiene la siguiente OPs para la secuencia cúbico: + +OP (1, n) = 1 +1, 1, 1, 1, ... +OP (2, n) = 7n-6 +1, 8, 15, ... +OP (3, n) = 6n2−11n + 6 +1, 8, 27, 58, ... +OP (4, n) = n3 +1, 8, 27, 64, 125, ... + +Es evidente que no existen BOP para k ≥ 4. +Al considerar la suma de FIT generados por los BOP (indicados en rojo arriba), obtenemos 1 + 15 + 58 = 74. +Considere la siguiente generación polinómica de décimo grado función: +un = 1 - n + n2 - n3 + n4 - n5 + n6 - n7 + n8 - n9 + n10 +Encuentre la suma de FIT para los BOP. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler101() debe devolver 37076114526. + testString: 'assert.strictEqual(euler101(), 37076114526, "euler101() should return 37076114526.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler101() { + // Good luck! + return true; +} + +euler101(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-102-triangle-containment.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-102-triangle-containment.spanish.md new file mode 100644 index 0000000000..5fe58e364a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-102-triangle-containment.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3d21000cf542c50fee5 +challengeType: 5 +title: 'Problem 102: Triangle containment' +--- + +## Description +
+Tres puntos distintos se trazan al azar en un plano cartesiano, para el cual -1000 ≤ x, y ≤ 1000, de manera que se forma un triángulo. +Considere los siguientes dos triángulos: +A (-340,495), B (-153, -910), C (835, -947) +X (-175,41), Y (-421, -714), Z ( 574, -645) +Puede verificarse que el triángulo ABC contiene el origen, mientras que el triángulo XYZ no. +Utilizando triangles.txt (clic con el botón derecho y 'Guardar enlace / Objetivo como ...'), un archivo de texto de 27K que contiene las coordenadas de mil triángulos "aleatorios", encuentre el número de triángulos para los cuales el interior contiene el origen . +NOTA: Los dos primeros ejemplos en el archivo representan los triángulos en el ejemplo dado arriba. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler102() debe devolver 228. + testString: 'assert.strictEqual(euler102(), 228, "euler102() should return 228.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler102() { + // Good luck! + return true; +} + +euler102(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.spanish.md new file mode 100644 index 0000000000..f9d337de64 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3d61000cf542c50fee7 +challengeType: 5 +title: 'Problem 103: Special subset sums: optimum' +--- + +## Description +
+Sea S (A) la suma de elementos en el conjunto A de tamaño n. Lo llamaremos conjunto de suma especial si para dos subconjuntos disjuntos no vacíos, B y C, las siguientes propiedades son verdaderas: +S (B) ≠ S (C); es decir, las sumas de subconjuntos no pueden ser iguales. +Si B contiene más elementos que C, entonces S (B)> S (C). +Si S (A) se minimiza para un n dado, lo llamaremos un conjunto de suma especial óptimo. Los primeros cinco conjuntos de suma especial óptimos se dan a continuación. +n = 1: {1} n = 2: {1, 2} n = 3: {2, 3, 4} n = 4: {3, 5, 6, 7} n = 5: {6, 9, 11, 12, 13} +Parece que para un conjunto óptimo dado, A = {a1, a2, ..., an}, el siguiente conjunto óptimo tiene la forma B = {b, a1 + b, a2 + b , ..., an + b}, donde b es el elemento "medio" en la fila anterior. +Al aplicar esta "regla" esperaríamos que el conjunto óptimo para n = 6 sea A = {11, 17, 20, 22, 23, 24}, con S (A) = 117. Sin embargo, esto no es el óptimo conjunto, ya que simplemente hemos aplicado un algoritmo para proporcionar un conjunto casi óptimo. El conjunto óptimo para n = 6 es A = {11, 18, 19, 20, 22, 25}, con S (A) = 115 y la cadena del conjunto correspondiente: 111819202225. +Dado que A es una suma especial óptima establecida para n = 7, encuentra su cadena de conjunto. +NOTA: Este problema está relacionado con el Problema 105 y el Problema 106. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler103() debe devolver 20313839404245. + testString: 'assert.strictEqual(euler103(), 20313839404245, "euler103() should return 20313839404245.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler103() { + // Good luck! + return true; +} + +euler103(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-104-pandigital-fibonacci-ends.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-104-pandigital-fibonacci-ends.spanish.md new file mode 100644 index 0000000000..161700c552 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-104-pandigital-fibonacci-ends.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3d51000cf542c50fee6 +challengeType: 5 +title: 'Problem 104: Pandigital Fibonacci ends' +--- + +## Description +
+La secuencia de Fibonacci se define por la relación de recurrencia: +Fn = Fn − 1 + Fn − 2, donde F1 = 1 y F2 = 1. +Resulta que F541, que contiene 113 dígitos, es el primer número de Fibonacci para el cual los últimos nueve dígitos son 1-9 pandigital (contienen todos los dígitos del 1 al 9, pero no necesariamente en orden). Y F2749, que contiene 575 dígitos, es el primer número de Fibonacci para el cual los primeros nueve dígitos son 1-9 pandigital. +Dado que Fk es el primer número de Fibonacci para el cual los primeros nueve dígitos Y los últimos nueve dígitos son 1-9 pandigital, encuentre k. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler104() debe devolver 329468. + testString: 'assert.strictEqual(euler104(), 329468, "euler104() should return 329468.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler104() { + // Good luck! + return true; +} + +euler104(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-105-special-subset-sums-testing.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-105-special-subset-sums-testing.spanish.md new file mode 100644 index 0000000000..5566fb09de --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-105-special-subset-sums-testing.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3d61000cf542c50fee8 +challengeType: 5 +title: 'Problem 105: Special subset sums: testing' +--- + +## Description +
+Sea S (A) la suma de elementos en el conjunto A de tamaño n. Lo llamaremos conjunto de suma especial si para dos subconjuntos disjuntos no vacíos, B y C, las siguientes propiedades son verdaderas: +S (B) ≠ S (C); es decir, las sumas de subconjuntos no pueden ser iguales. +Si B contiene más elementos que C, entonces S (B)> S (C). +Por ejemplo, {81, 88, 75, 42, 87, 84, 86, 65} no es un conjunto de suma especial porque 65 + 87 + 88 = 75 + 81 + 84, mientras que {157, 150, 164, 119, 79, 159, 161, 139, 158} satisface ambas reglas para todas las combinaciones posibles de pares de subconjuntos y S (A) = 1286. +Utilizando sets.txt (clic derecho y "Guardar enlace / Destinar como ..."), un 4K archivo de texto con cien conjuntos que contienen de siete a doce elementos (los dos ejemplos dados más arriba son los dos primeros conjuntos del archivo), identifique todos los conjuntos de suma especial, A1, A2, ..., Ak, y encuentre el valor de S (A1) + S (A2) + ... + S (Ak). +NOTA: Este problema está relacionado con el Problema 103 y el Problema 106. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler105() debe devolver 73702. + testString: 'assert.strictEqual(euler105(), 73702, "euler105() should return 73702.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler105() { + // Good luck! + return true; +} + +euler105(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-106-special-subset-sums-meta-testing.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-106-special-subset-sums-meta-testing.spanish.md new file mode 100644 index 0000000000..bebb67629b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-106-special-subset-sums-meta-testing.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3d71000cf542c50fee9 +challengeType: 5 +title: 'Problem 106: Special subset sums: meta-testing' +--- + +## Description +
+Sea S (A) la suma de elementos en el conjunto A de tamaño n. Lo llamaremos conjunto de suma especial si para dos subconjuntos disjuntos no vacíos, B y C, las siguientes propiedades son verdaderas: +S (B) ≠ S (C); es decir, las sumas de subconjuntos no pueden ser iguales. +Si B contiene más elementos que C, entonces S (B)> S (C). +Para este problema, supondremos que un conjunto dado contiene n elementos estrictamente crecientes y ya cumple la segunda regla. +Sorprendentemente, de los 25 pares de subconjuntos posibles que se pueden obtener de un conjunto para el cual n = 4, solo uno de estos pares debe probarse para determinar la igualdad (primera regla). De manera similar, cuando n = 7, solo se deben probar 70 de los 966 pares de subconjuntos. +Para n = 12, ¿cuántos de los 261625 pares de subconjuntos que se pueden obtener deben probarse para determinar la igualdad? +NOTA: Este problema está relacionado con el Problema 103 y el Problema 105. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler106() debe devolver 21384. + testString: 'assert.strictEqual(euler106(), 21384, "euler106() should return 21384.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler106() { + // Good luck! + return true; +} + +euler106(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-107-minimal-network.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-107-minimal-network.spanish.md new file mode 100644 index 0000000000..3e8f8bb4d1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-107-minimal-network.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f3d91000cf542c50feea +challengeType: 5 +title: 'Problem 107: Minimal network' +--- + +## Description +
+La siguiente red no dirigida consta de siete vértices y doce aristas con un peso total de 243. + + +La misma red puede representarse mediante la siguiente matriz. +ABCDEFG +A-161221 --- +B16--1720-- +C12--28-31- +D211728-181923 +E-20-18--11 +F - 3119--27 +G --- 231127- +Sin embargo, es posible optimizar la red eliminando algunos bordes y aun así asegurar que todos los puntos de la red permanezcan conectados. La red que logra el máximo ahorro se muestra a continuación. Tiene un peso de 93, lo que representa un ahorro de 243 - 93 = 150 de la red original. + + +Utilizando network.txt (haga clic con el botón derecho y 'Guardar enlace / destino como ...'), un archivo de texto de 6K que contiene una red con cuarenta vértices, y dado en forma matricial, encuentre el ahorro máximo que se puede lograr eliminando Bordes redundantes al tiempo que se asegura de que la red permanezca conectada. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler107() debe devolver 259679. + testString: 'assert.strictEqual(euler107(), 259679, "euler107() should return 259679.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler107() { + // Good luck! + return true; +} + +euler107(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-108-diophantine-reciprocals-i.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-108-diophantine-reciprocals-i.spanish.md new file mode 100644 index 0000000000..0553e8569d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-108-diophantine-reciprocals-i.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3d91000cf542c50feeb +challengeType: 5 +title: 'Problem 108: Diophantine Reciprocals I' +--- + +## Description +
+En la siguiente ecuación x, y yn son enteros positivos. +1 / x + 1 / y = 1 / n +Para n = 4 hay exactamente tres soluciones distintas: +1/5 + 1/20 = 1/4
1/6 + 1/12 = 1/4
1/8 + 1/8 = 1/4 +¿Cuál es el valor mínimo de n para el cual el número de soluciones distintas excede mil? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: diophantineOne() debe devolver 180180. + testString: 'assert.strictEqual(diophantineOne(), 180180, "diophantineOne() should return 180180.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function diophantineOne() { + // Good luck! + return true; +} + +diophantineOne(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-109-darts.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-109-darts.spanish.md new file mode 100644 index 0000000000..7d6b28ced9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-109-darts.spanish.md @@ -0,0 +1,102 @@ +--- +id: 5 +localeTitle: 5900f3db1000cf542c50feec +challengeType: 5 +title: 'Problem 109: Darts' +--- + +## Description +
+En el juego de dardos, un jugador lanza tres dardos en un tablero objetivo que está dividido en veinte secciones del mismo tamaño numeradas del uno al veinte. + + +La puntuación de un dardo está determinada por el número de la región en la que cae el dardo. Un dardo que cae fuera del anillo exterior rojo / verde tiene una puntuación de cero. Las regiones negras y cremas dentro de este anillo representan puntuaciones individuales. Sin embargo, el anillo exterior rojo / verde y el anillo medio obtienen puntuaciones dobles y triples respectivamente. +En el centro del tablero hay dos círculos concéntricos llamados la región del toro u ojo de buey. El toro exterior vale 25 puntos y el toro interior es doble, vale 50 puntos. +Hay muchas variaciones en las reglas, pero en el juego más popular, los jugadores comenzarán con una puntuación de 301 o 501 y el primer jugador que reduzca su total de carreras a cero será el ganador. Sin embargo, es normal jugar un sistema de "dobles", lo que significa que el jugador debe obtener un doble (incluida la doble diana en el centro del tablero) en su dardo final para ganar; cualquier otro dardo que reduzca su total acumulado a uno o más bajo significa que el puntaje para ese conjunto de tres dardos es "busto". +Cuando un jugador puede terminar con su puntaje actual, se le llama "checkout" y el checkout más alto es 170: T20 T20 D25 (dos agudos, 20 y doble toro). +Hay exactamente once formas distintas de pago y envío en una puntuación de 6: + +D3 + + +D1 +D2 + +S2 +D2 + +D2 +D1 + +S4 +D1 + +S1 +S1 +D2 +S1 +T1 +D1 +S1 +S3 +D1 +D1 +D1 +D1 +D1 +S2 +D1 +S2 +S2 +D1 + +Tenga en cuenta que D1 D2 se considera diferente a D2 D1 cuando terminan en diferentes dobles. Sin embargo, la combinación S1 T1 D1 se considera la misma que T1 S1 D1. +Además, no incluiremos fallos al considerar combinaciones; por ejemplo, D3 es lo mismo que 0 D3 y 0 0 D3. +Increíblemente, hay 42336 maneras distintas de verificar en total. +¿De cuántas maneras distintas puede un jugador pagar con un puntaje menor a 100? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler109() debe devolver 38182. + testString: 'assert.strictEqual(euler109(), 38182, "euler109() should return 38182.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler109() { + // Good luck! + return true; +} + +euler109(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-11-largest-product-in-a-grid.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-11-largest-product-in-a-grid.spanish.md new file mode 100644 index 0000000000..0adeb1ed47 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-11-largest-product-in-a-grid.spanish.md @@ -0,0 +1,189 @@ +--- +id: 5 +localeTitle: 5900f3781000cf542c50fe8a +challengeType: 5 +title: 'Problem 11: Largest product in a grid' +--- + +## Description +
+En la siguiente cuadrícula de 20 × 20, cuatro números a lo largo de una línea diagonal se han marcado en rojo. + +
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
+
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
+
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
+
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
+
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
+
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
+
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
+
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
+
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
+
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
+
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
+
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
+
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
+
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
+
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
+
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
+
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
+
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
+
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
+
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
+ +El producto de estos números es 26 × 63 × 78 × 14 = 1788696. +¿Cuál es el mayor producto de cuatro números adyacentes en la misma dirección (arriba, abajo, izquierda, derecha o diagonal) en una cuadrícula de arr dada? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: largestGridProduct(grid) debe devolver 70600674. + testString: 'assert.strictEqual(largestGridProduct(grid), 70600674, "largestGridProduct(grid) should return 70600674.");' + - text: largestGridProduct(testGrid) debe devolver 14169081. + testString: 'assert.strictEqual(largestGridProduct(testGrid), 14169081, "largestGridProduct(testGrid) should return 14169081.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function largestGridProduct(arr) { + // Good luck! + return arr; +} + +// Only change code above this line +const grid = [ + [8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8], + [49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 4, 56, 62, 0], + [81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 3, 49, 13, 36, 65], + [52, 70, 95, 23, 4, 60, 11, 42, 69, 24, 68, 56, 1, 32, 56, 71, 37, 2, 36, 91], + [22, 31, 16, 71, 51, 67, 63, 89, 41, 92, 36, 54, 22, 40, 40, 28, 66, 33, 13, 80], + [24, 47, 32, 60, 99, 3, 45, 2, 44, 75, 33, 53, 78, 36, 84, 20, 35, 17, 12, 50], + [32, 98, 81, 28, 64, 23, 67, 10, 26, 38, 40, 67, 59, 54, 70, 66, 18, 38, 64, 70], + [67, 26, 20, 68, 2, 62, 12, 20, 95, 63, 94, 39, 63, 8, 40, 91, 66, 49, 94, 21], + [24, 55, 58, 5, 66, 73, 99, 26, 97, 17, 78, 78, 96, 83, 14, 88, 34, 89, 63, 72], + [21, 36, 23, 9, 75, 0, 76, 44, 20, 45, 35, 14, 0, 61, 33, 97, 34, 31, 33, 95], + [78, 17, 53, 28, 22, 75, 31, 67, 15, 94, 3, 80, 4, 62, 16, 14, 9, 53, 56, 92], + [16, 39, 5, 42, 96, 35, 31, 47, 55, 58, 88, 24, 0, 17, 54, 24, 36, 29, 85, 57], + [86, 56, 0, 48, 35, 71, 89, 7, 5, 44, 44, 37, 44, 60, 21, 58, 51, 54, 17, 58], + [19, 80, 81, 68, 5, 94, 47, 69, 28, 73, 92, 13, 86, 52, 17, 77, 4, 89, 55, 40], + [4, 52, 8, 83, 97, 35, 99, 16, 7, 97, 57, 32, 16, 26, 26, 79, 33, 27, 98, 66], + [88, 36, 68, 87, 57, 62, 20, 72, 3, 46, 33, 67, 46, 55, 12, 32, 63, 93, 53, 69], + [4, 42, 16, 73, 38, 25, 39, 11, 24, 94, 72, 18, 8, 46, 29, 32, 40, 62, 76, 36], + [20, 69, 36, 41, 72, 30, 23, 88, 34, 62, 99, 69, 82, 67, 59, 85, 74, 4, 36, 16], + [20, 73, 35, 29, 78, 31, 90, 1, 74, 31, 49, 71, 48, 86, 81, 16, 23, 57, 5, 54], + [1, 70, 54, 71, 83, 51, 54, 69, 16, 92, 33, 48, 61, 43, 52, 1, 89, 19, 67, 48] +]; + +const testGrid = [ + [40, 17, 81, 18, 57], + [74, 4, 36, 16, 29], + [36, 42, 69, 73, 45], + [51, 54, 69, 16, 92], + [7, 97, 57, 32, 16] +]; + +largestGridProduct(testGrid); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function largestGridProduct(arr) { + let maxProduct = 0; + let currProduct = 0; + + function maxProductChecker(n) { + if (n > maxProduct) { + return maxProduct = n; + } + } + + // loop rows + for (let r = 0; r < arr.length; r++) { + // loop columns + for (let c = 0; c < arr[r].length; c++) { + const limit = arr[r].length - 3; + + // check horizontal + if (c < limit) { + currProduct = arr[r][c] * arr[r][c + 1] * arr[r][c + 2] * arr[r][c + 3]; + maxProductChecker(currProduct); + } + + // check vertical + if (r < limit) { + currProduct = arr[r][c] * arr[r + 1][c] * arr[r + 2][c] * arr[r + 3][c]; + maxProductChecker(currProduct); + } + + // check diagonal [\] + if (c < limit && r < limit) { + currProduct = arr[r][c] * arr[r + 1][c + 1] * arr[r + 2][c + 2] * arr[r + 3][c + 3]; + maxProductChecker(currProduct); + } + + // check diagonal [/] + if (c > 3 && r < limit) { + currProduct = arr[r][c] * arr[r + 1][c - 1] * arr[r + 2][c - 2] * arr[r + 3][c - 3]; + maxProductChecker(currProduct); + } + } + } + + return maxProduct; +} + + const grid = [ [8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8], + [49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 4, 56, 62, 0], + [81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 3, 49, 13, 36, 65], + [52, 70, 95, 23, 4, 60, 11, 42, 69, 24, 68, 56, 1, 32, 56, 71, 37, 2, 36, 91], + [22, 31, 16, 71, 51, 67, 63, 89, 41, 92, 36, 54, 22, 40, 40, 28, 66, 33, 13, 80], + [24, 47, 32, 60, 99, 3, 45, 2, 44, 75, 33, 53, 78, 36, 84, 20, 35, 17, 12, 50], + [32, 98, 81, 28, 64, 23, 67, 10, 26, 38, 40, 67, 59, 54, 70, 66, 18, 38, 64, 70], + [67, 26, 20, 68, 2, 62, 12, 20, 95, 63, 94, 39, 63, 8, 40, 91, 66, 49, 94, 21], + [24, 55, 58, 5, 66, 73, 99, 26, 97, 17, 78, 78, 96, 83, 14, 88, 34, 89, 63, 72], + [21, 36, 23, 9, 75, 0, 76, 44, 20, 45, 35, 14, 0, 61, 33, 97, 34, 31, 33, 95], + [78, 17, 53, 28, 22, 75, 31, 67, 15, 94, 3, 80, 4, 62, 16, 14, 9, 53, 56, 92], + [16, 39, 5, 42, 96, 35, 31, 47, 55, 58, 88, 24, 0, 17, 54, 24, 36, 29, 85, 57], + [86, 56, 0, 48, 35, 71, 89, 7, 5, 44, 44, 37, 44, 60, 21, 58, 51, 54, 17, 58], + [19, 80, 81, 68, 5, 94, 47, 69, 28, 73, 92, 13, 86, 52, 17, 77, 4, 89, 55, 40], + [4, 52, 8, 83, 97, 35, 99, 16, 7, 97, 57, 32, 16, 26, 26, 79, 33, 27, 98, 66], + [88, 36, 68, 87, 57, 62, 20, 72, 3, 46, 33, 67, 46, 55, 12, 32, 63, 93, 53, 69], + [4, 42, 16, 73, 38, 25, 39, 11, 24, 94, 72, 18, 8, 46, 29, 32, 40, 62, 76, 36], + [20, 69, 36, 41, 72, 30, 23, 88, 34, 62, 99, 69, 82, 67, 59, 85, 74, 4, 36, 16], + [20, 73, 35, 29, 78, 31, 90, 1, 74, 31, 49, 71, 48, 86, 81, 16, 23, 57, 5, 54], + [1, 70, 54, 71, 83, 51, 54, 69, 16, 92, 33, 48, 61, 43, 52, 1, 89, 19, 67, 48] +]; + +const testGrid = [ + [40, 17, 81, 18, 57], + [74, 4, 36, 16, 29], + [36, 42, 69, 73, 45], + [51, 54, 69, 16, 92], + [7, 97, 57, 32, 16] +]; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.spanish.md new file mode 100644 index 0000000000..bd63b19ca4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3db1000cf542c50feed +challengeType: 5 +title: 'Problem 110: Diophantine Reciprocals II' +--- + +## Description +
+En la siguiente ecuación x, y yn son enteros positivos. +1 / x + 1 / y = 1 / n +Se puede verificar que cuando n = 1260 hay 113 soluciones distintas y este es el valor mínimo de n para el cual el número total de soluciones distintas supera las cien. +¿Cuál es el valor mínimo de n para el cual el número de soluciones distintas supera los cuatro millones? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: diophantineTwo debe devolver 9350130049860600. + testString: 'assert.strictEqual(diophantineTwo(), 9350130049860600, "diophantineTwo() should return 9350130049860600.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function diophantineTwo() { + // Good luck! + return true; +} + +diophantineTwo(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-111-primes-with-runs.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-111-primes-with-runs.spanish.md new file mode 100644 index 0000000000..af49b50a63 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-111-primes-with-runs.spanish.md @@ -0,0 +1,108 @@ +--- +id: 5 +localeTitle: 5900f3db1000cf542c50feee +challengeType: 5 +title: 'Problem 111: Primes with runs' +--- + +## Description +
+Considerando los números primos de 4 dígitos que contienen dígitos repetidos, está claro que no pueden ser todos iguales: 1111 es divisible por 11, 2222 es divisible por 22, y así sucesivamente. Pero hay nueve números primos de 4 dígitos que contienen tres: +1117, 1151, 1171, 1181, 1511, 1811, 2111, 4111, 8111 +Diremos que M (n, d) representa el número máximo de dígitos repetidos para un primo de n dígitos donde d es el dígito repetido, N (n, d) representa el número de dichos primos y S (n, d) representa la suma de estos primos. +Entonces, M (4, 1) = 3 es el número máximo de dígitos repetidos para un primo de 4 dígitos donde uno es el dígito repetido, hay N (4, 1) = 9 primos de este tipo, y la suma de estos primos es S (4, 1) = 22275. Resulta que para d = 0, solo es posible tener M (4, 0) = 2 dígitos repetidos, pero hay N (4, 0) = 13 de estos casos. +De la misma manera obtenemos los siguientes resultados para números primos de 4 dígitos. + +Dígitos, d +M (4, d) +N (4, d) +S (4, d) +0 +2 +13 +67061 +1 +3 +9 +22275 +2 +3 +1 +2221 +3 +3 +12 +46214 +4 +3 +2 +8888 +5 +3 +1 +5557 +6 +3 +1 +6661 +7 +3 +9 +57863 +8 +3 +1 +8887 +9 +3 +7 +48073 + +Para d = 0 a 9, la suma de todos los S (4, d) es 273700. +Halla la suma de todos los S (10, d). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler111() debe devolver 612407567715. + testString: 'assert.strictEqual(euler111(), 612407567715, "euler111() should return 612407567715.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler111() { + // Good luck! + return true; +} + +euler111(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-112-bouncy-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-112-bouncy-numbers.spanish.md new file mode 100644 index 0000000000..33723d4537 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-112-bouncy-numbers.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3dd1000cf542c50feef +challengeType: 5 +title: 'Problem 112: Bouncy numbers' +--- + +## Description +
+Trabajando de izquierda a derecha, si no se supera un dígito por el dígito a su izquierda, se llama un número creciente; por ejemplo, 134468. +De manera similar, si un dígito a su derecha no supera un dígito, se le llama número decreciente; por ejemplo, 66420. +Llamaremos un entero positivo que no está aumentando ni disminuyendo un número "abultado"; por ejemplo, 155349. +Claramente, no puede haber números inflables por debajo de cien, pero solo la mitad de los números por debajo de mil (525) son inflables. De hecho, el menor número para el cual la proporción de números inflables alcanza por primera vez el 50% es 538. +Sorprendentemente, los números inflables se vuelven cada vez más comunes y, cuando llegamos a 21780, la proporción de números inflables es igual al 90%. +Encuentre el número mínimo para el cual la proporción de números inflables es exactamente el 99%. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler112() debe devolver 1587000. + testString: 'assert.strictEqual(euler112(), 1587000, "euler112() should return 1587000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler112() { + // Good luck! + return true; +} + +euler112(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.spanish.md new file mode 100644 index 0000000000..6964ded2e5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3dd1000cf542c50fef0 +challengeType: 5 +title: 'Problem 113: Non-bouncy numbers' +--- + +## Description +
+Trabajando de izquierda a derecha, si no se supera un dígito por el dígito a su izquierda, se llama un número creciente; por ejemplo, 134468. +De manera similar, si un dígito a su derecha no supera un dígito, se le llama número decreciente; por ejemplo, 66420. +Llamaremos a un entero positivo que no está aumentando ni disminuyendo un número "abultado"; por ejemplo, 155349. +A medida que n aumenta, la proporción de números bouncy debajo de n aumenta, de modo que solo hay 12951 números por debajo de un millón que no son bouncy y solo 277032 números no bouncy por debajo de 1010. +Cuántos números debajo de un googol (10100) no son inflables? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler113() debe devolver 51161058134250. + testString: 'assert.strictEqual(euler113(), 51161058134250, "euler113() should return 51161058134250.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler113() { + // Good luck! + return true; +} + +euler113(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.spanish.md new file mode 100644 index 0000000000..00dd4668ee --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.spanish.md @@ -0,0 +1,163 @@ +--- +id: 5 +localeTitle: 5900f3e01000cf542c50fef2 +challengeType: 5 +title: 'Problem 114: Counting block combinations I' +--- + +## Description +
+Una fila que mide siete unidades de longitud tiene bloques rojos con una longitud mínima de tres unidades colocadas en ella, de manera que dos bloques rojos (que pueden tener longitudes diferentes) están separados por al menos un cuadrado negro. Hay exactamente diecisiete maneras de hacer esto. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +¿De cuántas maneras se puede llenar una fila que mide cincuenta unidades de longitud? +NOTA: Aunque el ejemplo anterior no se presta a la posibilidad, en general se permite mezclar tamaños de bloque. Por ejemplo, en una fila que mide ocho unidades de longitud, puede usar rojo (3), negro (1) y rojo (4). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler114() debe devolver 16475640049. + testString: 'assert.strictEqual(euler114(), 16475640049, "euler114() should return 16475640049.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler114() { + // Good luck! + return true; +} + +euler114(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.spanish.md new file mode 100644 index 0000000000..aa1034d8a4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3df1000cf542c50fef1 +challengeType: 5 +title: 'Problem 115: Counting block combinations II' +--- + +## Description +
+NOTA: Esta es una versión más difícil del Problema 114. +Una fila que mide n unidades de longitud tiene bloques rojos con una longitud mínima de m unidades colocadas en ella, de manera que dos bloques rojos (que pueden tener longitudes diferentes) Están separados por al menos un cuadrado negro. +Deje que la función de conteo de relleno, F (m, n), represente el número de formas en que se puede llenar una fila. +Por ejemplo, F (3, 29) = 673135 y F (3, 30) = 1089155. +Es decir, para m = 3, se puede ver que n = 30 es el valor más pequeño para el cual la función de conteo de relleno Primero supera el millón. +De la misma manera, para m = 10, se puede verificar que F (10, 56) = 880711 y F (10, 57) = 1148904, por lo que n = 57 es el valor mínimo para el cual la función de conteo de relleno primero Supera el millón. +Para m = 50, encuentre el valor mínimo de n para el cual la función de recuento de relleno excede primero un millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler115() debe devolver 168. + testString: 'assert.strictEqual(euler115(), 168, "euler115() should return 168.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler115() { + // Good luck! + return true; +} + +euler115(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.spanish.md new file mode 100644 index 0000000000..a9f928a1a2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.spanish.md @@ -0,0 +1,131 @@ +--- +id: 5 +localeTitle: 5900f3e01000cf542c50fef3 +challengeType: 5 +title: 'Problem 116: Red, green or blue tiles' +--- + +## Description +
+Una fila de cinco azulejos cuadrados negros debe tener un número de sus azulejos reemplazados por azulejos oblongos de colores elegidos entre rojo (longitud dos), verde (longitud tres) o azul (longitud cuatro). +Si se eligen azulejos rojos, hay exactamente siete formas en que esto se puede hacer. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Si se eligen azulejos verdes, hay tres formas. + + + + + + + + + + + + + + + + + + + +Y si se eligen azulejos azules, hay dos formas. + + + + + + + + + +Suponiendo que los colores no se pueden mezclar, hay 7 + 3 + 2 = 12 formas de reemplazar los azulejos negros en una fila que mide cinco unidades de longitud. +¿De cuántas maneras diferentes se pueden reemplazar los azulejos negros en una fila de cincuenta unidades de longitud si no se pueden mezclar los colores y se debe usar al menos un azulejo de color? +NOTA: Esto está relacionado con el Problema 117. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler116() debe devolver 20492570929. + testString: 'assert.strictEqual(euler116(), 20492570929, "euler116() should return 20492570929.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler116() { + // Good luck! + return true; +} + +euler116(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.spanish.md new file mode 100644 index 0000000000..9668fd5a41 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.spanish.md @@ -0,0 +1,141 @@ +--- +id: 5 +localeTitle: 5900f3e21000cf542c50fef4 +challengeType: 5 +title: 'Problem 117: Red, green, and blue tiles' +--- + +## Description +
+Usando una combinación de azulejos cuadrados negros y azulejos oblongos elegidos entre: azulejos rojos que miden dos unidades, azulejos verdes que miden tres unidades, y azulejos azules que miden cuatro unidades, es posible alinear una fila de cinco unidades de longitud en exactamente quince formas diferentes . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +¿De cuántas maneras se puede formar una fila de cincuenta unidades de longitud? +NOTA: Esto está relacionado con el Problema 116. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler117() debe devolver 100808458960497. + testString: 'assert.strictEqual(euler117(), 100808458960497, "euler117() should return 100808458960497.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler117() { + // Good luck! + return true; +} + +euler117(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.spanish.md new file mode 100644 index 0000000000..96cc82eedb --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f3e21000cf542c50fef5 +challengeType: 5 +title: 'Problem 118: Pandigital prime sets' +--- + +## Description +
+Usando todos los dígitos del 1 al 9 y concatenándolos libremente para formar enteros decimales, se pueden formar diferentes conjuntos. Es interesante que con el conjunto {2,5,47,89,631}, todos los elementos que pertenecen a él son primos. +¿Cuántos conjuntos distintos que contienen cada uno de los dígitos del uno al nueve exactamente una vez contienen solo elementos primos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler118() debe devolver 44680. + testString: 'assert.strictEqual(euler118(), 44680, "euler118() should return 44680.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler118() { + // Good luck! + return true; +} + +euler118(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-12-highly-divisible-triangular-number.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-12-highly-divisible-triangular-number.spanish.md new file mode 100644 index 0000000000..461fbef5a4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-12-highly-divisible-triangular-number.spanish.md @@ -0,0 +1,106 @@ +--- +id: 5 +localeTitle: 5900f3781000cf542c50fe8b +challengeType: 5 +title: 'Problem 12: Highly divisible triangular number' +--- + +## Description +
+La secuencia de los números de triángulos se genera al sumar los números naturales. Entonces, el número del séptimo triángulo sería 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. Los primeros diez términos serían: +
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
+Listemos los factores de los primeros siete números de triángulos: +
1: 1
+
3: 1, 3
+
6: 1, 2, 3, 6
+
10: 1, 2, 5, 10
+
15: 1, 3, 5, 15
+
21: 1, 3, 7, 21
+
28: 1, 2, 4, 7, 14, 28
+Podemos ver que 28 es el primer número de triángulo que tiene más de cinco divisores. +¿Cuál es el valor del primer número de triángulo que tiene más de n divisores? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: divisibleTriangleNumber(5) debe devolver 28. + testString: 'assert.strictEqual(divisibleTriangleNumber(5), 28, "divisibleTriangleNumber(5) should return 28.");' + - text: divisibleTriangleNumber(23) debe devolver 630. + testString: 'assert.strictEqual(divisibleTriangleNumber(23), 630, "divisibleTriangleNumber(23) should return 630.");' + - text: divisibleTriangleNumber(167) debe devolver 1385280. + testString: 'assert.strictEqual(divisibleTriangleNumber(167), 1385280, "divisibleTriangleNumber(167) should return 1385280.");' + - text: divisibleTriangleNumber(374) debe devolver 17907120. + testString: 'assert.strictEqual(divisibleTriangleNumber(374), 17907120, "divisibleTriangleNumber(374) should return 17907120.");' + - text: divisibleTriangleNumber(500) debe devolver 76576500. + testString: 'assert.strictEqual(divisibleTriangleNumber(500), 76576500, "divisibleTriangleNumber(500) should return 76576500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function divisibleTriangleNumber(n) { + // Good luck! + return true; +} + +divisibleTriangleNumber(500); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function divisibleTriangleNumber(n) { + let counter = 1; + let triangleNumber = counter++; + + function getFactors(num) { + let factors = []; + + let possibleFactor = 1; + let sqrt = Math.sqrt(num); + + while (possibleFactor <= sqrt) { + if (num % possibleFactor == 0) { + factors.push(possibleFactor); + var otherPossibleFactor = num / possibleFactor; + if (otherPossibleFactor > possibleFactor) { + factors.push(otherPossibleFactor); + } + } + possibleFactor++; + } + + return factors; + } + + while (getFactors(triangleNumber).length < n) { + triangleNumber += counter++; + } + console.log(triangleNumber) + return triangleNumber; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-120-square-remainders.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-120-square-remainders.spanish.md new file mode 100644 index 0000000000..2bcb6f37ff --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-120-square-remainders.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3e41000cf542c50fef7 +challengeType: 5 +title: 'Problem 120: Square remainders' +--- + +## Description +
+Sea r el resto cuando (a − 1) n + (a + 1) n esté dividido por a2. +Por ejemplo, si a = 7 y n = 3, entonces r = 42: 63 + 83 = 728 ≡ 42 mod 49. Y como n varía, también lo hará r, pero para a = 7 resulta que rmax = 42 . +Para 3 ≤ a ≤ 1000, encuentre ∑ rmax. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler120() debe devolver 333082500. + testString: 'assert.strictEqual(euler120(), 333082500, "euler120() should return 333082500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler120() { + // Good luck! + return true; +} + +euler120(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.spanish.md new file mode 100644 index 0000000000..62d1bf0cbd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3e51000cf542c50fef8 +challengeType: 5 +title: 'Problem 121: Disc game prize fund' +--- + +## Description +
+Una bolsa contiene un disco rojo y un disco azul. En un juego de azar, un jugador toma un disco al azar y se nota su color. Después de cada vuelta, el disco vuelve a la bolsa, se agrega un disco rojo adicional y se toma otro disco al azar. +El jugador paga £ 1 para jugar y gana si ha tomado más discos azules que discos rojos al final del juego. +Si el juego se juega durante cuatro turnos, la probabilidad de que un jugador gane es exactamente el 11/120, por lo que el fondo de premios máximo que el banquero debe asignar para ganar en este juego sería de £ 10 antes de que esperen incurrir en una pérdida. Tenga en cuenta que cualquier pago será una cantidad total de libras y también incluye el £ 1 original pagado para jugar el juego, por lo que en el ejemplo dado, el jugador en realidad gana £ 9. +Encuentre el fondo máximo de premios que se debe asignar a un solo juego en el que se juegan quince turnos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler121() debe devolver 2269. + testString: 'assert.strictEqual(euler121(), 2269, "euler121() should return 2269.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler121() { + // Good luck! + return true; +} + +euler121(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.spanish.md new file mode 100644 index 0000000000..67080c9a82 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f3e61000cf542c50fef9 +challengeType: 5 +title: 'Problem 122: Efficient exponentiation' +--- + +## Description +
+La forma más ingenua de calcular n15 requiere catorce multiplicaciones: +n × n × ... × n = n15 +Pero utilizando un método "binario" puedes calcularlo en seis multiplicaciones: +n × n = n2n2 × n2 = n4n4 × n4 = n8n8 × n4 = n12n12 × n2 = n14n14 × n = n15 +Sin embargo, todavía es posible calcularlo en solo cinco multiplicaciones: +n × n = n2n2 × n = n3n3 × n3 = n6n6 × n6 = n12n12 × n3 = n15 +Definiremos m (k) como el número mínimo de multiplicaciones para calcular nk; por ejemplo m (15) = 5. +Para 1 ≤ k ≤ 200, encuentre ∑ m (k). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler122() debe devolver 1582. + testString: 'assert.strictEqual(euler122(), 1582, "euler122() should return 1582.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler122() { + // Good luck! + return true; +} + +euler122(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-123-prime-square-remainders.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-123-prime-square-remainders.spanish.md new file mode 100644 index 0000000000..48e3c3a6f0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-123-prime-square-remainders.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3e71000cf542c50fefa +challengeType: 5 +title: 'Problem 123: Prime square remainders' +--- + +## Description +
+Sea pn el primer primo: 2, 3, 5, 7, 11, ..., y sea r el resto cuando (pn − 1) n + (pn + 1) n esté dividido por pn2. +Por ejemplo, cuando n = 3, p3 = 5, y 43 + 63 = 280 ≡ 5 mod 25. +El valor mínimo de n para el cual el resto primero excede 109 es 7037. +Encuentre el valor mínimo de n para el cual el resto primero excede 1010. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler123() debe devolver 21035. + testString: 'assert.strictEqual(euler123(), 21035, "euler123() should return 21035.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler123() { + // Good luck! + return true; +} + +euler123(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-124-ordered-radicals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-124-ordered-radicals.spanish.md new file mode 100644 index 0000000000..987b86bcb5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-124-ordered-radicals.spanish.md @@ -0,0 +1,98 @@ +--- +id: 5 +localeTitle: 5900f3e81000cf542c50fefb +challengeType: 5 +title: 'Problem 124: Ordered radicals' +--- + +## Description +
+El radical de n, rad (n), es el producto de los distintos factores primos de n. Por ejemplo, 504 = 23 × 32 × 7, entonces rad (504) = 2 × 3 × 7 = 42. +Si calculamos rad (n) para 1 ≤ n ≤ 10, luego los clasificamos en rad (n), y clasificando en n si los valores radicales son iguales, obtenemos: +Sin clasificar + +Ordenados +n +rad (n) + +n +rad (n) +k +11 + +111 +22 + +222 +33 + +423 +42 + +824 +55 + +335 +66 + +936 +77 + +557 +82 + +668 +93 + +779 +1010 + +101010 +Sea E (k) el elemento kth en la columna ordenada n ; por ejemplo, E (4) = 8 y E (6) = 9. +Si rad (n) está ordenado por 1 ≤ n ≤ 100000, encuentre E (10000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler124() debe devolver 21417. + testString: 'assert.strictEqual(euler124(), 21417, "euler124() should return 21417.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler124() { + // Good luck! + return true; +} + +euler124(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-125-palindromic-sums.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-125-palindromic-sums.spanish.md new file mode 100644 index 0000000000..fec201c630 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-125-palindromic-sums.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3e91000cf542c50fefc +challengeType: 5 +title: 'Problem 125: Palindromic sums' +--- + +## Description +
+El número palindrómico 595 es interesante porque se puede escribir como la suma de cuadrados consecutivos: 62 + 72 + 82 + 92 + 102 + 112 + 122. +Hay exactamente once palíndromos por debajo de mil que se pueden escribir como cuadrados consecutivos sumas, y la suma de estos palíndromos es 4164. Tenga en cuenta que 1 = 02 + 12 no se ha incluido ya que este problema se refiere a los cuadrados de los enteros positivos. +Encuentre la suma de todos los números menores de 108 que son palindrómicos y se pueden escribir como la suma de cuadrados consecutivos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler125() debe devolver 2906969179. + testString: 'assert.strictEqual(euler125(), 2906969179, "euler125() should return 2906969179.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler125() { + // Good luck! + return true; +} + +euler125(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-126-cuboid-layers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-126-cuboid-layers.spanish.md new file mode 100644 index 0000000000..6f8dbc25a5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-126-cuboid-layers.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f3ea1000cf542c50fefd +challengeType: 5 +title: 'Problem 126: Cuboid layers' +--- + +## Description +
+El número mínimo de cubos para cubrir cada cara visible en un cuboide que mide 3 x 2 x 1 es veintidos. + + +Si luego agregamos una segunda capa a este sólido, se necesitarían cuarenta y seis cubos para cubrir todas las caras visibles, la tercera capa requeriría setenta y ocho cubos y la cuarta capa requeriría ciento dieciocho cubos para cubrir Cada cara visible. +Sin embargo, la primera capa en un cuboide que mide 5 x 1 x 1 también requiere veintidós cubos; de manera similar, la primera capa en los cuboides que miden 5 x 3 x 1, 7 x 2 x 1 y 11 x 1 x 1 contienen cuarenta y seis cubos. +Definiremos que C (n) representa el número de cuboides que contienen n cubos en una de sus capas. Así que C (22) = 2, C (46) = 4, C (78) = 5 y C (118) = 8. +Resulta que 154 es el menor valor de n para el cual C (n) = 10 . +Encuentre el menor valor de n para el cual C (n) = 1000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler126() debe devolver 18522. + testString: 'assert.strictEqual(euler126(), 18522, "euler126() should return 18522.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler126() { + // Good luck! + return true; +} + +euler126(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-127-abc-hits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-127-abc-hits.spanish.md new file mode 100644 index 0000000000..3763fe663f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-127-abc-hits.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f3ec1000cf542c50fefe +challengeType: 5 +title: 'Problem 127: abc-hits' +--- + +## Description +
+El radical de n, rad (n), es el producto de distintos factores primos de n. Por ejemplo, 504 = 23 × 32 × 7, entonces rad (504) = 2 × 3 × 7 = 42. +Definiremos el triplete de enteros positivos (a, b, c) como un acierto si: +GCD (a, b) = GCD (a, c) = GCD (b, c) = 1 +a <b +a + b = c +rad (abc) <c +Por ejemplo, (5, 27, 32) es un éxito abc, porque: +GCD (5, 27) = GCD (5, 32) = GCD (27, 32) = 1 +5 <27 +5 + 27 = 32 +rad (4320) = 30 <32 +Resulta que los abc-hits son bastante raros y solo hay treinta y uno abc-hits para c <1000, con ∑c = 12523. +Encuentra ∑c para c <120000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler127() debe devolver 18407904. + testString: 'assert.strictEqual(euler127(), 18407904, "euler127() should return 18407904.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler127() { + // Good luck! + return true; +} + +euler127(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.spanish.md new file mode 100644 index 0000000000..ad8fb6ee39 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f3ec1000cf542c50feff +challengeType: 5 +title: 'Problem 128: Hexagonal tile differences' +--- + +## Description +
+Una baldosa hexagonal con el número 1 está rodeada por un anillo de seis baldosas hexagonales, comenzando en "12 en punto" y numerando las baldosas 2 a 7 en sentido antihorario. +nuevos anillos se agregan de la misma manera, con los siguientes anillos numerados del 8 al 19, del 20 al 37, del 38 al 61, y así sucesivamente. El siguiente diagrama muestra los tres primeros anillos. + + +Al encontrar la diferencia entre el azulejo n y cada uno de sus seis vecinos, definiremos PD (n) como el número de esas diferencias que son primos. +Por ejemplo, trabajando en el sentido de las agujas del reloj alrededor de la baldosa 8, las diferencias son 12, 29, 11, 6, 1 y 13. Entonces, PD (8) = 3. +De la misma manera, las diferencias alrededor de la baldosa 17 son 1, 17, 16 , 1, 11 y 10, por lo tanto, PD (17) = 2. +Se puede mostrar que el valor máximo de PD (n) es 3. +Si todas las fichas para las cuales PD (n) = 3 se enumeran en en orden ascendente para formar una secuencia, la décima casilla sería 271. +Encuentre la baldosa 2000 en esta secuencia. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler128() debe devolver 14516824220. + testString: 'assert.strictEqual(euler128(), 14516824220, "euler128() should return 14516824220.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler128() { + // Good luck! + return true; +} + +euler128(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-129-repunit-divisibility.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-129-repunit-divisibility.spanish.md new file mode 100644 index 0000000000..7d4b9d578c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-129-repunit-divisibility.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3ef1000cf542c50ff01 +challengeType: 5 +title: 'Problem 129: Repunit divisibility' +--- + +## Description +
+Un número formado enteramente por unos se llama repunit. Definiremos que R (k) es una repunidad de longitud k; por ejemplo, R (6) = 111111. +Dado que n es un entero positivo y GCD (n, 10) = 1, se puede mostrar que siempre existe un valor, k, para el cual R (k) es divisible por n, y sea A (n) el menor valor de k; por ejemplo, A (7) = 6 y A (41) = 5. +El valor mínimo de n para el cual A (n) primero excede de diez es 17. +Encuentre el valor mínimo de n para el cual A (n) excede primero un millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler129() debe devolver 1000023. + testString: 'assert.strictEqual(euler129(), 1000023, "euler129() should return 1000023.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler129() { + // Good luck! + return true; +} + +euler129(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-13-large-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-13-large-sum.spanish.md new file mode 100644 index 0000000000..37982a7556 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-13-large-sum.spanish.md @@ -0,0 +1,296 @@ +--- +id: 5 +localeTitle: 5900f37a1000cf542c50fe8c +challengeType: 5 +title: 'Problem 13: Large sum' +--- + +## Description +
+Calcule los primeros diez dígitos de la suma de los siguientes cien números de 50 dígitos. + +37107287533902102798797998220837590246510135740250 +46376937677490009712648124896970078050417018260538 +74324986199524741059474233309513058123726617309629 +91942213363574161572522430563301811072406154908250 +23067588207539346171171980310421047513778063246676 +89261670696623633820136378418383684178734361726757 +28112879812849979408065481931592621691275889832738 +44274228917432520321923589422876796487670272189318 +47451445736001306439091167216856844588711603153276 +70386486105843025439939619828917593665686757934951 +62176457141856560629502157223196586755079324193331 +64906352462741904929101432445813822663347944758178 +92575867718337217661963751590579239728245598838407 +58203565325359399008402633568948830189458628227828 +80181199384826282014278194139940567587151170094390 +35398664372827112653829987240784473053190104293586 +86515506006295864861532075273371959191420517255829 +71693888707715466499115593487603532921714970056938 +543700705768266846246214956500764717872944 38377604 +53282654108756828443191190634694037855217779295145 +36123272525000296071075082563815656710885258350721 +45876576172410976447339110607218265236877223636045 +17423706905851860660448207621209813287860733969412 +81142660418086830619328460811191061556940512689692 +51934325451728388641918047049293215058642563049483 +62467221648435076201727918039944693004732956340691 +15732444386908125794514089057706229429197107928209 +55037687525678773091862540744969844508330393682126 +18336384825330154686196124348767681297534375946515 +80386287592878490201521685554828717201219257766954 +78182833757993103614740356856449095527097864797581 +16726320100436897842553539920931837441497806860984 +48403098129077791799088218795327364475675590848030 +87086987551392711854517078544161852424320693150332 +59959406895756536782107074926966537676326235447210 +69793950679652694742597709739166693763042633987085 +41052684708299085211399427365734116182760315001271 +65378607361501080857009149939512557 028198746004375 +35829035317434717326932123578154982629742552737307 +94953759765105305946966067683156574377167401875275 +88902802571733229619176668713819931811048770190271 +25267680276078003013678680992525463401061632866526 +36270218540497705585629946580636237993140746255962 +24074486908231174977792365466257246923322810917141 +91430288197103288597806669760892938638285025333403 +34413065578016127815921815005561868836468420090470 +23053081172816430487623791969842487255036638784583 +11487696932154902810424020138335124462181441773470 +63783299490636259666498587618221225225512486764533 +67720186971698544312419572409913959008952310058822 +95548255300263520781532296796249481641953868218774 +76085327132285723110424803456124867697064507995236 +37774242535411291684276865538926205024910326572967 +23701913275725675285653248258265463092207058596522 +29798860272258331913126375147341994889534765745501 +18495701454879288984856827726077713721403798879715 +3829820378303147352772158034 8144513491373226651381 +34829543829199918180278916522431027392251122869539 +40957953066405232632538044100059654939159879593635 +29746152185502371307642255121183693803580388584903 +41698116222072977186158236678424689157993532961922 +62467957194401269043877107275048102390895523597457 +23189706772547915061505504953922979530901129967519 +86188088225875314529584099251203829009407770775672 +11306739708304724483816533873502340845647058077308 +82959174767140363198008187129011875491310547126581 +97623331044818386269515456334926366572897563400500 +42846280183517070527831839425882145521227251250327 +55121603546981200581762165212827652751691296897789 +32238195734329339946437501907836945765883352399886 +75506164965184775180738168837861091527357929701337 +62177842752192623401942399639168044983993173312731 +32924185707147349566916674687634660915035914677504 +99518671430235219628894890102423325116913619626622 +73267460800591547471830798392868535206946944540724 +768418225246744171615 14036427982273348055556214818 +97142617910342598647204516893989422179826088076852 +87783646182799346313767754307809363333018982642090 +10848802521674670883215120185883543223812876952786 +71329612474782464538636993009049310363619763878039 +62184073572399794223406235393808339651327408011116 +66627891981488087797941876876144230030984490851411 +60661826293682836764744779239180335110989069790714 +85786944089552990653640447425576083659976645795096 +66024396409905389607120198219976047599490197230297 +64913982680032973156037120041377903785566085089252 +16730939319872750275468906903707539413042652315011 +94809377245048795150954100921645863754710598436791 +78639167021187492431995700641917969777599028300699 +15368713711936614952811305876380278410754449733078 +40789923115535562561142322423255033685442488917353 +44889911501440648020369068063960672322193204149535 +41503128880339536053299340368006977710650566631954 +81234880673210146739058568557934581403627822703280 +82616570773948 327592232845941706525094512325230608 +22918802058777319719839450180888072429661980811197 +77158542502016545090413245809786882778948721859617 +72107838435069186155435662884062257473692284509516 +20849603980134001723930671666823555245252804609722 +53503534226472524250874054075591789781264330331690 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: largeSum(testNums) debe devolver 8348422521. + testString: 'assert.strictEqual(largeSum(testNums), 8348422521, "largeSum(testNums) should return 8348422521.");' + - text: largeSum(fiftyDigitNums) debe devolver 5537376230. + testString: 'assert.strictEqual(largeSum(fiftyDigitNums), 5537376230, "largeSum(fiftyDigitNums) should return 5537376230.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function largeSum(arr) { + // Good luck! + return true; +} + +// only change code above this line + +const testNums = [ + '37107287533902102798797998220837590246510135740250', + '46376937677490009712648124896970078050417018260538' +]; + +largeSum(testNums); +``` + +
+ +### Before Test +
+ +```js +const fiftyDigitNums = [ + '37107287533902102798797998220837590246510135740250', + '46376937677490009712648124896970078050417018260538', + '74324986199524741059474233309513058123726617309629', + '91942213363574161572522430563301811072406154908250', + '23067588207539346171171980310421047513778063246676', + '89261670696623633820136378418383684178734361726757', + '28112879812849979408065481931592621691275889832738', + '44274228917432520321923589422876796487670272189318', + '47451445736001306439091167216856844588711603153276', + '70386486105843025439939619828917593665686757934951', + '62176457141856560629502157223196586755079324193331', + '64906352462741904929101432445813822663347944758178', + '92575867718337217661963751590579239728245598838407', + '58203565325359399008402633568948830189458628227828', + '80181199384826282014278194139940567587151170094390', + '35398664372827112653829987240784473053190104293586', + '86515506006295864861532075273371959191420517255829', + '71693888707715466499115593487603532921714970056938', + '54370070576826684624621495650076471787294438377604', + '53282654108756828443191190634694037855217779295145', + '36123272525000296071075082563815656710885258350721', + '45876576172410976447339110607218265236877223636045', + '17423706905851860660448207621209813287860733969412', + '81142660418086830619328460811191061556940512689692', + '51934325451728388641918047049293215058642563049483', + '62467221648435076201727918039944693004732956340691', + '15732444386908125794514089057706229429197107928209', + '55037687525678773091862540744969844508330393682126', + '18336384825330154686196124348767681297534375946515', + '80386287592878490201521685554828717201219257766954', + '78182833757993103614740356856449095527097864797581', + '16726320100436897842553539920931837441497806860984', + '48403098129077791799088218795327364475675590848030', + '87086987551392711854517078544161852424320693150332', + '59959406895756536782107074926966537676326235447210', + '69793950679652694742597709739166693763042633987085', + '41052684708299085211399427365734116182760315001271', + '65378607361501080857009149939512557028198746004375', + '35829035317434717326932123578154982629742552737307', + '94953759765105305946966067683156574377167401875275', + '88902802571733229619176668713819931811048770190271', + '25267680276078003013678680992525463401061632866526', + '36270218540497705585629946580636237993140746255962', + '24074486908231174977792365466257246923322810917141', + '91430288197103288597806669760892938638285025333403', + '34413065578016127815921815005561868836468420090470', + '23053081172816430487623791969842487255036638784583', + '11487696932154902810424020138335124462181441773470', + '63783299490636259666498587618221225225512486764533', + '67720186971698544312419572409913959008952310058822', + '95548255300263520781532296796249481641953868218774', + '76085327132285723110424803456124867697064507995236', + '37774242535411291684276865538926205024910326572967', + '23701913275725675285653248258265463092207058596522', + '29798860272258331913126375147341994889534765745501', + '18495701454879288984856827726077713721403798879715', + '38298203783031473527721580348144513491373226651381', + '34829543829199918180278916522431027392251122869539', + '40957953066405232632538044100059654939159879593635', + '29746152185502371307642255121183693803580388584903', + '41698116222072977186158236678424689157993532961922', + '62467957194401269043877107275048102390895523597457', + '23189706772547915061505504953922979530901129967519', + '86188088225875314529584099251203829009407770775672', + '11306739708304724483816533873502340845647058077308', + '82959174767140363198008187129011875491310547126581', + '97623331044818386269515456334926366572897563400500', + '42846280183517070527831839425882145521227251250327', + '55121603546981200581762165212827652751691296897789', + '32238195734329339946437501907836945765883352399886', + '75506164965184775180738168837861091527357929701337', + '62177842752192623401942399639168044983993173312731', + '32924185707147349566916674687634660915035914677504', + '99518671430235219628894890102423325116913619626622', + '73267460800591547471830798392868535206946944540724', + '76841822524674417161514036427982273348055556214818', + '97142617910342598647204516893989422179826088076852', + '87783646182799346313767754307809363333018982642090', + '10848802521674670883215120185883543223812876952786', + '71329612474782464538636993009049310363619763878039', + '62184073572399794223406235393808339651327408011116', + '66627891981488087797941876876144230030984490851411', + '60661826293682836764744779239180335110989069790714', + '85786944089552990653640447425576083659976645795096', + '66024396409905389607120198219976047599490197230297', + '64913982680032973156037120041377903785566085089252', + '16730939319872750275468906903707539413042652315011', + '94809377245048795150954100921645863754710598436791', + '78639167021187492431995700641917969777599028300699', + '15368713711936614952811305876380278410754449733078', + '40789923115535562561142322423255033685442488917353', + '44889911501440648020369068063960672322193204149535', + '41503128880339536053299340368006977710650566631954', + '81234880673210146739058568557934581403627822703280', + '82616570773948327592232845941706525094512325230608', + '22918802058777319719839450180888072429661980811197', + '77158542502016545090413245809786882778948721859617', + '72107838435069186155435662884062257473692284509516', + '20849603980134001723930671666823555245252804609722', + '53503534226472524250874054075591789781264330331690' +]; + +const testNums = [ + '37107287533902102798797998220837590246510135740250', + '46376937677490009712648124896970078050417018260538' +]; +``` + +
+ + +
+ +## Solution +
+ + +```js +function largeSum(arr) { + + let sum = 0; + + arr.forEach(function(num) { + sum += parseInt(num, 10); + }); + + sum = sum.toString(10); + + sum = sum.substr(0, 1) + sum.substr(2); + + let firstTen = sum.slice(0, 10); + return parseInt(firstTen, 10); +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.spanish.md new file mode 100644 index 0000000000..cead6f88a9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3ee1000cf542c50ff00 +challengeType: 5 +title: 'Problem 130: Composites with prime repunit property' +--- + +## Description +
+Un número formado enteramente por unos se llama repunit. Definiremos que R (k) es una repunidad de longitud k; por ejemplo, R (6) = 111111. +Dado que n es un entero positivo y GCD (n, 10) = 1, se puede mostrar que siempre existe un valor, k, para el cual R (k) es divisible por n, y sea A (n) el menor valor de k; por ejemplo, A (7) = 6 y A (41) = 5. +Se le da para todos los primos, p> 5, que p - 1 es divisible por A (p). Por ejemplo, cuando p = 41, A (41) = 5, y 40 es divisible por 5. +Sin embargo, hay valores compuestos raros para los cuales esto también es cierto; los primeros cinco ejemplos son 91, 259, 451, 481 y 703. +Encuentre la suma de los primeros veinticinco valores compuestos de n para los cuales GCD (n, 10) = 1 y n - 1 es divisible por A (n) . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler130() debe devolver 149253. + testString: 'assert.strictEqual(euler130(), 149253, "euler130() should return 149253.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler130() { + // Good luck! + return true; +} + +euler130(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.spanish.md new file mode 100644 index 0000000000..e3d14c6aa7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3ef1000cf542c50ff02 +challengeType: 5 +title: 'Problem 131: Prime cube partnership' +--- + +## Description +
+Hay algunos valores primarios, p, para los cuales existe un entero positivo, n, de manera que la expresión n3 + n2p es un cubo perfecto. +Por ejemplo, cuando p = 19, 83 + 82 × 19 = 123. +Lo que quizás sea más sorprendente es que para cada primo con esta propiedad el valor de n es único, y solo hay cuatro primos de este tipo por debajo de cien. +¿Cuántos números primos por debajo de un millón tiene esta propiedad notable? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler131() debe devolver 173. + testString: 'assert.strictEqual(euler131(), 173, "euler131() should return 173.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler131() { + // Good luck! + return true; +} + +euler131(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-132-large-repunit-factors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-132-large-repunit-factors.spanish.md new file mode 100644 index 0000000000..867db98bc6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-132-large-repunit-factors.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3f11000cf542c50ff03 +challengeType: 5 +title: 'Problem 132: Large repunit factors' +--- + +## Description +
+Un número formado enteramente por unos se llama repunit. Definiremos que R (k) es una repunidad de longitud k. +Por ejemplo, R (10) = 1111111111 = 11 × 41 × 271 × 9091, y la suma de estos factores primos es 9414. +Encuentre la suma de los primeros cuarenta factores primos de R (109). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler132() debe devolver 843296. + testString: 'assert.strictEqual(euler132(), 843296, "euler132() should return 843296.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler132() { + // Good luck! + return true; +} + +euler132(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.spanish.md new file mode 100644 index 0000000000..13b18c3a46 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3f21000cf542c50ff04 +challengeType: 5 +title: 'Problem 133: Repunit nonfactors' +--- + +## Description +
+Un número formado enteramente por unos se llama repunit. Definiremos que R (k) es una repunidad de longitud k; por ejemplo, R (6) = 111111. +Consideremos las repunidades de la forma R (10n). +Aunque R (10), R (100) o R (1000) no son divisibles por 17, R (10000) es divisible por 17. Sin embargo, no hay un valor de n para el cual R (10n) se dividirá por 19. De hecho, es notable que 11, 17, 41 y 73 son los únicos cuatro primos por debajo de cien que pueden ser un factor de R (10n). +Encuentra la suma de todos los números primos por debajo de cien mil que nunca serán un factor de R (10n). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler133() debe devolver 453647705. + testString: 'assert.strictEqual(euler133(), 453647705, "euler133() should return 453647705.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler133() { + // Good luck! + return true; +} + +euler133(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-134-prime-pair-connection.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-134-prime-pair-connection.spanish.md new file mode 100644 index 0000000000..27a40920fd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-134-prime-pair-connection.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3f21000cf542c50ff05 +challengeType: 5 +title: 'Problem 134: Prime pair connection' +--- + +## Description +
+Considere los primos consecutivos p1 = 19 y p2 = 23. Se puede verificar que 1219 es el número más pequeño, de modo que los últimos dígitos están formados por p1 y también son divisibles por p2. +De hecho, con la excepción de p1 = 3 y p2 = 5, para cada par de primos consecutivos, p2> p1, existen valores de n para los cuales los últimos dígitos están formados por p1 yn es divisible por p2. Sea S el más pequeño de estos valores de n. +Encuentre ∑ S para cada par de primos consecutivos con 5 ≤ p1 ≤ 1000000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler134() debe devolver 18613426663617120. + testString: 'assert.strictEqual(euler134(), 18613426663617120, "euler134() should return 18613426663617120.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler134() { + // Good luck! + return true; +} + +euler134(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-135-same-differences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-135-same-differences.spanish.md new file mode 100644 index 0000000000..747c50d006 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-135-same-differences.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3f31000cf542c50ff06 +challengeType: 5 +title: 'Problem 135: Same differences' +--- + +## Description +
+Dado que los enteros positivos, x, y, y z, son términos consecutivos de una progresión aritmética, el menor valor del entero positivo, n, para el cual la ecuación, x2 - y2 - z2 = n, tiene exactamente dos soluciones es n = 27: +342 - 272 - 202 = 122 - 92 - 62 = 27 +Resulta que n = 1155 es el valor mínimo que tiene exactamente diez soluciones. +¿Cuántos valores de n menos de un millón tienen exactamente diez soluciones distintas? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler135() debe devolver 4989. + testString: 'assert.strictEqual(euler135(), 4989, "euler135() should return 4989.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler135() { + // Good luck! + return true; +} + +euler135(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-136-singleton-difference.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-136-singleton-difference.spanish.md new file mode 100644 index 0000000000..7be692cf97 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-136-singleton-difference.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3f51000cf542c50ff07 +challengeType: 5 +title: 'Problem 136: Singleton difference' +--- + +## Description +
+Los enteros positivos, x, y, y z, son términos consecutivos de una progresión aritmética. Dado que n es un entero positivo, la ecuación, x2 - y2 - z2 = n, tiene exactamente una solución cuando n = 20: +132 - 102 - 72 = 20 +De hecho, hay veinticinco valores de n por debajo de cien Para lo cual la ecuación tiene una solución única. +¿Cuántos valores de n menos de cincuenta millones tienen exactamente una solución? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler136() debe devolver 2544559. + testString: 'assert.strictEqual(euler136(), 2544559, "euler136() should return 2544559.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler136() { + // Good luck! + return true; +} + +euler136(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.spanish.md new file mode 100644 index 0000000000..62e383ff6e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f3f51000cf542c50ff08 +challengeType: 5 +title: 'Problem 137: Fibonacci golden nuggets' +--- + +## Description +
+Considere la serie polinomial infinita AF (x) = xF1 + x2F2 + x3F3 + ..., donde Fk es el término kth en la secuencia de Fibonacci: 1, 1, 2, 3, 5, 8, ...; es decir, Fk = Fk − 1 + Fk − 2, F1 = 1 y F2 = 1. +Para este problema, nos interesarán los valores de x para los cuales AF (x) es un entero positivo. +Sorprendentemente AF (1/2) += +(1/2) .1 + (1/2) 2.1 + (1/2) 3.2 + (1/2) 4.3 + (1/2) 5.5 + ... + += +1/2 + 1/4 + 2/8 + 3/16 + 5/32 + ... + += +2 +Los valores correspondientes de x para los primeros cinco números naturales se muestran a continuación. + +xAF (x) +√2−11 +1/22 +(√13−2) / 33 +(√89−5) / 84 +(√34−3) / 55 + +Llamaremos AF (x ) una pepita de oro si x es racional, porque se vuelven cada vez más raras; por ejemplo, la décima pepita de oro es 74049690. +Encuentre la décimo quinta pepita de oro. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler137() debe devolver 1120149658760. + testString: 'assert.strictEqual(euler137(), 1120149658760, "euler137() should return 1120149658760.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler137() { + // Good luck! + return true; +} + +euler137(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.spanish.md new file mode 100644 index 0000000000..3c20f8e925 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3f61000cf542c50ff09 +challengeType: 5 +title: 'Problem 138: Special isosceles triangles' +--- + +## Description +
+Considere el triángulo isósceles con la longitud de la base, b = 16, y las piernas, L = 17. + + +Al usar el teorema de Pitágoras, se puede ver que la altura del triángulo, h = √ (172 - 82) = 15, que es uno menos que la longitud de la base. +Con b = 272 y L = 305, obtenemos h = 273, que es uno más que la longitud de la base, y este es el segundo triángulo isósceles más pequeño con la propiedad que h = b ± 1. +Encuentra ∑ L para los doce Los triángulos isósceles más pequeños para los cuales h = b ± 1 y b, L son enteros positivos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler138() debe devolver 1118049290473932. + testString: 'assert.strictEqual(euler138(), 1118049290473932, "euler138() should return 1118049290473932.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler138() { + // Good luck! + return true; +} + +euler138(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-139-pythagorean-tiles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-139-pythagorean-tiles.spanish.md new file mode 100644 index 0000000000..429299ef0d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-139-pythagorean-tiles.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3f71000cf542c50ff0a +challengeType: 5 +title: 'Problem 139: Pythagorean tiles' +--- + +## Description +
+Sea (a, b, c) los tres lados de un triángulo rectángulo con lados de longitud integral. Es posible colocar cuatro de estos triángulos juntos para formar un cuadrado con una longitud c. +Por ejemplo, (3, 4, 5) los triángulos se pueden colocar juntos para formar un cuadrado de 5 por 5 con un orificio de 1 por 1 en el medio y se puede ver que el cuadrado de 5 por 5 se puede colocar en mosaico con veinticinco 1 por 1 cuadrados. + + +Sin embargo, si se usaran (5, 12, 13) triángulos, entonces el orificio mediría 7 por 7 y estos no podrían usarse para colocar los azulejos por 13 por 13 cuadrados. +Dado que el perímetro del triángulo rectángulo es inferior a cien millones, ¿cuántos triángulos pitagóricos permitirían que se formara tal mosaico? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler139() debe devolver 10057761. + testString: 'assert.strictEqual(euler139(), 10057761, "euler139() should return 10057761.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler139() { + // Good luck! + return true; +} + +euler139(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-14-longest-collatz-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-14-longest-collatz-sequence.spanish.md new file mode 100644 index 0000000000..009c484362 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-14-longest-collatz-sequence.spanish.md @@ -0,0 +1,101 @@ +--- +id: 5 +localeTitle: 5900f37a1000cf542c50fe8d +challengeType: 5 +title: 'Problem 14: Longest Collatz sequence' +--- + +## Description +
+La siguiente secuencia iterativa se define para el conjunto de enteros positivos: +
nn / 2 ( n es par)
+
n → 3 n + 1 ( n es impar)
+Usando la regla anterior y comenzando con 13, generamos la siguiente secuencia: +
13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
+Se puede ver que esta secuencia (comenzando en 13 y terminando en 1) contiene 10 términos. Aunque aún no se ha probado (Problema de Collatz), se piensa que todos los números iniciales terminan en 1. +¿Qué número inicial, debajo del limit dado, produce la cadena más larga? +NOTA: Una vez que la cadena comienza, los términos pueden ir por encima de un millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: longestCollatzSequence(14) debe devolver 9. + testString: 'assert.strictEqual(longestCollatzSequence(14), 9, "longestCollatzSequence(14) should return 9.");' + - text: longestCollatzSequence(5847) debe devolver 3711. + testString: 'assert.strictEqual(longestCollatzSequence(5847), 3711, "longestCollatzSequence(5847) should return 3711.");' + - text: longestCollatzSequence(46500) debe devolver 35655. + testString: 'assert.strictEqual(longestCollatzSequence(46500), 35655, "longestCollatzSequence(46500) should return 35655.");' + - text: longestCollatzSequence(54512) debe devolver 52527. + testString: 'assert.strictEqual(longestCollatzSequence(54512), 52527, "longestCollatzSequence(54512) should return 52527.");' + - text: longestCollatzSequence(1000000) debe devolver 837799. + testString: 'assert.strictEqual(longestCollatzSequence(1000000), 837799, "longestCollatzSequence(1000000) should return 837799.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function longestCollatzSequence(limit) { + // Good luck! + return true; +} + +longestCollatzSequence(14); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function longestCollatzSequence(limit) { + let longestSequenceLength = 0; + let startingNum = 0; + + function sequenceLength(num) { + let length = 1; + + while (num >= 1) { + if (num === 1) { break; + } else if (num % 2 === 0) { + num = num / 2; + length++; + } else { + num = num * 3 + 1; + length++; + } + } + return length; + } + + for (let i = 2; i < limit; i++) { + let currSequenceLength = sequenceLength(i); + if (currSequenceLength > longestSequenceLength) { + longestSequenceLength = currSequenceLength; + startingNum = i; + } + } + return startingNum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-140-modified-fibonacci-golden-nuggets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-140-modified-fibonacci-golden-nuggets.spanish.md new file mode 100644 index 0000000000..5d03c402c1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-140-modified-fibonacci-golden-nuggets.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f3fa1000cf542c50ff0c +challengeType: 5 +title: 'Problem 140: Modified Fibonacci golden nuggets' +--- + +## Description +
+Considere la serie polinomial infinita AG (x) = xG1 + x2G2 + x3G3 + ..., donde Gk es el término kth de la relación de recurrencia de segundo orden Gk = Gk − 1 + Gk − 2, G1 = 1 y G2 = 4 ; es decir, 1, 4, 5, 9, 14, 23, .... +Para este problema, nos ocuparemos de los valores de x para los que AG (x) es un entero positivo. +Los valores correspondientes de x para los primeros cinco números naturales se muestran a continuación. + +xAG (x) +(√5−1) / 41 +2/52 +(√22−2) / 63 +(√137−5) / 144 +1/25 + +Llamaremos a AG (x) una pepita de oro si x es racional, porque se vuelven cada vez más raras; por ejemplo, la vigésima pepita de oro es 211345365. +Encuentra la suma de las primeras treinta pepitas de oro. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler140() debe devolver 5673835352990. + testString: 'assert.strictEqual(euler140(), 5673835352990, "euler140() should return 5673835352990.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler140() { + // Good luck! + return true; +} + +euler140(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-141-investigating-progressive-numbers-n-which-are-also-square.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-141-investigating-progressive-numbers-n-which-are-also-square.spanish.md new file mode 100644 index 0000000000..d0ac6d8b8c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-141-investigating-progressive-numbers-n-which-are-also-square.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3f91000cf542c50ff0b +challengeType: 5 +title: 'Problem 141: Investigating progressive numbers, n, which are also square' +--- + +## Description +
+Un entero positivo, n, se divide por d y el cociente y el resto son qyr respectivamente. Además, d, q y r son términos enteros positivos consecutivos en una secuencia geométrica, pero no necesariamente en ese orden. +Por ejemplo, 58 dividido por 6 tiene el cociente 9 y el resto 4. También se puede ver que 4, 6, 9 son términos consecutivos en una secuencia geométrica (relación común 3/2). +Llamaremos tales números, n, progresivo. +Algunos números progresivos, como 9 y 10404 = 1022, también son cuadrados perfectos. La suma de todos los cuadrados perfectos progresivos por debajo de cien mil es 124657. +Halla la suma de todos los cuadrados perfectos progresivos por debajo de un trillón (1012). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler141() debe devolver 878454337159. + testString: 'assert.strictEqual(euler141(), 878454337159, "euler141() should return 878454337159.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler141() { + // Good luck! + return true; +} + +euler141(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-142-perfect-square-collection.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-142-perfect-square-collection.spanish.md new file mode 100644 index 0000000000..627ae0a581 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-142-perfect-square-collection.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f3fa1000cf542c50ff0d +challengeType: 5 +title: 'Problem 142: Perfect Square Collection' +--- + +## Description +
+Encuentre el x + y + z más pequeño con los enteros x> y> z> 0 de manera que x + y, x - y, x + z, x - z, y + z, y - z sean todos cuadrados perfectos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler142() debe devolver 1006193. + testString: 'assert.strictEqual(euler142(), 1006193, "euler142() should return 1006193.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler142() { + // Good luck! + return true; +} + +euler142(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-143-investigating-the-torricelli-point-of-a-triangle.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-143-investigating-the-torricelli-point-of-a-triangle.spanish.md new file mode 100644 index 0000000000..d34870881e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-143-investigating-the-torricelli-point-of-a-triangle.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3fc1000cf542c50ff0e +challengeType: 5 +title: 'Problem 143: Investigating the Torricelli point of a triangle' +--- + +## Description +
+Deje que ABC sea un triángulo con todos los ángulos interiores de menos de 120 grados. Sea X un punto dentro del triángulo y sea XA = p, XC = q, y XB = r. +Fermat desafió a Torricelli a encontrar la posición de X tal que p + q + r se minimice. +Torricelli pudo probar que si los triángulos equiláteros AOB, BNC y AMC se construyen en cada lado del triángulo ABC, los círculos circunscritos de AOB, BNC y AMC se intersectarán en un solo punto, T, dentro del triángulo. Además, demostró que T, llamado el punto Torricelli / Fermat, minimiza p + q + r. Aún más notable, se puede mostrar que cuando la suma se minimiza, AN = BM = CO = p + q + r y que AN, BM y CO también se intersecan en T. + +Si la suma se minimiza y a, b, c, p, qyr son todos enteros positivos que llamaremos triángulo ABC triángulo Torricelli. Por ejemplo, a = 399, b = 455, c = 511 es un ejemplo de un triángulo Torricelli, con p + q + r = 784. +Halla la suma de todos los valores distintos de p + q + r ≤ 120000 para triángulos Torricelli . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler143() debe devolver 30758397. + testString: 'assert.strictEqual(euler143(), 30758397, "euler143() should return 30758397.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler143() { + // Good luck! + return true; +} + +euler143(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-144-investigating-multiple-reflections-of-a-laser-beam.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-144-investigating-multiple-reflections-of-a-laser-beam.spanish.md new file mode 100644 index 0000000000..0768afa4cc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-144-investigating-multiple-reflections-of-a-laser-beam.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f3fc1000cf542c50ff0f +challengeType: 5 +title: 'Problem 144: Investigating multiple reflections of a laser beam' +--- + +## Description +
+En la física del láser, una "célula blanca" es un sistema de espejo que actúa como una línea de retardo para el rayo láser. El rayo entra en la celda, rebota en los espejos y eventualmente vuelve a salir. +La celda blanca específica que consideraremos es una elipse con la ecuación 4x2 + y2 = 100 +Falta la sección correspondiente a −0.01 ≤ x ≤ +0.01 en la parte superior, lo que permite que la luz entre y salga por el orificio. + +El haz de luz en este problema comienza en el punto (0.0,10.1) justo fuera de la celda blanca, y el haz primero impacta al espejo en (1.4, -9.6). +Cada vez que el rayo láser golpea la superficie de la elipse, sigue la ley usual de reflexión: "ángulo de incidencia es igual a ángulo de reflexión". Es decir, tanto el haz incidente como el reflejado forman el mismo ángulo con la línea normal en el punto de incidencia. +En la figura de la izquierda, la línea roja muestra los dos primeros puntos de contacto entre el rayo láser y la pared de la célula blanca; la línea azul muestra la línea tangente a la elipse en el punto de incidencia del primer rebote. La pendiente m de la línea tangente en cualquier punto (x, y) de la elipse dada es: m = −4x / y La línea normal es Perpendicular a esta línea tangente en el punto de incidencia. +La animación de la derecha muestra las 10 primeras reflexiones de la viga. + +¿Cuántas veces el haz golpea la superficie interna de la célula blanca antes de salir? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler144() debe devolver 354. + testString: 'assert.strictEqual(euler144(), 354, "euler144() should return 354.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler144() { + // Good luck! + return true; +} + +euler144(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-145-how-many-reversible-numbers-are-there-below-one-billion.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-145-how-many-reversible-numbers-are-there-below-one-billion.spanish.md new file mode 100644 index 0000000000..8fc604bfb5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-145-how-many-reversible-numbers-are-there-below-one-billion.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3fd1000cf542c50ff10 +challengeType: 5 +title: 'Problem 145: How many reversible numbers are there below one-billion?' +--- + +## Description +
+Algunos enteros positivos n tienen la propiedad de que la suma [n + reverse (n)] consta completamente de dígitos impares (decimales). Por ejemplo, 36 + 63 = 99 y 409 + 904 = 1313. Llamaremos a dichos números reversibles; por lo que 36, 63, 409 y 904 son reversibles. Los ceros iniciales no están permitidos ni en n ni en reversa (n). + +Hay 120 números reversibles por debajo de mil. + +¿Cuántos números reversibles hay por debajo de mil millones (109)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler145() debe devolver 608720. + testString: 'assert.strictEqual(euler145(), 608720, "euler145() should return 608720.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler145() { + // Good luck! + return true; +} + +euler145(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-146-investigating-a-prime-pattern.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-146-investigating-a-prime-pattern.spanish.md new file mode 100644 index 0000000000..0b4b8cca09 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-146-investigating-a-prime-pattern.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3fe1000cf542c50ff11 +challengeType: 5 +title: 'Problem 146: Investigating a Prime Pattern' +--- + +## Description +
+El entero positivo más pequeño n para el cual los números n2 + 1, n2 + 3, n2 + 7, n2 + 9, n2 + 13 y n2 + 27 son primos consecutivos es 10. La suma de todos los enteros de este tipo n debajo de uno es millón es 1242490. + +¿Cuál es la suma de todos estos enteros n por debajo de 150 millones? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler146() debe devolver 676333270. + testString: 'assert.strictEqual(euler146(), 676333270, "euler146() should return 676333270.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler146() { + // Good luck! + return true; +} + +euler146(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-147-rectangles-in-cross-hatched-grids.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-147-rectangles-in-cross-hatched-grids.spanish.md new file mode 100644 index 0000000000..86a02f2dfc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-147-rectangles-in-cross-hatched-grids.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f3ff1000cf542c50ff12 +challengeType: 5 +title: 'Problem 147: Rectangles in cross-hatched grids' +--- + +## Description +
+En una cuadrícula sombreada de 3x2, un total de 37 rectángulos diferentes podrían situarse dentro de esa cuadrícula como se indica en el boceto. + +Hay 5 cuadrículas más pequeñas que 3x2, siendo importantes las dimensiones vertical y horizontal, es decir, 1x1, 2x1, 3x1, 1x2 y 2x2. Si cada uno de ellos es sombreado, el siguiente número de rectángulos diferentes podría situarse dentro de esas cuadrículas más pequeñas: +1x1: 1 +2x1: 4 +3x1: 8 +1x2: 4 +2x2: 18 + +Agregar estos a la de la cuadrícula de 3x2, un total de 72 rectángulos diferentes podrían situarse dentro de 3x2 y cuadrículas más pequeñas. + +¿Cuántos rectángulos diferentes podrían situarse dentro de 47x43 y cuadrículas más pequeñas? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler147() debe devolver 846910284. + testString: 'assert.strictEqual(euler147(), 846910284, "euler147() should return 846910284.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler147() { + // Good luck! + return true; +} + +euler147(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-148-exploring-pascals-triangle.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-148-exploring-pascals-triangle.spanish.md new file mode 100644 index 0000000000..fbfc217f0c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-148-exploring-pascals-triangle.spanish.md @@ -0,0 +1,135 @@ +--- +id: 5 +localeTitle: 5900f4021000cf542c50ff14 +challengeType: 5 +title: 'Problem 148: Exploring Pascal"s triangle' +--- + +## Description +
+Podemos verificar fácilmente que ninguna de las entradas en las primeras siete filas del triángulo de Pascal son divisibles entre 7: + + + + + + + + + + + + + + + + +1 + + + + + + + + + + + + +1 + + + +1 + +3 + +3 + +1 + + +1 + +4 + +6 + +4 + +1 + +1 + +5 + +10 + +10 + +5 + +1 +1 + +6 + +15 + +20 + +15 + +6 + +1 +Sin embargo, si revisamos las primeras cien filas, encontraremos que solo 2361 de las 5050 entradas no son divisibles por 7. + +Encuentre el número de entradas que no son divisibles por 7 en las primeras mil millones (109) filas del triángulo de Pascal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler148() debe devolver 2129970655314432. + testString: 'assert.strictEqual(euler148(), 2129970655314432, "euler148() should return 2129970655314432.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler148() { + // Good luck! + return true; +} + +euler148(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-149-searching-for-a-maximum-sum-subsequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-149-searching-for-a-maximum-sum-subsequence.spanish.md new file mode 100644 index 0000000000..3433db68c9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-149-searching-for-a-maximum-sum-subsequence.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4021000cf542c50ff13 +challengeType: 5 +title: 'Problem 149: Searching for a maximum-sum subsequence' +--- + +## Description +
+Mirando la tabla de abajo, es fácil verificar que la suma máxima posible de números adyacentes en cualquier dirección (horizontal, vertical, diagonal o anti-diagonal) es 16 (= 8 + 7 + 1). + + +−25329−6513273−18−4 8 + +Ahora, repitamos la búsqueda, pero en una escala mucho mayor: + +Primero, genere cuatro millones de números pseudoaleatorios utilizando una forma específica de lo que se conoce como "Lagged Fibonacci Generator": + +para 1 ≤ k ≤ 55, sk = [100003 - 200003k + 300007k3] (módulo 1000000) - 500000. +para 56 ≤ k ≤ 4000000, sk = [sk − 24 + sk − 55 + 1000000] (módulo 1000000) - 500000. + +Por lo tanto, s10 = −393027 y s100 = 86613. + +Los términos de s se ordenan en una tabla de 2000 × 2000, usando los primeros 2000 números para llenar la primera fila (secuencialmente ), los siguientes 2000 números para llenar la segunda fila, y así sucesivamente. + +Finalmente, encuentre la mayor suma de (cualquier número de) entradas adyacentes en cualquier dirección (horizontal, vertical, diagonal o anti-diagonal). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler149() debe devolver 52852124. + testString: 'assert.strictEqual(euler149(), 52852124, "euler149() should return 52852124.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler149() { + // Good luck! + return true; +} + +euler149(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-15-lattice-paths.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-15-lattice-paths.spanish.md new file mode 100644 index 0000000000..f8db985a0f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-15-lattice-paths.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f37b1000cf542c50fe8e +challengeType: 5 +title: 'Problem 15: Lattice paths' +--- + +## Description +
+Comenzando en la esquina superior izquierda de una cuadrícula de 2 × 2, y solo pudiendo moverse hacia la derecha y hacia abajo, hay exactamente 6 rutas hacia la esquina inferior derecha. + +un diagrama de 6 cuadrículas de 2 por 2 que muestra todas las rutas hacia la esquina inferior derecha + +¿Cuántas de estas rutas hay a través de un gridSize dado? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: latticePaths(4) debe devolver 70. + testString: 'assert.strictEqual(latticePaths(4), 70, "latticePaths(4) should return 70.");' + - text: latticePaths(9) debe devolver 48620. + testString: 'assert.strictEqual(latticePaths(9), 48620, "latticePaths(9) should return 48620.");' + - text: latticePaths(20) debe devolver 137846528820. + testString: 'assert.strictEqual(latticePaths(20), 137846528820, "latticePaths(20) should return 137846528820.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function latticePaths(gridSize) { + // Good luck! + return true; +} + +latticePaths(4); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function latticePaths(gridSize) { + let paths = 1; + + for (let i = 0; i < gridSize; i++) { + paths *= (2 * gridSize) - i; + paths /= i + 1; + } + return paths; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-150-searching-a-triangular-array-for-a-sub-triangle-having-minimum-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-150-searching-a-triangular-array-for-a-sub-triangle-having-minimum-sum.spanish.md new file mode 100644 index 0000000000..ce5eccf4d3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-150-searching-a-triangular-array-for-a-sub-triangle-having-minimum-sum.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f4031000cf542c50ff15 +challengeType: 5 +title: 'Problem 150: Searching a triangular array for a sub-triangle having minimum-sum' +--- + +## Description +
+En una matriz triangular de enteros positivos y negativos, deseamos encontrar un sub-triángulo tal que la suma de los números que contiene sea la más pequeña posible. +En el siguiente ejemplo, se puede verificar fácilmente que el triángulo marcado cumple esta condición con una suma de −42. + + +Queremos hacer una matriz triangular con mil filas, por lo que generamos 500500 números pseudoaleatorios sk en el rango ± 219, utilizando un tipo de generador de números aleatorios (conocido como un generador lineal congruente) como sigue: +t: = 0 + +para k = 1 hasta k = 500500: + +t: = (615949 * t + 797807) módulo 220 +sk: = t − 219 +Por lo tanto: s1 = 273519, s2 = −153582, s3 = 450905, etc. +Nuestra matriz triangular se forma entonces utilizando los números pseudoaleatorios: + +s1 +s2 s3 +s4 s5 s6 + +s7 s8 s9 s10 +... + +sub-triángulos pueden comenzar en cualquier elemento del Arregle y extienda hacia abajo todo lo que queramos (tomando los dos elementos directamente debajo de la siguiente fila, los tres elementos directamente debajo de la fila después de eso, y así sucesivamente). + +La "suma de un sub-triángulo" se define como la suma de todos los elementos que contiene. + +Encuentra la suma de sub-triángulos más pequeña posible. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler150() debe devolver -271248680. + testString: 'assert.strictEqual(euler150(), -271248680, "euler150() should return -271248680.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler150() { + // Good luck! + return true; +} + +euler150(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem.spanish.md new file mode 100644 index 0000000000..8891c187a9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-151-paper-sheets-of-standard-sizes-an-expected-value-problem.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4031000cf542c50ff16 +challengeType: 5 +title: 'Problem 151: Paper sheets of standard sizes: an expected-value problem' +--- + +## Description +
+Un taller de impresión ejecuta 16 lotes (trabajos) cada semana y cada lote requiere una hoja de papel especial a prueba de color de tamaño A5. +Cada lunes por la mañana, el capataz abre un sobre nuevo, que contiene una hoja grande de papel especial con tamaño A1. +A continuación procede a cortarlo por la mitad, consiguiendo así dos hojas de tamaño A2. Luego corta uno de ellos por la mitad para obtener dos hojas de tamaño A3 y así sucesivamente hasta que obtenga la hoja de tamaño A5 necesaria para el primer lote de la semana. +Todas las hojas no utilizadas se colocan de nuevo en el sobre. + +Al comienzo de cada lote posterior, toma del sobre una hoja de papel al azar. Si es de tamaño A5, lo usa. Si es más grande, repite el procedimiento de "cortar por la mitad" hasta que tenga lo que necesita y las hojas restantes se vuelvan a colocar en el sobre. +Excluyendo el primer y último lote de la semana, encuentre el número esperado de veces (durante cada semana) en que el capataz encuentra una sola hoja de papel en el sobre. +Da tu respuesta redondeada a seis lugares decimales usando el formato x.xxxxxx. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler151() debe devolver 0.464399. + testString: 'assert.strictEqual(euler151(), 0.464399, "euler151() should return 0.464399.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler151() { + // Good luck! + return true; +} + +euler151(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-152-writing-one-half-as-a-sum-of-inverse-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-152-writing-one-half-as-a-sum-of-inverse-squares.spanish.md new file mode 100644 index 0000000000..949499e253 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-152-writing-one-half-as-a-sum-of-inverse-squares.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4041000cf542c50ff17 +challengeType: 5 +title: 'Problem 152: Writing one half as a sum of inverse squares' +--- + +## Description +
+Hay varias formas de escribir el número 1/2 como una suma de cuadrados inversos usando enteros distintos. +Por ejemplo, se pueden usar los números {2,3,4,5,7,12,15,20,28,35}: + +De hecho, solo se utilizan números enteros entre 2 y 45 inclusive, hay exactamente tres formas para hacerlo, los dos restantes son: {2,3,4,6,7,9,10,20,28,35,36,45} y {2,3,4,6,7,9,12, 15,28,30,35,36,45}. +¿De cuántas maneras hay para escribir el número 1/2 como una suma de cuadrados inversos usando enteros distintos entre 2 y 80 inclusive? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler152() debe devolver 301. + testString: 'assert.strictEqual(euler152(), 301, "euler152() should return 301.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler152() { + // Good luck! + return true; +} + +euler152(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-153-investigating-gaussian-integers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-153-investigating-gaussian-integers.spanish.md new file mode 100644 index 0000000000..07d1069e59 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-153-investigating-gaussian-integers.spanish.md @@ -0,0 +1,100 @@ +--- +id: 5 +localeTitle: 5900f4051000cf542c50ff18 +challengeType: 5 +title: 'Problem 153: Investigating Gaussian Integers' +--- + +## Description +
+Como todos sabemos, la ecuación x2 = -1 no tiene soluciones para x real. + +Si, sin embargo, introducimos el número imaginario i, esta ecuación tiene dos soluciones: x = i y x = -i. + +Si vamos un paso más allá, la ecuación (x-3) 2 = -4 tiene dos soluciones complejas: x = 3 + 2i y x = 3-2i. +x = 3 + 2i y x = 3-2i se llaman el conjugado complejo de cada uno. + +números de la forma a + bi se denominan números complejos. + +En general, a + bi y a − bi son complejos conjugados entre sí. +Un entero gaussiano es un número complejo a + bi tal que a y b son enteros. + +Los enteros regulares también son enteros gaussianos (con b = 0). + +Para distinguirlos de los enteros gaussianos con b ≠ 0 los llamamos "enteros racionales". + +Un entero gaussiano se llama divisor de un entero racional n si el resultado es también un entero gaussiano. + +Si, por ejemplo, dividimos 5 por 1 + 2i, podemos simplificar de la siguiente manera: + +Multiplica el numerador y el denominador por el complejo conjugado de 1 + 2i: 1−2i. + +El resultado es +. + +Entonces 1 + 2i es un divisor de 5. + +Ten en cuenta que 1 + i no es un divisor de 5 porque. + +Tenga en cuenta también que si el entero gaussiano (a + bi) es un divisor de un entero racional n, entonces su conjugado complejo (a-bi) también es un divisor de n. +De hecho, 5 tiene seis divisores, por lo que la parte real es positiva: {1, 1 + 2i, 1 - 2i, 2 + i, 2 - i, 5}. + +La siguiente es una tabla de todos los divisores para los primeros cinco enteros racionales positivos: + +n divisores enteros gaussianos +con partSum real s (n) de estos + +divisores111 +21, 1 + i, 1-i , 25 +31, 34 +41, 1 + i, 1-i, 2, 2 + 2i, 2-2i, 413 +51, 1 + 2i, 1-2i, 2 + i, 2-i, 512 +Para Divisores con partes reales positivas, entonces, tenemos:. +Para 1 ≤ n ≤ 105, ∑ s (n) = 17924657155. +¿Qué es ∑ s (n) para 1 ≤ n ≤ 108? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler153() debe devolver 17971254122360636. + testString: 'assert.strictEqual(euler153(), 17971254122360636, "euler153() should return 17971254122360636.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler153() { + // Good luck! + return true; +} + +euler153(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-154-exploring-pascals-pyramid.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-154-exploring-pascals-pyramid.spanish.md new file mode 100644 index 0000000000..d275b63625 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-154-exploring-pascals-pyramid.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4071000cf542c50ff19 +challengeType: 5 +title: 'Problem 154: Exploring Pascal"s pyramid' +--- + +## Description +
+Se construye una pirámide triangular usando bolas esféricas de modo que cada bola reposa exactamente en tres bolas del siguiente nivel inferior. + +Luego, calculamos el número de caminos que van desde el vértice a cada posición: +Un camino comienza en el vértice y avanza hacia abajo a cualquiera de las tres esferas directamente debajo de la posición actual. +En consecuencia, el número de caminos para alcanzar una determinada posición es la suma de los números inmediatamente superiores (según la posición, hay hasta tres números por encima). +El resultado es la pirámide de Pascal y los números en cada nivel n son los coeficientes de la expansión trinomial +(x + y + z) n. +¿Cuántos coeficientes en la expansión de (x + y + z) 200000 son múltiplos de 1012? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler154() debe devolver 479742450. + testString: 'assert.strictEqual(euler154(), 479742450, "euler154() should return 479742450.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler154() { + // Good luck! + return true; +} + +euler154(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-155-counting-capacitor-circuits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-155-counting-capacitor-circuits.spanish.md new file mode 100644 index 0000000000..af424d4290 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-155-counting-capacitor-circuits.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4081000cf542c50ff1a +challengeType: 5 +title: 'Problem 155: Counting Capacitor Circuits' +--- + +## Description +
+Un circuito eléctrico utiliza exclusivamente condensadores idénticos del mismo valor C. + +Los condensadores se pueden conectar en serie o en paralelo para formar subunidades, que luego se pueden conectar en serie o en paralelo con otros condensadores u otras subunidades para formar subunidades más grandes, y así sucesivamente hasta un circuito final. +Usando este procedimiento simple y hasta n capacitores idénticos, podemos hacer circuitos que tengan un rango de diferentes capacitancias totales. Por ejemplo, usando hasta n = 3 capacitores de 60 F cada uno, podemos obtener los siguientes 7 valores de capacitancia total distintos: + +Si denotamos con D (n) el número de valores de capacitancia total distintos que podemos obtener cuando se usa hasta En los capacitores de igual valor y el procedimiento simple descrito anteriormente, tenemos: D (1) = 1, D (2) = 3, D (3) = 7 ... +Encuentre D (18). +Recordatorio: cuando se conectan los condensadores C1, C2, etc. en paralelo, la capacitancia total es CT = C1 + C2 + ..., + +mientras que al conectarlos en serie, la capacitancia total viene dada por: +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler155() debe devolver 3857447. + testString: 'assert.strictEqual(euler155(), 3857447, "euler155() should return 3857447.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler155() { + // Good luck! + return true; +} + +euler155(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-156-counting-digits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-156-counting-digits.spanish.md new file mode 100644 index 0000000000..ac90e8e81a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-156-counting-digits.spanish.md @@ -0,0 +1,88 @@ +--- +id: 5 +localeTitle: 5900f4091000cf542c50ff1b +challengeType: 5 +title: 'Problem 156: Counting Digits' +--- + +## Description +
+Comenzando desde cero, los números naturales se escriben en la base 10 de esta manera: + +0 1 2 3 4 5 6 7 8 9 10 11 12 .... + +Considera el dígito d = 1. Después de anotar cada número n, actualizaremos el número de los que se han producido y llamaremos a este número f (n, 1). Los primeros valores para f (n, 1), entonces, son los siguientes: + +nf (n, 1) +00 +11 +21 +31 +41 +51 +61 +71 +81 +91 +102 +114 +125 + +Tenga en cuenta que f (n, 1) nunca es igual a 3. + +Así que las dos primeras soluciones de la ecuación f (n, 1) = n son n = 0 y n = 1. La siguiente solución es n = 199981. +De la misma manera, la función f (n, d) da el número total de dígitos d que se han escrito después de que se haya escrito el número n. + +De hecho, para cada dígito d ≠ 0, 0 es la primera solución de la ecuación f (n, d) = n. +Sea s (d) la suma de todas las soluciones para las cuales f (n, d) = n. + +Te dan que s (1) = 22786974071. +Encuentre ∑ s (d) para 1 ≤ d ≤ 9. +Nota: si, para algunos n, f (n, d) = n +para más de un valor de d, este valor de n se cuenta de nuevo para cada valor de d para el cual f (n, d) = n. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler156() debe devolver 21295121502550. + testString: 'assert.strictEqual(euler156(), 21295121502550, "euler156() should return 21295121502550.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler156() { + // Good luck! + return true; +} + +euler156(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.spanish.md new file mode 100644 index 0000000000..35948e5e15 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f4091000cf542c50ff1c +challengeType: 5 +title: 'Problem 157: Solving the diophantine equation' +--- + +## Description +
+Considere la ecuación diofantina 1 / a + 1 / b = p / 10n con a, b, p, n enteros positivos y a ≤ b. +Para n = 1 esta ecuación tiene 20 soluciones que se enumeran a continuación: +1/1 + 1/1 = 20/10 +1/1 + 1/2 = 15/10 +1/1 + 1/5 = 12 / 10 +1/1 + 1/10 = 11/10 +1/2 + 1/2 = 10/10 +1/2 + 1/5 = 7/10 +1/2 + 1/10 = 6/10 +1/3 + 1/6 = 5/10 +1/3 + 1/15 = 4/10 +1/4 + 1/4 = 5/10 +1/4 + 1/20 = 3/10 +1 / 5 + 1/5 = 4/10 +1/5 + 1/10 = 3/10 +1/6 + 1/30 = 2/10 +1/10 + 1/10 = 2/10 +1/11 + 1/110 = 1/10 +1/12 + 1/60 = 1/10 +1/14 + 1/35 = 1/10 +1/15 + 1/30 = 1/10 +1/20 + 1 / 20 = 1/10 +¿Cuántas soluciones tiene esta ecuación para 1 ≤ n ≤ 9? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler157() debe devolver 53490. + testString: 'assert.strictEqual(euler157(), 53490, "euler157() should return 53490.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler157() { + // Good luck! + return true; +} + +euler157(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-158-exploring-strings-for-which-only-one-character-comes-lexicographically-after-its-neighbour-to-the-left.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-158-exploring-strings-for-which-only-one-character-comes-lexicographically-after-its-neighbour-to-the-left.spanish.md new file mode 100644 index 0000000000..718191bc59 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-158-exploring-strings-for-which-only-one-character-comes-lexicographically-after-its-neighbour-to-the-left.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f40a1000cf542c50ff1d +challengeType: 5 +title: 'Problem 158: Exploring strings for which only one character comes lexicographically after its neighbour to the left' +--- + +## Description +
+Tomando tres letras diferentes de las 26 letras del alfabeto, se pueden formar cadenas de caracteres de longitud tres. +ejemplos son 'abc', 'hat' y 'zyx'. +Cuando estudiamos estos tres ejemplos, vemos que para 'abc' dos personajes vienen lexicográficamente después de su vecino a la izquierda. +Para 'hat' hay exactamente un personaje que viene lexicográficamente después de su vecino a la izquierda. Para 'zyx' hay cero caracteres que vienen lexicográficamente después de su vecino a la izquierda. +En total, hay 10400 cadenas de longitud 3 para las cuales exactamente un personaje viene lexicográficamente después de su vecino a la izquierda. +Ahora consideramos cadenas de n ≤ 26 caracteres diferentes del alfabeto. +Para cada n, p (n) es el número de cadenas de longitud n para las cuales exactamente un personaje aparece lexicográficamente después de su vecino a la izquierda. +¿Cuál es el valor máximo de p (n)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler158() debe devolver 409511334375. + testString: 'assert.strictEqual(euler158(), 409511334375, "euler158() should return 409511334375.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler158() { + // Good luck! + return true; +} + +euler158(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-159-digital-root-sums-of-factorisations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-159-digital-root-sums-of-factorisations.spanish.md new file mode 100644 index 0000000000..33d4478036 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-159-digital-root-sums-of-factorisations.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f40c1000cf542c50ff1e +challengeType: 5 +title: 'Problem 159: Digital root sums of factorisations' +--- + +## Description +
+Un número compuesto puede ser factorizado de muchas maneras diferentes. +Por ejemplo, sin incluir la multiplicación por uno, 24 se puede factorizar de 7 formas distintas: + +24 = 2x2x2x3 +24 = 2x3x4 +24 = 2x2x6 +24 = 4x6 +24 = 3x8 +24 = 2x12 +24 = 24 + +Recuerde que la raíz digital de un número, en la base 10, se encuentra sumando los dígitos de ese número, +y repitiendo ese proceso hasta que se llega a un número que es menor que 10. +Por lo tanto, la raíz digital de 467 es 8 . +Llamaremos a una Suma de Raíz Digital (DRS) la suma de las raíces digitales de los factores individuales de nuestro número. +La siguiente tabla muestra todos los valores de DRS para 24. +FactorizaciónDirigital Root Sum2x2x2x3 +92x3x4 +92x2x6 +104x6 +103x8 +112x12 +524 +6La suma máxima de la raíz digital de 24 es 11. +La función mdrs (n) da el máximo Root Digital Suma de n. Entonces mdrs (24) = 11. +Encuentra ∑mdrs (n) para 1 <n <1,000,000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler159() debe devolver 14489159. + testString: 'assert.strictEqual(euler159(), 14489159, "euler159() should return 14489159.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler159() { + // Good luck! + return true; +} + +euler159(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-16-power-digit-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-16-power-digit-sum.spanish.md new file mode 100644 index 0000000000..5bd9524903 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-16-power-digit-sum.spanish.md @@ -0,0 +1,90 @@ +--- +id: 5 +localeTitle: 5900f37d1000cf542c50fe8f +challengeType: 5 +title: 'Problem 16: Power digit sum' +--- + +## Description +
+2 15 = 32768 y la suma de sus dígitos es 3 + 2 + 7 + 6 + 8 = 26. +¿Cuál es la suma de los dígitos del exponent número 2? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: powerDigitSum(15) debe devolver 26. + testString: 'assert.strictEqual(powerDigitSum(15), 26, "powerDigitSum(15) should return 26.");' + - text: powerDigitSum(128) debe devolver 166. + testString: 'assert.strictEqual(powerDigitSum(128), 166, "powerDigitSum(128) should return 166.");' + - text: powerDigitSum(1000) debe devolver 1366. + testString: 'assert.strictEqual(powerDigitSum(1000), 1366, "powerDigitSum(1000) should return 1366.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function powerDigitSum(exponent) { + // Good luck! + return true; +} + +powerDigitSum(15); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function powerDigitSum(exponent) { + const bigNum = [1]; + let sum = 0; + + for (let i = 1; i <= exponent; i++) { + let count = bigNum.length + 1; + let overflow = 0; + for (let j = 0; j < count; j++) { + let digit = bigNum[j] || 0; + digit = 2 * digit + overflow; + + if (digit > 9) { + digit -= 10; + overflow = 1; + } else { + overflow = 0; + } + + bigNum[j] = digit; + } + } + + bigNum.forEach(function(num) { + return sum += num; + }); + + return sum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-160-factorial-trailing-digits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-160-factorial-trailing-digits.spanish.md new file mode 100644 index 0000000000..61a03bbf02 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-160-factorial-trailing-digits.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f40d1000cf542c50ff1f +challengeType: 5 +title: 'Problem 160: Factorial trailing digits' +--- + +## Description +
+Para cualquier N, sea f (N) los últimos cinco dígitos antes de los ceros finales en N !. +Por ejemplo, +9! = 362880 entonces f (9) = 36288 +10! = 3628800 entonces f (10) = 36288 +20! = 2432902008176640000 entonces f (20) = 17664 +Encuentre f (1,000,000,000,000) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler160() debe devolver 16576. + testString: 'assert.strictEqual(euler160(), 16576, "euler160() should return 16576.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler160() { + // Good luck! + return true; +} + +euler160(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-161-triominoes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-161-triominoes.spanish.md new file mode 100644 index 0000000000..35919a0a1a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-161-triominoes.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f40d1000cf542c50ff20 +challengeType: 5 +title: 'Problem 161: Triominoes' +--- + +## Description +
+Un triomino es una forma que consiste en tres cuadrados unidos por los bordes. +Hay dos formas básicas: + + + +Si se tienen en cuenta todas las orientaciones posibles, hay seis: + + + +Cualquier cuadrícula n por m para la cual nxm es divisible por 3 se puede combinar con triominoes. +Si consideramos las inclinaciones que pueden obtenerse por reflexión o rotación de otro mosaico, hay 41 formas diferentes de cuadrícula de 2 por 9 con triominoes: + + + +¿De cuántas maneras se puede combinar una cuadrícula de 9 por 12 De esta manera por los triominos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler161() debe devolver 20574308184277972. + testString: 'assert.strictEqual(euler161(), 20574308184277972, "euler161() should return 20574308184277972.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler161() { + // Good luck! + return true; +} + +euler161(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-162-hexadecimal-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-162-hexadecimal-numbers.spanish.md new file mode 100644 index 0000000000..b173472a59 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-162-hexadecimal-numbers.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f40e1000cf542c50ff21 +challengeType: 5 +title: 'Problem 162: Hexadecimal numbers' +--- + +## Description +
+En el número hexadecimal, los números del sistema se representan con 16 dígitos diferentes: +0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F +El número hexadecimal AF cuando está escrito en el sistema numérico decimal es igual a 10x16 + 15 = 175. +En los números hexadecimales de 3 dígitos 10A, 1A0, A10 y A01, todos los dígitos 0,1 y A están presentes. +Números similares escritos en base diez, escribimos números hexadecimales sin ceros iniciales. +¿Cuántos números hexadecimales que contienen un máximo de dieciséis dígitos hexadecimales existen con todos los dígitos 0,1 y A presente al menos una vez? +Da tu respuesta como un número hexadecimal. +(A, B, C, D, E y F en mayúsculas, sin ningún código inicial o final que marque el número como hexadecimal y sin ceros iniciales, por ejemplo, 1A3F y no: 1a3f y no 0x1a3f y no $ 1A3F y no # 1A3F y no 0000001A3F) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler162() debe devolver 3D58725572C62302. + testString: 'assert.strictEqual(euler162(), 3D58725572C62302, "euler162() should return 3D58725572C62302.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler162() { + // Good luck! + return true; +} + +euler162(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-163-cross-hatched-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-163-cross-hatched-triangles.spanish.md new file mode 100644 index 0000000000..a0b200b67a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-163-cross-hatched-triangles.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f40f1000cf542c50ff22 +challengeType: 5 +title: 'Problem 163: Cross-hatched triangles' +--- + +## Description +
+Considere un triángulo equilátero en el que se dibujan líneas rectas desde cada vértice hasta la mitad del lado opuesto, como en el triángulo de tamaño 1 en el boceto a continuación. + +Dieciséis triángulos de diferente forma, tamaño, orientación o ubicación ahora se pueden observar en ese triángulo. Usando triángulos de tamaño 1 como bloques de construcción, se pueden formar triángulos más grandes, como el triángulo de tamaño 2 en el boceto de arriba. Ciento cuatro triángulos de diferente forma o tamaño o orientación o ubicación ahora se pueden observar en ese tamaño 2 triángulo. +Se puede observar que el triángulo de tamaño 2 contiene 4 bloques de construcción de triángulo de tamaño 1. Un triángulo de tamaño 3 contendría 9 bloques de construcción de triángulo de tamaño 1 y un triángulo de tamaño n contendría n2 bloques de construcción de triángulo de tamaño 1. +Si denotamos T (n) como el número de triángulos presentes en un triángulo de tamaño n, entonces +T (1) = 16 +T (2) = 104 +Encuentre T (36). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler163() debe devolver 343047. + testString: 'assert.strictEqual(euler163(), 343047, "euler163() should return 343047.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler163() { + // Good luck! + return true; +} + +euler163(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-164-numbers-for-which-no-three-consecutive-digits-have-a-sum-greater-than-a-given-value.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-164-numbers-for-which-no-three-consecutive-digits-have-a-sum-greater-than-a-given-value.spanish.md new file mode 100644 index 0000000000..4ed9661741 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-164-numbers-for-which-no-three-consecutive-digits-have-a-sum-greater-than-a-given-value.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f4111000cf542c50ff23 +challengeType: 5 +title: 'Problem 164: Numbers for which no three consecutive digits have a sum greater than a given value' +--- + +## Description +
+¿Cuántos números de 20 dígitos n (sin ningún cero inicial) existen de modo que no haya tres dígitos consecutivos de n que tengan una suma mayor que 9? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler164() debe devolver 378158756814587. + testString: 'assert.strictEqual(euler164(), 378158756814587, "euler164() should return 378158756814587.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler164() { + // Good luck! + return true; +} + +euler164(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-165-intersections.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-165-intersections.spanish.md new file mode 100644 index 0000000000..16bac21021 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-165-intersections.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f4111000cf542c50ff24 +challengeType: 5 +title: 'Problem 165: Intersections' +--- + +## Description +
+Un segmento está definido de forma única por sus dos puntos finales. Al considerar dos segmentos de línea en la geometría plana, hay tres posibilidades: +los segmentos tienen cero puntos, un punto o infinitos puntos en común. +Además, cuando dos segmentos tienen exactamente un punto en común, puede darse el caso de que ese punto común sea un punto final de uno de los segmentos o de ambos. Si un punto común de dos segmentos no es un punto final de cualquiera de los segmentos, es un punto interior de ambos segmentos. +Llamaremos a un punto común T de dos segmentos L1 y L2 un verdadero punto de intersección de L1 y L2 si T es el único punto común de L1 y L2 y T es un punto interior de ambos segmentos. + +Considere los tres segmentos L1, L2 y L3: +L1: (27, 44) a (12, 32) +L2: (46, 53) a (17, 62) +L3: (46, 70) a (22, 40) +Se puede verificar que los segmentos de línea L2 y L3 tienen un verdadero punto de intersección. Notamos que como uno de los puntos finales de L3: (22,40) se encuentra en L1, esto no se considera un verdadero punto de intersección. L1 y L2 no tienen un punto común. Entonces, entre los tres segmentos de línea, encontramos un verdadero punto de intersección. +Ahora hagamos lo mismo para 5000 segmentos de línea. Para este fin, generamos 20000 números utilizando el llamado generador de números pseudoaleatorios llamado "Blum Blum Shub". +s0 = 290797 +sn + 1 = sn × sn (modulo 50515093) +tn = sn (modulo 500) +Para crear cada segmento de línea, usamos cuatro números consecutivos tn. Es decir, el primer segmento de línea viene dado por: +(t1, t2) a (t3, t4) +Los primeros cuatro números calculados de acuerdo con el generador anterior deberían ser: 27, 144, 12 y 232. El primer segmento sería, por lo tanto Ser (27,144) a (12,232). +¿Cuántos puntos de intersección verdaderos distintos se encuentran entre los 5000 segmentos de línea? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler165() debe devolver 2868868. + testString: 'assert.strictEqual(euler165(), 2868868, "euler165() should return 2868868.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler165() { + // Good luck! + return true; +} + +euler165(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-166-criss-cross.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-166-criss-cross.spanish.md new file mode 100644 index 0000000000..9ae9103656 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-166-criss-cross.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4131000cf542c50ff25 +challengeType: 5 +title: 'Problem 166: Criss Cross' +--- + +## Description +
+Una cuadrícula 4x4 se llena con los dígitos d, 0 ≤ d ≤ 9. + +Se puede ver que en la cuadrícula + + +6 3 3 0 +5 0 4 3 +0 7 1 4 +1 2 4 5 + +la suma de cada fila y cada columna tiene el valor 12. Además, la suma de cada diagonal también es 12. + +¿De cuántas maneras puedes llenar una cuadrícula de 4x4 con los dígitos d, 0 ≤ d ≤ 9 para que cada fila, Cada columna, y ambas diagonales tienen la misma suma? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler166() debe devolver 7130034. + testString: 'assert.strictEqual(euler166(), 7130034, "euler166() should return 7130034.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler166() { + // Good luck! + return true; +} + +euler166(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-167-investigating-ulam-sequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-167-investigating-ulam-sequences.spanish.md new file mode 100644 index 0000000000..75feb9d4ba --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-167-investigating-ulam-sequences.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4141000cf542c50ff26 +challengeType: 5 +title: 'Problem 167: Investigating Ulam sequences' +--- + +## Description +
+Para dos enteros positivos a y b, la secuencia Ulam U (a, b) se define por U (a, b) 1 = a, U (a, b) 2 = by para k> 2, +U (a , b) k es el entero más pequeño mayor que U (a, b) (k-1) que puede escribirse exactamente de una manera como la suma de dos miembros anteriores distintos de U (a, b). +Por ejemplo, la secuencia U (1,2) comienza con +1, 2, 3 = 1 + 2, 4 = 1 + 3, 6 = 2 + 4, 8 = 2 + 6, 11 = 3 + 8; +5 no le pertenece porque 5 = 1 + 4 = 2 + 3 tiene dos representaciones como la suma de dos miembros anteriores, del mismo modo 7 = 1 + 6 = 3 + 4. +Encuentra ∑U (2,2n + 1) k para 2 ≤ n ≤10, donde k = 1011. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler167() debe devolver 3916160068885. + testString: 'assert.strictEqual(euler167(), 3916160068885, "euler167() should return 3916160068885.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler167() { + // Good luck! + return true; +} + +euler167(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-168-number-rotations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-168-number-rotations.spanish.md new file mode 100644 index 0000000000..e8728b3235 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-168-number-rotations.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f4151000cf542c50ff27 +challengeType: 5 +title: 'Problem 168: Number Rotations' +--- + +## Description +
+Considere el número 142857. Podemos rotar a la derecha este número moviendo el último dígito (7) hacia el frente, dándonos 714285. +Se puede verificar que 714285 = 5 × 142857. +Esto demuestra una propiedad inusual de 142857: es un divisor de su rotación hacia la derecha. +Encuentre los últimos 5 dígitos de la suma de todos los enteros n, 10 <n <10100, que tienen esta propiedad. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler168() debe devolver 59206. + testString: 'assert.strictEqual(euler168(), 59206, "euler168() should return 59206.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler168() { + // Good luck! + return true; +} + +euler168(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md new file mode 100644 index 0000000000..9bef1bdc57 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4151000cf542c50ff28 +challengeType: 5 +title: 'Problem 169: Exploring the number of different ways a number can be expressed as a sum of powers of 2' +--- + +## Description +
+Defina f (0) = 1 y f (n) para que sea el número de formas diferentes en que n puede expresarse como una suma de potencias enteras de 2 utilizando cada potencia no más de dos veces. +Por ejemplo, f (10) = 5 ya que hay cinco formas diferentes de expresar 10: +1 + 1 + 8 +1 + 1 + 4 + 41 + 1 + 2 + 2 + 4 +2 + 4 + 4 +2 + 8 +¿Qué es f (1025)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler169() debe devolver 178653872807. + testString: 'assert.strictEqual(euler169(), 178653872807, "euler169() should return 178653872807.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler169() { + // Good luck! + return true; +} + +euler169(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-17-number-letter-counts.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-17-number-letter-counts.spanish.md new file mode 100644 index 0000000000..752ab5a679 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-17-number-letter-counts.spanish.md @@ -0,0 +1,135 @@ +--- +id: 5 +localeTitle: 5900f37d1000cf542c50fe90 +challengeType: 5 +title: 'Problem 17: Number letter counts' +--- + +## Description +
+Si los números del 1 al 5 están escritos en palabras: uno, dos, tres, cuatro, cinco, entonces hay 3 + 3 + 5 + 4 + 4 = 19 letras usadas en total. +Si todos los números desde 1 hasta el limit especificado se escribieran en palabras, ¿cuántas letras se usarían? +NOTA: No cuente espacios o guiones. Por ejemplo, 342 (trescientos cuarenta y dos) contiene 23 letras y 115 (ciento quince) contiene 20 letras. El uso de "y" al escribir números cumple con el uso británico. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: numberLetterCounts(5) debe devolver 19. + testString: 'assert.strictEqual(numberLetterCounts(5), 19, "numberLetterCounts(5) should return 19.");' + - text: numberLetterCounts(150) debe devolver 1903. + testString: 'assert.strictEqual(numberLetterCounts(150), 1903, "numberLetterCounts(150) should return 1903.");' + - text: numberLetterCounts(1000) debe devolver 21124. + testString: 'assert.strictEqual(numberLetterCounts(1000), 21124, "numberLetterCounts(1000) should return 21124.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function numberLetterCounts(limit) { + // Good luck! + return true; +} + +numberLetterCounts(5); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function numberLetterCounts(limit) { + const dictionary = { + 0: ", + 1: 'one', + 2: 'two', + 3: 'three', + 4: 'four', + 5: 'five', + 6: 'six', + 7: 'seven', + 8: 'eight', + 9: 'nine', + 10: 'ten', + 11: 'eleven', + 12: 'twelve', + 13: 'thirteen', + 14: 'fourteen', + 15: 'fifteen', + 16: 'sixteen', + 17: 'seventeen', + 18: 'eighteen', + 19: 'nineteen', + 20: 'twenty', + 30: 'thirty', + 40: 'forty', + 50: 'fifty', + 60: 'sixty', + 70: 'seventy', + 80: 'eighty', + 90: 'ninety', + 1000: 'onethousand' + }; + + let numString = "; + + function convertToString(num) { + // check dictionary for number + if (dictionary[num]) { + return dictionary[num]; + } else { + const hundreds = Math.floor(num / 100); + const tens = Math.floor((num / 10) % 10) * 10; + const remainder = num % 10; + + let tempStr = "; + + if (hundreds === 0) { + tempStr += dictionary[tens] + dictionary[remainder]; + } else { + tempStr += dictionary[hundreds] + 'hundred'; + + if (tens !== 0 || remainder !== 0) { + tempStr += 'and'; + } + + if (tens < 20) { + const lessThanTwenty = tens + remainder; + tempStr += dictionary[lessThanTwenty]; + } else { + tempStr += dictionary[tens] + dictionary[remainder]; + } + } + // console.log(num, hundreds, tens, remainder); + return tempStr; + } + } + + for (let i = 1; i <= limit; i++) { + numString += convertToString(i); + } + return numString.length; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-170-find-the-largest-0-to-9-pandigital-that-can-be-formed-by-concatenating-products.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-170-find-the-largest-0-to-9-pandigital-that-can-be-formed-by-concatenating-products.spanish.md new file mode 100644 index 0000000000..9e3a1a429c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-170-find-the-largest-0-to-9-pandigital-that-can-be-formed-by-concatenating-products.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4161000cf542c50ff29 +challengeType: 5 +title: 'Problem 170: Find the largest 0 to 9 pandigital that can be formed by concatenating products' +--- + +## Description +
+Tome el número 6 y multiplíquelo por cada uno de 1273 y 9854: + +6 × 1273 = 7638 +6 × 9854 = 59124 + +Al concatenar estos productos, obtenemos del 1 al 9 pandigital 763859124. Llamaremos 763859124 al "concatenado". Producto de 6 y (1273,9854) ". Observe también que la concatenación de los números de entrada, 612739854, también es de 1 a 9 pandigital. + +Lo mismo se puede hacer para 0 a 9 números pandigitales. + +¿Cuál es el mayor producto concatenado pandigital de 10 a 10 dígitos de un número entero con dos o más enteros más, de modo que la concatenación de los números de entrada es también un número pandigital de 0 a 9 dígitos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler170() debe devolver 9857164023. + testString: 'assert.strictEqual(euler170(), 9857164023, "euler170() should return 9857164023.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler170() { + // Good luck! + return true; +} + +euler170(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-171-finding-numbers-for-which-the-sum-of-the-squares-of-the-digits-is-a-square.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-171-finding-numbers-for-which-the-sum-of-the-squares-of-the-digits-is-a-square.spanish.md new file mode 100644 index 0000000000..8cf5374737 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-171-finding-numbers-for-which-the-sum-of-the-squares-of-the-digits-is-a-square.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4181000cf542c50ff2a +challengeType: 5 +title: 'Problem 171: Finding numbers for which the sum of the squares of the digits is a square' +--- + +## Description +
+Para un entero positivo n, sea f (n) la suma de los cuadrados de los dígitos (en la base 10) de n, por ejemplo, +f (3) = 32 = 9, +f (25) = 22 + 52 = 4 + 25 = 29, +f (442) = 42 + 42 + 22 = 16 + 16 + 4 = 36 +Encuentre los últimos nueve dígitos de la suma de todos n, 0 <n <1020, de manera que f (n) Es un cuadrado perfecto. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler171() debe devolver 142989277. + testString: 'assert.strictEqual(euler171(), 142989277, "euler171() should return 142989277.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler171() { + // Good luck! + return true; +} + +euler171(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-172-investigating-numbers-with-few-repeated-digits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-172-investigating-numbers-with-few-repeated-digits.spanish.md new file mode 100644 index 0000000000..842f19e9d1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-172-investigating-numbers-with-few-repeated-digits.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f4181000cf542c50ff2b +challengeType: 5 +title: 'Problem 172: Investigating numbers with few repeated digits' +--- + +## Description +
+¿Cuántos números de 18 dígitos n (sin ceros a la izquierda) hay de tal manera que no aparezca un dígito más de tres veces en n? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler172() debe devolver 227485267000992000. + testString: 'assert.strictEqual(euler172(), 227485267000992000, "euler172() should return 227485267000992000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler172() { + // Good luck! + return true; +} + +euler172(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-173-using-up-to-one-million-tiles-how-many-different-hollow-square-laminae-can-be-formed.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-173-using-up-to-one-million-tiles-how-many-different-hollow-square-laminae-can-be-formed.spanish.md new file mode 100644 index 0000000000..b7807aed85 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-173-using-up-to-one-million-tiles-how-many-different-hollow-square-laminae-can-be-formed.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f41a1000cf542c50ff2c +challengeType: 5 +title: 'Problem 173: Using up to one million tiles how many different "hollow" square laminae can be formed?' +--- + +## Description +
+Definiremos una lámina cuadrada como un contorno cuadrado con un "orificio" cuadrado de modo que la forma posea simetría vertical y horizontal. Por ejemplo, utilizando exactamente treinta y dos baldosas cuadradas podemos formar dos láminas cuadradas diferentes: + + +Con cien baldosas, y no necesariamente usando todas las baldosas a la vez, es posible formar cuarenta y una láminas cuadradas diferentes . +Usando hasta un millón de baldosas, ¿cuántas láminas cuadradas diferentes se pueden formar? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler173() debe devolver 1572729. + testString: 'assert.strictEqual(euler173(), 1572729, "euler173() should return 1572729.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler173() { + // Good luck! + return true; +} + +euler173(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-174-counting-the-number-of-hollow-square-laminae-that-can-form-one-two-three-...-distinct-arrangements.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-174-counting-the-number-of-hollow-square-laminae-that-can-form-one-two-three-...-distinct-arrangements.spanish.md new file mode 100644 index 0000000000..043813956b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-174-counting-the-number-of-hollow-square-laminae-that-can-form-one-two-three-...-distinct-arrangements.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f41a1000cf542c50ff2d +challengeType: 5 +title: 'Problem 174: Counting the number of "hollow" square laminae that can form one, two, three, ... distinct arrangements' +--- + +## Description +
+Definiremos una lámina cuadrada como un contorno cuadrado con un "orificio" cuadrado de modo que la forma posea simetría vertical y horizontal. +Dadas ocho fichas es posible formar una lámina de una sola manera: cuadrado 3x3 con un orificio 1x1 en el medio. Sin embargo, utilizando treinta y dos baldosas es posible formar dos láminas distintas. + + +Si t representa el número de mosaicos utilizados, diremos que t = 8 es el tipo L (1) y t = 32 es el tipo L (2). +Sea N (n) el número de t ≤ 1000000, de manera que t sea tipo L (n); por ejemplo, N (15) = 832. +¿Qué es ∑ N (n) para 1 ≤ n ≤ 10? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler174() debe devolver 209566. + testString: 'assert.strictEqual(euler174(), 209566, "euler174() should return 209566.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler174() { + // Good luck! + return true; +} + +euler174(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-175-fractions-involving-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-175-fractions-involving-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md new file mode 100644 index 0000000000..f9be2331d3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-175-fractions-involving-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f41c1000cf542c50ff2e +challengeType: 5 +title: 'Problem 175: Fractions involving the number of different ways a number can be expressed as a sum of powers of 2' +--- + +## Description +
+Defina f (0) = 1 y f (n) como el número de formas de escribir n como una suma de potencias de 2 donde no se produce potencia más de dos veces. + +Por ejemplo, f (10) = 5 ya que hay cinco formas diferentes de expresar 10:10 = 8 + 2 = 8 + 1 + 1 = 4 + 4 + 2 = 4 + 2 + 2 + 1 + 1 = 4 + 4 + 1 + 1 + +Se puede mostrar que para cada fracción p / q (p> 0, q> 0) existe al menos un entero n tal que f (n) / f (n-1) = p / q. +Por ejemplo, la n más pequeña para la cual f (n) / f (n-1) = 13/17 es 241. +La expansión binaria de 241 es 11110001. +Leyendo este número binario del bit más significativo al menos significativo Bit hay 4 de uno, 3 ceros y 1 de uno. Llamaremos a la cadena 4,3,1 la Expansión Binaria Acortada de 241. +Halla la Expansión Binaria Acortada de la n más pequeña para la cual f (n) / f (n-1) = 123456789/987654321. +Da tu respuesta como enteros separados por comas, sin espacios en blanco. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' euler175() debe devolver 1, 13717420, 8.' + testString: 'assert.strictEqual(euler175(), 1, 13717420, 8, "euler175() should return 1, 13717420, 8.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler175() { + // Good luck! + return true; +} + +euler175(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-176-right-angled-triangles-that-share-a-cathetus.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-176-right-angled-triangles-that-share-a-cathetus.spanish.md new file mode 100644 index 0000000000..dcfed6655b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-176-right-angled-triangles-that-share-a-cathetus.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f41c1000cf542c50ff2f +challengeType: 5 +title: 'Problem 176: Right-angled triangles that share a cathetus' +--- + +## Description +
+Los cuatro triángulos en ángulo recto con lados (9,12,15), (12,16,20), (5,12,13) ​​y (12,35,37) tienen uno de los lados más cortos (catheti) igual a 12. Se puede mostrar que no existe ningún otro triángulo de ángulo recto de un entero con uno de los catetos igual a 12. +Encuentre el entero más pequeño que puede tener la longitud de un cateto de exactamente 47547 triángulos rectos con ángulo de enteros diferentes diferentes . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler176() debe devolver 96818198400000. + testString: 'assert.strictEqual(euler176(), 96818198400000, "euler176() should return 96818198400000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler176() { + // Good luck! + return true; +} + +euler176(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-177-integer-angled-quadrilaterals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-177-integer-angled-quadrilaterals.spanish.md new file mode 100644 index 0000000000..b6195e2ec2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-177-integer-angled-quadrilaterals.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f41e1000cf542c50ff30 +challengeType: 5 +title: 'Problem 177: Integer angled Quadrilaterals' +--- + +## Description +
+Deje que ABCD sea un cuadrilátero convexo, con diagonales AC y BD. En cada vértice, la diagonal forma un ángulo con cada uno de los dos lados, creando ocho ángulos de esquina. + +Por ejemplo, en el vértice A, los dos ángulos son CAD, CAB. +Llamamos a este cuadrilátero para el cual los ocho ángulos de las esquinas tienen valores enteros cuando se miden en grados, un "cuadrilátero en ángulo entero". Un ejemplo de un cuadrilátero en ángulo entero es un cuadrado, donde los ocho ángulos de las esquinas son 45 °. Otro ejemplo está dado por DAC = 20 °, BAC = 60 °, ABD = 50 °, CDB = 30 °, BCA = 40 °, DCA = 30 °, CDB = 80 °, ADB = 50 °. +¿Cuál es el número total de cuadriláteros en ángulo enteros no similares? +Nota: En sus cálculos, puede suponer que un ángulo calculado es integral si está dentro de una tolerancia de 10-9 de un valor entero. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler177() debe devolver 129325. + testString: 'assert.strictEqual(euler177(), 129325, "euler177() should return 129325.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler177() { + // Good luck! + return true; +} + +euler177(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-178-step-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-178-step-numbers.spanish.md new file mode 100644 index 0000000000..8c323bff66 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-178-step-numbers.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f41e1000cf542c50ff31 +challengeType: 5 +title: 'Problem 178: Step Numbers' +--- + +## Description +
+Considere el número 45656. +Se puede ver que cada par de dígitos consecutivos de 45656 tiene una diferencia de uno. +Un número para el que cada par de dígitos consecutivos tiene una diferencia de uno se llama un número de paso. +Un número pandigital contiene cada dígito decimal de 0 a 9 al menos una vez. + +¿Cuántos números de paso pandigital menores que 1040 hay? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler178() debe devolver 126461847755. + testString: 'assert.strictEqual(euler178(), 126461847755, "euler178() should return 126461847755.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler178() { + // Good luck! + return true; +} + +euler178(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-179-consecutive-positive-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-179-consecutive-positive-divisors.spanish.md new file mode 100644 index 0000000000..d529cb02e2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-179-consecutive-positive-divisors.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f41f1000cf542c50ff32 +challengeType: 5 +title: 'Problem 179: Consecutive positive divisors' +--- + +## Description +
+Encuentre el número de enteros 1 <n <107, para los que n y n + 1 tienen el mismo número de divisores positivos. Por ejemplo, 14 tiene los divisores positivos 1, 2, 7, 14, mientras que 15 tiene 1, 3, 5, 15. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler179() debe devolver 986262. + testString: 'assert.strictEqual(euler179(), 986262, "euler179() should return 986262.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler179() { + // Good luck! + return true; +} + +euler179(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-18-maximum-path-sum-i.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-18-maximum-path-sum-i.spanish.md new file mode 100644 index 0000000000..a5eafdf39f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-18-maximum-path-sum-i.spanish.md @@ -0,0 +1,97 @@ +--- +id: 5 +localeTitle: 5900f37e1000cf542c50fe91 +challengeType: 5 +title: 'Problem 18: Maximum path sum I' +--- + +## Description +
+Al comenzar en la parte superior del triángulo de abajo y pasar a los números adyacentes en la fila de abajo, el total máximo de arriba a abajo es 23. +3
7 4
2 4 6
8 5 9 3
+Es decir, 3 + 7 + 4 + 9 = 23. +Encuentre el total máximo de arriba a abajo del triángulo a continuación: +75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
99 65 04 28 06 16 70 92
41 41 26 56 83 40 80 70 33
41 48 72 33 47 32 37 16 94 29
53 71 44 65 25 43 91 52 97 51 14
70 11 33 28 77 73 17 78 39 68 17 57
91 71 52 38 17 14 91 43 58 50 27 29 48
63 66 04 68 89 53 67 30 73 16 69 87 40 31
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23
+NOTA: Como solo hay 16384 rutas, es posible resolver este problema probando cada ruta. Sin embargo, el Problema 67, es el mismo desafío con un triángulo que contiene cien filas; no se puede resolver por fuerza bruta, y requiere un método inteligente! ; o) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: maximumPathSumI(testTriangle) debe devolver 23. + testString: 'assert.strictEqual(maximumPathSumI(testTriangle), 23, "maximumPathSumI(testTriangle) should return 23.");' + - text: maximumPathSumI(numTriangle) debe devolver 1074. + testString: 'assert.strictEqual(maximumPathSumI(numTriangle), 1074, "maximumPathSumI(numTriangle) should return 1074.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function maximumPathSumI(triangle) { + // Good luck! + return true; +} + +const testTriangle = [[3, 0, 0, 0], + [7, 4, 0, 0], + [2, 4, 6, 0], + [8, 5, 9, 3]]; + +maximumPathSumI(testTriangle); +``` + +
+ +### Before Test +
+ +```js +const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]]; +``` + +
+ + +
+ +## Solution +
+ + +```js +const testTriangle = [[3, 0, 0, 0], + [7, 4, 0, 0], + [2, 4, 6, 0], + [8, 5, 9, 3]]; + +function maximumPathSumI(triangle) { + let maxSum = triangle.slice(); + + for (let i = triangle.length - 1; i > 0; i--) { + let currentRow = maxSum[i]; + let previousRow = maxSum[i - 1]; + const temp = []; + for (let j = 0; j < i; j++) { + temp.push(Math.max((currentRow[j] + previousRow[j]), (currentRow[j + 1] + previousRow[j]))); + } + maxSum[i - 1] = temp; + maxSum.pop(); + } + return maxSum[0][0]; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.spanish.md new file mode 100644 index 0000000000..f78c3762a4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4201000cf542c50ff33 +challengeType: 5 +title: 'Problem 180: Rational zeros of a function of three variables' +--- + +## Description +
+Para cualquier entero n, considere las tres funciones +f1, n (x, y, z) = xn + 1 + yn + 1 - zn + 1f2, n (x, y, z) = (xy + yz + zx) * (xn-1 + yn-1 - zn-1) f3, n (x, y, z) = xyz * (xn-2 + yn-2 - zn-2) +y su combinación +fn (x, y , z) = f1, n (x, y, z) + f2, n (x, y, z) - f3, n (x, y, z) +Llamamos (x, y, z) un triple dorado de orden k si x, y, y z son todos números racionales de la forma a / b con +0 <a <b ≤ k y hay (al menos) un entero n, de modo que fn (x, y, z) = 0. +Sea s (x, y, z) = x + y + z. +Sea t = u / v la suma de todos los s distintos (x, y, z) para todos los triples dorados (x, y, z) de orden 35. Todos los s (x, y, z) yt deben ser En forma reducida. +Encuentra u + v. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler180() debe devolver 285196020571078980. + testString: 'assert.strictEqual(euler180(), 285196020571078980, "euler180() should return 285196020571078980.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler180() { + // Good luck! + return true; +} + +euler180(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.spanish.md new file mode 100644 index 0000000000..6bb52f2162 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f4231000cf542c50ff34 +challengeType: 5 +title: 'Problem 181: Investigating in how many ways objects of two different colours can be grouped' +--- + +## Description +
+Teniendo tres objetos negros B y un objeto blanco W, se pueden agrupar de 7 formas como esta: +(BBBW) (B, BBW) (B, B, BW) (B, B, B, W) +(B, BB, W) (BBB, W) (BB, BW) +¿De cuántas maneras se pueden agrupar sesenta objetos negros B y cuarenta objetos blancos W? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler181() debe devolver 83735848679360670. + testString: 'assert.strictEqual(euler181(), 83735848679360670, "euler181() should return 83735848679360670.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler181() { + // Good luck! + return true; +} + +euler181(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-183-maximum-product-of-parts.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-183-maximum-product-of-parts.spanish.md new file mode 100644 index 0000000000..da6c8bdac0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-183-maximum-product-of-parts.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4231000cf542c50ff36 +challengeType: 5 +title: 'Problem 183: Maximum product of parts' +--- + +## Description +
+Sea N un entero positivo y sea N dividido en k partes iguales, r = N / k, de modo que N = r + r + ... + r. +Sea P el producto de estas partes, P = r × r × ... × r = rk. + +Por ejemplo, si 11 se divide en cinco partes iguales, 11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2, entonces P = 2.25 = 51.53632. + +Sea M (N) = Pmax para un valor dado de N. + +Resulta que el máximo para N = 11 se encuentra dividiendo once en cuatro partes iguales, lo que lleva a Pmax = (11/4) 4; es decir, M (11) = 14641/256 = 57.19140625, que es un decimal de terminación. + +Sin embargo, para N = 8, el máximo se logra dividiéndolo en tres partes iguales, por lo que M (8) = 512/27, que es un decimal sin terminación. + +Deje D (N) = N si M (N) es un decimal no terminado y D (N) = -N si M (N) es un decimal terminal. + +Por ejemplo, ΣD (N) para 5 ≤ N ≤ 100 es 2438. + +Encuentre ΣD (N) para 5 ≤ N ≤ 10000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler183() debe devolver 48861552. + testString: 'assert.strictEqual(euler183(), 48861552, "euler183() should return 48861552.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler183() { + // Good luck! + return true; +} + +euler183(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-184-triangles-containing-the-origin.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-184-triangles-containing-the-origin.spanish.md new file mode 100644 index 0000000000..684be6362c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-184-triangles-containing-the-origin.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4241000cf542c50ff37 +challengeType: 5 +title: 'Problem 184: Triangles containing the origin' +--- + +## Description +
+Considere el conjunto Ir de puntos (x, y) con coordenadas enteras en el interior del círculo con radio r, centrado en el origen, es decir, x2 + y2 <r2. +Para un radio de 2, I2 contiene los nueve puntos (0,0), (1,0), (1,1), (0,1), (-1,1), (-1,0), (-1, -1), (0, -1) y (1, -1). Hay ocho triángulos con los tres vértices en I2 que contienen el origen en el interior. Dos de ellos se muestran a continuación, los otros se obtienen de estos por rotación. + + +Para un radio de 3, hay 360 triángulos que contienen el origen en el interior y tienen todos los vértices en I3 y para I5 el número es 10600. + +¿Cuántos triángulos hay que contienen el origen en el interior y tienen los tres ¿Vértices en I105? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler184() debe devolver 1725323624056. + testString: 'assert.strictEqual(euler184(), 1725323624056, "euler184() should return 1725323624056.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler184() { + // Good luck! + return true; +} + +euler184(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-185-number-mind.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-185-number-mind.spanish.md new file mode 100644 index 0000000000..375c8141d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-185-number-mind.spanish.md @@ -0,0 +1,93 @@ +--- +id: 5 +localeTitle: 5900f4251000cf542c50ff38 +challengeType: 5 +title: 'Problem 185: Number Mind' +--- + +## Description +
+El juego Number Mind es una variante del conocido juego Master Mind. +En lugar de clavijas de colores, debes adivinar una secuencia secreta de dígitos. Después de cada conjetura solo se te dice en cuántos lugares has adivinado el dígito correcto. Entonces, si la secuencia era 1234 y adivinaste 2036, te dirían que tienes un dígito correcto; sin embargo, NO se le dirá que también tiene otro dígito en el lugar equivocado. + +Por ejemplo, dadas las siguientes conjeturas para una secuencia secreta de 5 dígitos, +90342; 2 correcta +70794; 0 correcta +39458; 2 correcta +34109; 1 correcta +51545; 2 correcta +12531; 1 correcta +La correcta La secuencia 39542 es única. + +Basado en las siguientes suposiciones, + +5616185650518293; 2 correcta +3847439647293047; 1 correcta +5855462940810587; 3 correcta +9742855507068353; 3 correcta +4296849643607543; 3 correcta +3174248439465858; 1 correcta +4513559094146117; 2 correcta +7890971548908067; 3 correcta +8157356344118483; 1 correcta +2615250744386899; 2 correcta +8690095851526254; 3 correcta +6375711915077050; 1 correcta +6913859173121360; 1 correcta +6442889055042768; 2 correcta +2321386104303845; 0 correcta +2326509471271448; 2 correcta +5251583379644322; 2 correcta +1748270476758276; 3 correcta +4895722652190306; 1 correcto +3041631117224635; 3 correcto +1841236454324589; 3 correcto +2659862637316867; 2 correcto + +Encuentra la secuencia secreta única de 16 dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler185() debe devolver 4640261571849533. + testString: 'assert.strictEqual(euler185(), 4640261571849533, "euler185() should return 4640261571849533.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler185() { + // Good luck! + return true; +} + +euler185(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-186-connectedness-of-a-network.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-186-connectedness-of-a-network.spanish.md new file mode 100644 index 0000000000..588f08ae8f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-186-connectedness-of-a-network.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4281000cf542c50ff39 +challengeType: 5 +title: 'Problem 186: Connectedness of a network' +--- + +## Description +
+Aquí están los registros de un sistema telefónico ocupado con un millón de usuarios: + +RecNrCallerCalled120000710005326001835004393600863701497 ......... +El número de teléfono de la persona que llama y el número llamado en el registro n son Caller (n) = S2n-1 y Llamado (n) = S2n donde S1,2,3, ... proviene del "Generador de Fibonacci Rezagado": + +Para 1 ≤ k ≤ 55, Sk = [100003 - 200003k + 300007k3] (módulo 1000000) +Para 56 ≤ k, Sk = [Sk-24 + Sk-55] (módulo 1000000) + +Si la persona que llama (n) = Called (n), se supone que el usuario ha marcado incorrectamente y la llamada falla; De lo contrario la llamada es exitosa. + +Desde el inicio de los registros, decimos que cualquier par de usuarios X e Y son amigos si X llama a Y o viceversa. De manera similar, X es amigo de un amigo de Z si X es amigo de Y e Y es amigo de Z; y así sucesivamente para cadenas más largas. + +El número de teléfono del Primer Ministro es 524287. ¿Después de cuántas llamadas exitosas, sin contar los errores de marcación, el 99% de los usuarios (incluido el Primer Ministro) será un amigo, o un amigo de un amigo, etc., del Primer Ministro? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler186() debe devolver 2325629. + testString: 'assert.strictEqual(euler186(), 2325629, "euler186() should return 2325629.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler186() { + // Good luck! + return true; +} + +euler186(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-187-semiprimes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-187-semiprimes.spanish.md new file mode 100644 index 0000000000..aae07cced9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-187-semiprimes.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4291000cf542c50ff3a +challengeType: 5 +title: 'Problem 187: Semiprimes' +--- + +## Description +
+Un compuesto es un número que contiene al menos dos factores primos. Por ejemplo, 15 = 3 × 5; 9 = 3 × 3; 12 = 2 × 2 × 3. + +Hay diez compuestos por debajo de treinta que contienen precisamente dos factores primos, no necesariamente distintos: +4, 6, 9, 10, 14, 15, 21, 22, 25, 26. + +¿Cuántos enteros compuestos, n <108, tienen exactamente dos factores primos, no necesariamente distintos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler187() debe devolver 17427258. + testString: 'assert.strictEqual(euler187(), 17427258, "euler187() should return 17427258.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler187() { + // Good luck! + return true; +} + +euler187(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-188-the-hyperexponentiation-of-a-number.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-188-the-hyperexponentiation-of-a-number.spanish.md new file mode 100644 index 0000000000..f9205aa826 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-188-the-hyperexponentiation-of-a-number.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4291000cf542c50ff3b +challengeType: 5 +title: 'Problem 188: The hyperexponentiation of a number' +--- + +## Description +
+La hipereexposición o tetración de un número a por un entero positivo b, denotado por ↑↑ b o ba, se define recursivamente por: +a ↑↑ 1 = a, +a ↑↑ (k + 1) = a (a ↑↑ k). + +Así tenemos, por ejemplo, 3 ↑↑ 2 = 33 = 27, por lo tanto, 3 ↑↑ 3 = 327 = 7625597484987 y 3 ↑↑ 4 es aproximadamente 103.6383346400240996 * 10 ^ 12. +Encuentra los últimos 8 dígitos de 1777 ↑↑ 1855. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler188() debe devolver 95962097. + testString: 'assert.strictEqual(euler188(), 95962097, "euler188() should return 95962097.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler188() { + // Good luck! + return true; +} + +euler188(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-189-tri-colouring-a-triangular-grid.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-189-tri-colouring-a-triangular-grid.spanish.md new file mode 100644 index 0000000000..4dd8895cba --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-189-tri-colouring-a-triangular-grid.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4291000cf542c50ff3c +challengeType: 5 +title: 'Problem 189: Tri-colouring a triangular grid' +--- + +## Description +
+Considere la siguiente configuración de 64 triángulos: + + + +Deseamos colorear el interior de cada triángulo con uno de tres colores: rojo, verde o azul, para que no haya dos triángulos vecinos del mismo color. Tal coloración se llamará válida. Aquí, se dice que dos triángulos son vecinos si comparten un borde. +Nota: si solo comparten un vértice, entonces no son vecinos. + +Por ejemplo, aquí hay una coloración válida de la cuadrícula anterior: + + +Una coloración C 'que se obtiene de una coloración C por rotación o reflexión se considera distinta de C a menos que las dos sean idénticas. + +¿Cuántos colores válidos distintos hay para la configuración anterior? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler189() debe devolver 10834893628237824. + testString: 'assert.strictEqual(euler189(), 10834893628237824, "euler189() should return 10834893628237824.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler189() { + // Good luck! + return true; +} + +euler189(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-19-counting-sundays.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-19-counting-sundays.spanish.md new file mode 100644 index 0000000000..d1cd854c60 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-19-counting-sundays.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f37f1000cf542c50fe92 +challengeType: 5 +title: 'Problem 19: Counting Sundays' +--- + +## Description +
+Se le proporciona la siguiente información, pero es posible que prefiera hacer una investigación por sí mismo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' countingSundays(1943, 1946) debe devolver 6.' + testString: 'assert.strictEqual(countingSundays(1943, 1946), 6, "countingSundays(1943, 1946) should return 6.");' + - text: ' countingSundays(1995, 2000) debe devolver 9.' + testString: 'assert.strictEqual(countingSundays(1995, 2000), 9, "countingSundays(1995, 2000) should return 9.");' + - text: ' countingSundays(1901, 2000) debe devolver 171.' + testString: 'assert.strictEqual(countingSundays(1901, 2000), 171, "countingSundays(1901, 2000) should return 171.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function countingSundays(firstYear, lastYear) { + // Good luck! + return true; +} + +countingSundays(1943, 1946); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function countingSundays(firstYear, lastYear) { + let sundays = 0; + + for (let year = firstYear; year <= lastYear; year++) { + for (let month = 1; month <= 12; month++) { + const thisDate = new Date(year, month, 1); + if (thisDate.getDay() === 0) { + sundays++; + } + } + } + return sundays; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.spanish.md new file mode 100644 index 0000000000..0da8b3243e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f42b1000cf542c50ff3d +challengeType: 5 +title: 'Problem 190: Maximising a weighted product' +--- + +## Description +
+Sea Sm = (x1, x2, ..., xm) la m-tupla de números reales positivos con x1 + x2 + ... + xm = m para la cual Pm = x1 * x22 * ... * xmm es maximizado + +Por ejemplo, se puede verificar que [P10] = 4112 ([] es la función de la parte entera). + +Encuentra Σ [Pm] para 2 ≤ m ≤ 15. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler190() debe devolver 371048281. + testString: 'assert.strictEqual(euler190(), 371048281, "euler190() should return 371048281.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler190() { + // Good luck! + return true; +} + +euler190(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-191-prize-strings.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-191-prize-strings.spanish.md new file mode 100644 index 0000000000..6265f92611 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-191-prize-strings.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f42b1000cf542c50ff3e +challengeType: 5 +title: 'Problem 191: Prize Strings' +--- + +## Description +
+Una escuela en particular ofrece recompensas en efectivo a los niños con buena asistencia y puntualidad. Si están ausentes por tres días consecutivos o tarde en más de una ocasión, pierden su premio. + +Durante un período de n días, se forma una cadena trinaria para cada niño que consta de L's (tarde), O's (a tiempo) y A's (ausente). + +Aunque se pueden formar ochenta y una cadenas trinarias durante un período de 4 días, exactamente cuarenta y tres cadenas darían lugar a un premio: + +OOOO OOOA OOOL OOAO OOA OOAL OOLO OOLA OAOO OAOA +OAOL OAAO OAAL OALA OALA OALA OLOO OLOA OLAO OLAA AOOO +AOOA AOOL AOAO AOAA AOAL AOLO AOLA AAOO AAOA AAOL +AALO AALA ALOO ALOA ALAA LOOO LOOA LOOA LOAO LOAA +LAOO LAOA LAAO + +¿Cuántos "premios" existen en un día? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler191() debe devolver 1918080160. + testString: 'assert.strictEqual(euler191(), 1918080160, "euler191() should return 1918080160.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler191() { + // Good luck! + return true; +} + +euler191(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-192-best-approximations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-192-best-approximations.spanish.md new file mode 100644 index 0000000000..d7741c9c37 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-192-best-approximations.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f42c1000cf542c50ff3f +challengeType: 5 +title: 'Problem 192: Best Approximations' +--- + +## Description +
+Sea x un número real. +Una mejor aproximación a x para el denominador enlazado d es un número racional r / s en forma reducida, con s ≤ d, de modo que cualquier número racional que esté más cerca de x que r / s tenga un denominador mayor que d: + +| p / qx | <| r / sx | ⇒ q> d + +Por ejemplo, la mejor aproximación a √13 para el límite del denominador 20 es 18/5 y la mejor aproximación a √13 para el límite del denominador 30 es 101/28. + +Encuentre la suma de todos los denominadores de las mejores aproximaciones a √n para el denominador unido 1012, donde n no es un cuadrado perfecto y 1 <n ≤ 100000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler192() debe devolver 57060635927998344. + testString: 'assert.strictEqual(euler192(), 57060635927998344, "euler192() should return 57060635927998344.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler192() { + // Good luck! + return true; +} + +euler192(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-193-squarefree-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-193-squarefree-numbers.spanish.md new file mode 100644 index 0000000000..cd86e5d059 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-193-squarefree-numbers.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f42f1000cf542c50ff41 +challengeType: 5 +title: 'Problem 193: Squarefree Numbers' +--- + +## Description +
+Un entero positivo n se llama squarefree, si ningún cuadrado de un primo divide n, entonces 1, 2, 3, 5, 6, 7, 10, 11 son squarefree, pero no 4, 8, 9, 12. + +Cómo Cuántos números cuadrados libres hay por debajo de 250? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler193() debe devolver 684465067343069. + testString: 'assert.strictEqual(euler193(), 684465067343069, "euler193() should return 684465067343069.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler193() { + // Good luck! + return true; +} + +euler193(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-194-coloured-configurations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-194-coloured-configurations.spanish.md new file mode 100644 index 0000000000..7eeed35f22 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-194-coloured-configurations.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f42f1000cf542c50ff40 +challengeType: 5 +title: 'Problem 194: Coloured Configurations' +--- + +## Description +
+Considere los gráficos construidos con las unidades A: +y B: donde las unidades están pegadas a lo largo de +los bordes verticales como en el gráfico. + +Una configuración de tipo (a, b, c) es un gráfico así construido de unidades A y b unidades B, donde los vértices del gráfico se colorean utilizando hasta c colores, de modo que no haya dos vértices adyacentes que tengan el mismo color. +El gráfico compuesto anterior es un ejemplo de una configuración de tipo (2,2,6), de hecho de tipo (2,2, c) para todos c ≥ 4. + +Sea N (a, b, c) El número de configuraciones de tipo (a, b, c). +Por ejemplo, N (1,0,3) = 24, N (0,2,4) = 92928 y N (2,2,3) = 20736. + +Encuentra los últimos 8 dígitos de N (25,75) , 1984). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler194() debe devolver 61190912. + testString: 'assert.strictEqual(euler194(), 61190912, "euler194() should return 61190912.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler194() { + // Good luck! + return true; +} + +euler194(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-195-inscribed-circles-of-triangles-with-one-angle-of-60-degrees.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-195-inscribed-circles-of-triangles-with-one-angle-of-60-degrees.spanish.md new file mode 100644 index 0000000000..f6ef343993 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-195-inscribed-circles-of-triangles-with-one-angle-of-60-degrees.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4311000cf542c50ff43 +challengeType: 5 +title: 'Problem 195: Inscribed circles of triangles with one angle of 60 degrees' +--- + +## Description +
+Llamemos a un triángulo de lados enteros con exactamente un ángulo de 60 grados a un triángulo de 60 grados. +Sea r el radio del círculo inscrito de un triángulo de 60 grados. +Hay 1234 triángulos de 60 grados para los que r ≤ 100. +Sea T (n) el número de triángulos de 60 grados para los que r ≤ n, entonces +T (100) = 1234, T (1000) = 22767, y T (10000) = 359912. + +Encuentre T (1053779). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler195() debe devolver 75085391. + testString: 'assert.strictEqual(euler195(), 75085391, "euler195() should return 75085391.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler195() { + // Good luck! + return true; +} + +euler195(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-196-prime-triplets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-196-prime-triplets.spanish.md new file mode 100644 index 0000000000..80668817cd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-196-prime-triplets.spanish.md @@ -0,0 +1,82 @@ +--- +id: 5 +localeTitle: 5900f4301000cf542c50ff42 +challengeType: 5 +title: 'Problem 196: Prime triplets' +--- + +## Description +
+Construye un triángulo con todos los enteros positivos de la siguiente manera: + +1 +2 3 +4 5 6 +7 8 9 1011 12 13 14 15 +16 17 18 19 20 21 +22 23 24 25 26 27 2829 30 31 32 33 34 35 3637 38 39 40 41 42 43 44 45 +46 47 48 49 50 51 52 53 54 55 +56 57 58 59 60 61 62 63 64 65 66 +. . . + +Cada entero positivo tiene hasta ocho vecinos en el triángulo. + +Un conjunto de tres primos se denomina triplete primo si uno de los tres primos tiene los otros dos como vecinos en el triángulo. + +Por ejemplo, en la segunda fila, los números primos 2 y 3 son elementos de algunos tripletes primos. + +Si se considera la fila 8, contiene dos números primos que son elementos de algún triplete primario, es decir, 29 y 31. +Si se considera la fila 9, solo contiene un número primo que es un elemento de algún triplete primario: 37. + +Defina S (n) como la suma de los números primos en la fila n que son elementos de cualquier triplete principal. +Entonces S (8) = 60 y S (9) = 37. + +Se le da que S (10000) = 950007619. + +Encuentra S (5678027) + S (7208785). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler196() debe devolver 322303240771079940. + testString: 'assert.strictEqual(euler196(), 322303240771079940, "euler196() should return 322303240771079940.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler196() { + // Good luck! + return true; +} + +euler196(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.spanish.md new file mode 100644 index 0000000000..cb7eae2df0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4311000cf542c50ff44 +challengeType: 5 +title: 'Problem 197: Investigating the behaviour of a recursively defined sequence' +--- + +## Description +
+Se da la función f (x) = ⌊230.403243784-x2⌋ × 10-9 (⌊ ⌋ es la función de piso), +la secuencia un está definida por u0 = -1 y un + 1 = f (un). + +Encuentre un + un + 1 para n = 1012. +Dé su respuesta con 9 dígitos después del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler197() debe devolver 1.710637717. + testString: 'assert.strictEqual(euler197(), 1.710637717, "euler197() should return 1.710637717.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler197() { + // Good luck! + return true; +} + +euler197(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-198-ambiguous-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-198-ambiguous-numbers.spanish.md new file mode 100644 index 0000000000..63c3907123 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-198-ambiguous-numbers.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4331000cf542c50ff45 +challengeType: 5 +title: 'Problem 198: Ambiguous Numbers' +--- + +## Description +
+Una mejor aproximación a un número real x para el denominador unido d es un número racional r / s (en forma reducida) con s ≤ d, de modo que cualquier número racional p / q que esté más cerca de x que r / s tenga q > d. + +Por lo general, la mejor aproximación a un número real se determina de manera única para todos los límites del denominador. Sin embargo, hay algunas excepciones, por ejemplo, 9/40 tiene las dos mejores aproximaciones 1/4 y 1/5 para el denominador unido 6. +Llamaremos a un número real x ambiguo, si hay al menos un denominador vinculado para el cual x Posee dos mejores aproximaciones. Claramente, un número ambiguo es necesariamente racional. + +¿Cuántos números ambiguos x = p / q, +0 <x <1/100, hay cuyo denominador q no excede de 108? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler198() debe devolver 52374425. + testString: 'assert.strictEqual(euler198(), 52374425, "euler198() should return 52374425.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler198() { + // Good luck! + return true; +} + +euler198(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-199-iterative-circle-packing.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-199-iterative-circle-packing.spanish.md new file mode 100644 index 0000000000..2ce8c3ffd9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-199-iterative-circle-packing.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4341000cf542c50ff46 +challengeType: 5 +title: 'Problem 199: Iterative Circle Packing' +--- + +## Description +
+Tres círculos de igual radio se colocan dentro de un círculo más grande de modo que cada par de círculos sea tangente entre sí y los círculos internos no se superpongan. Hay cuatro "huecos" descubiertos que se deben llenar de forma iterativa con más círculos tangentes. + + + +En cada iteración, se coloca un círculo de tamaño máximo en cada espacio, lo que crea más espacios para la siguiente iteración. Después de 3 iteraciones (en la imagen), hay 108 espacios y la fracción del área que no está cubierta por círculos es 0.06790342, redondeada a ocho lugares decimales. + + +¿Qué fracción del área no está cubierta por círculos después de 10 iteraciones? +Da tu respuesta redondeada a ocho decimales usando el formato x.xxxxxxxx. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler199() debe devolver 0.00396087. + testString: 'assert.strictEqual(euler199(), 0.00396087, "euler199() should return 0.00396087.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler199() { + // Good luck! + return true; +} + +euler199(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.spanish.md new file mode 100644 index 0000000000..4c057b127c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f36e1000cf542c50fe81 +challengeType: 5 +title: 'Problem 2: Even Fibonacci Numbers' +--- + +## Description +
+Cada nuevo término en la secuencia de Fibonacci se genera al agregar los dos términos anteriores. Al comenzar con 1 y 2, los primeros 10 términos serán: +
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
+Al considerar los términos en la secuencia de Fibonacci cuyos valores no exceden el término n , encuentre la suma de los términos de valor par. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: fiboEvenSum(10) debe devolver 188. + testString: 'assert.strictEqual(fiboEvenSum(10), 188, "fiboEvenSum(10) should return 188.");' + - text: fiboEvenSum(23) debe devolver 60696. + testString: 'assert.strictEqual(fiboEvenSum(23), 60696, "fiboEvenSum(23) should return 60696.");' + - text: fiboEvenSum(43) debe devolver 1485607536. + testString: 'assert.strictEqual(fiboEvenSum(43), 1485607536, "fiboEvenSum(43) should return 1485607536.");' + - text: Su función no está devolviendo el resultado correcto utilizando nuestros valores de prueba. + testString: 'assert.strictEqual(fiboEvenSum(18), 3382, "Your function is not returning the correct result using our tests values.");' + - text: Su función debe devolver un valor even . + testString: 'assert.equal(fiboEvenSum(31) % 2 === 0, true, "Your function should return an even value.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function fiboEvenSum(n) { + // You can do it! + return true; +} + +fiboEvenSum(10); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const fiboEvenSum = (number) => { + let temp, sum = 0, a = 0, b = 1; + while (number >= 0) { + temp = a; + a = b; + b += temp; + number --; + if ((b % 2) === 0) { + sum += b; + } + } + + return sum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-20-factorial-digit-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-20-factorial-digit-sum.spanish.md new file mode 100644 index 0000000000..b3f95455fb --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-20-factorial-digit-sum.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f3801000cf542c50fe93 +challengeType: 5 +title: 'Problem 20: Factorial digit sum' +--- + +## Description +
+n ! significa n × ( n - 1) × ... × 3 × 2 × 1 +Por ejemplo, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
y la suma de los dígitos en el número 10! es 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. +Encuentra la suma de los dígitos n ! +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: sumFactorialDigits(10) debe devolver 27. + testString: 'assert.strictEqual(sumFactorialDigits(10), 27, "sumFactorialDigits(10) should return 27.");' + - text: sumFactorialDigits(25) debe devolver 72. + testString: 'assert.strictEqual(sumFactorialDigits(25), 72, "sumFactorialDigits(25) should return 72.");' + - text: sumFactorialDigits(50) debe devolver 216. + testString: 'assert.strictEqual(sumFactorialDigits(50), 216, "sumFactorialDigits(50) should return 216.");' + - text: sumFactorialDigits(75) debe devolver 432. + testString: 'assert.strictEqual(sumFactorialDigits(75), 432, "sumFactorialDigits(75) should return 432.");' + - text: sumFactorialDigits(100) debe devolver 648. + testString: 'assert.strictEqual(sumFactorialDigits(100), 648, "sumFactorialDigits(100) should return 648.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function sumFactorialDigits(n) { + // Good luck! + return n; +} + +sumFactorialDigits(100); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-200-find-the-200th-prime-proof-sqube-containing-the-contiguous-sub-string-200.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-200-find-the-200th-prime-proof-sqube-containing-the-contiguous-sub-string-200.spanish.md new file mode 100644 index 0000000000..08fb1a95c0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-200-find-the-200th-prime-proof-sqube-containing-the-contiguous-sub-string-200.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4351000cf542c50ff47 +challengeType: 5 +title: 'Problem 200: Find the 200th prime-proof sqube containing the contiguous sub-string "200"' +--- + +## Description +
+Definiremos un sqube como un número de la forma, p2q3, donde p y q son primos distintos. +Por ejemplo, 200 = 5223 o 120072949 = 232613. + +Los primeros cinco squbes son 72, 108, 200, 392 y 500. + +Interesantemente, 200 también es el primer número para el cual no puede cambiar ningún dígito. un primo Llamaremos a esos números, prueba principal. El siguiente sqube de prueba principal que contiene la subcadena contigua "200" es 1992008. + +Encuentre el sqube de prueba primordial número 200 que contiene la subcadena contigua "200". +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler200() debe devolver 229161792008. + testString: 'assert.strictEqual(euler200(), 229161792008, "euler200() should return 229161792008.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler200() { + // Good luck! + return true; +} + +euler200(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-201-subsets-with-a-unique-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-201-subsets-with-a-unique-sum.spanish.md new file mode 100644 index 0000000000..0149a6001f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-201-subsets-with-a-unique-sum.spanish.md @@ -0,0 +1,87 @@ +--- +id: 5 +localeTitle: 5900f4361000cf542c50ff48 +challengeType: 5 +title: 'Problem 201: Subsets with a unique sum' +--- + +## Description +
+Para cualquier conjunto A de números, sea la suma (A) la suma de los elementos de A. +Considere el conjunto B = {1,3,6,8,10,11}. Hay 20 subconjuntos de B que contienen tres elementos, y sus sumas son: + + +suma ({1,3,6}) = 10, +suma ({1,3,8}) = 12, +suma ({1 , 3,10}) = 14, +suma ({1,3,11}) = 15, +suma ({1,6,8}) = 15, +suma ({1,6,10}) = 17 , +suma ({1,6,11}) = 18, +suma ({1,8,10}) = 19, +suma ({1,8,11}) = 20, +suma ({1,10 , 11}) = 22, +suma ({3,6,8}) = 17, +suma ({3,6,10}) = 19, +suma ({3,6,11}) = 20, +suma ({3,8,10}) = 21, +suma ({3,8,11}) = 22, +suma ({3,10,11}) = 24, +suma ({6,8,10 }) = 24, +suma ({6,8,11}) = 25, +suma ({6,10,11}) = 27, +suma ({8,10,11}) = 29. + +Algunos de estas sumas ocurren más de una vez, otras son únicas. +Para un conjunto A, sea U (A, k) el conjunto de sumas únicas de subconjuntos de elementos k de A, en nuestro ejemplo encontramos U (B, 3) = {10,12,14,18,21, 25,27,29} y suma (U (B, 3)) = 156. + +Ahora considere el conjunto de 100 elementos S = {12, 22, ..., 1002}. +S tiene 100891344545564193334812497256 subconjuntos de 50 elementos. + +Determine la suma de todos los enteros que son la suma de exactamente uno de los subconjuntos de 50 elementos de S, es decir, encuentre la suma (U (S, 50)). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler201() debe devolver 115039000. + testString: 'assert.strictEqual(euler201(), 115039000, "euler201() should return 115039000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler201() { + // Good luck! + return true; +} + +euler201(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-202-laserbeam.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-202-laserbeam.spanish.md new file mode 100644 index 0000000000..2ca4767cf7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-202-laserbeam.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4371000cf542c50ff49 +challengeType: 5 +title: 'Problem 202: Laserbeam' +--- + +## Description +
+Tres espejos están dispuestos en forma de triángulo equilátero, con sus superficies reflectantes apuntando hacia adentro. Hay un espacio infinitesimal en cada vértice del triángulo a través del cual puede pasar un rayo láser. + +Etiquete los vértices A, B y C. Hay 2 formas en que un rayo láser puede entrar en el vértice C, rebotar en 11 superficies y luego salir por el mismo vértice: una forma se muestra a continuación; el otro es lo contrario de eso. + + + + +Hay 80840 formas en que un rayo láser puede ingresar al vértice C, rebotar en las superficies 1000001 y luego salir por el mismo vértice. + +¿De cuántas maneras puede entrar un rayo láser en el vértice C, rebotar en las superficies 12017639147 y luego salir por el mismo vértice? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler202() debe devolver 1209002624. + testString: 'assert.strictEqual(euler202(), 1209002624, "euler202() should return 1209002624.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler202() { + // Good luck! + return true; +} + +euler202(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-203-squarefree-binomial-coefficients.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-203-squarefree-binomial-coefficients.spanish.md new file mode 100644 index 0000000000..2e36cc6075 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-203-squarefree-binomial-coefficients.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4381000cf542c50ff4a +challengeType: 5 +title: 'Problem 203: Squarefree Binomial Coefficients' +--- + +## Description +
+Los coeficientes binomiales nCk se pueden organizar en forma triangular, el triángulo de Pascal, así: + + +111121133114641151010511615201561172135352171 +......... + + +Se puede ver que las primeras ocho filas del triángulo de Pascal contienen doce distintas números: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 y 35. + +Un entero positivo n se llama squarefree si ningún cuadrado de un número primo divide n. +De los doce números distintos en las primeras ocho filas del triángulo de Pascal, todos, excepto 4 y 20, son cuadrados libres. +La suma de los distintos números de squarefree en las primeras ocho filas es 105. + +Halla la suma de los distintos números de squarefree en las primeras 51 filas del triángulo de Pascal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler203() debe devolver 34029210557338. + testString: 'assert.strictEqual(euler203(), 34029210557338, "euler203() should return 34029210557338.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler203() { + // Good luck! + return true; +} + +euler203(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-204-generalised-hamming-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-204-generalised-hamming-numbers.spanish.md new file mode 100644 index 0000000000..32e0cfa83f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-204-generalised-hamming-numbers.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4381000cf542c50ff4b +challengeType: 5 +title: 'Problem 204: Generalised Hamming Numbers' +--- + +## Description +
+Un número de Hamming es un número positivo que no tiene un factor primo mayor que 5. +Así que los primeros números de Hamming son 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15. +Hay 1105 Números de Hamming que no excedan de 108. + +Llamaremos a un número positivo un número de Hamming generalizado de tipo n, si no tiene un factor primo mayor que n. +Por lo tanto, los números de Hamming son los números de Hamming generalizados del tipo 5. + +¿Cuántos números de Hamming generalizados del tipo 100 hay que no excedan 109? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler204() debe devolver 2944730. + testString: 'assert.strictEqual(euler204(), 2944730, "euler204() should return 2944730.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler204() { + // Good luck! + return true; +} + +euler204(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-205-dice-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-205-dice-game.spanish.md new file mode 100644 index 0000000000..7cd682b9d0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-205-dice-game.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4391000cf542c50ff4c +challengeType: 5 +title: 'Problem 205: Dice Game' +--- + +## Description +
+Peter tiene nueve dados de cuatro lados (piramidales), cada uno con caras numeradas 1, 2, 3, 4. +Colin tiene seis dados de seis lados (cúbicos), cada uno con caras numeradas 1, 2, 3, 4, 5, 6. + +Peter y Colin lanzan sus dados y comparan los totales: el total de victorias más alto. El resultado es un empate si los totales son iguales. + +¿Cuál es la probabilidad de que Pyramidal Pete supere a Cubic Colin? Da tu respuesta redondeada a siete lugares decimales en la forma 0.abcdefg +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler205() debe devolver 0.5731441. + testString: 'assert.strictEqual(euler205(), 0.5731441, "euler205() should return 0.5731441.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler205() { + // Good luck! + return true; +} + +euler205(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-206-concealed-square.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-206-concealed-square.spanish.md new file mode 100644 index 0000000000..b872274e90 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-206-concealed-square.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f43a1000cf542c50ff4d +challengeType: 5 +title: 'Problem 206: Concealed Square' +--- + +## Description +
+Encuentre el entero positivo único cuyo cuadrado tiene la forma 1_2_3_4_5_6_7_8_9_0, donde cada "_" es un solo dígito. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler206() debe devolver 1389019170. + testString: 'assert.strictEqual(euler206(), 1389019170, "euler206() should return 1389019170.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler206() { + // Good luck! + return true; +} + +euler206(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-207-integer-partition-equations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-207-integer-partition-equations.spanish.md new file mode 100644 index 0000000000..d68ca15791 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-207-integer-partition-equations.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f43c1000cf542c50ff4e +challengeType: 5 +title: 'Problem 207: Integer partition equations' +--- + +## Description +
+Para algunos enteros positivos k, existe una partición entera de la forma 4t = 2t + k, +donde 4t, 2t y k son todos enteros positivos y t es un número real. + +Las dos primeras particiones son 41 = 21 + 2 y 41.5849625 ... = 21.5849625 ... + 6. + +particiones donde t también es un número entero se llaman perfectas. +Para cualquier m ≥ 1 sea P (m) la proporción de tales particiones que son perfectas con k ≤ m. +Así, P (6) = 1/2. + +En la siguiente tabla se enumeran algunos valores de P (m) +P (5) = 1/1 +P (10) = 1/2 +P (15) = 2/3 +P (20) = 1 / 2 +P (25) = 1/2 +P (30) = 2/5 +... +P (180) = 1/4 +P (185) = 3/13 + + +Encuentre la m más pequeña para la cual P (m) <1/12345 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler207() debe devolver 44043947822. + testString: 'assert.strictEqual(euler207(), 44043947822, "euler207() should return 44043947822.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler207() { + // Good luck! + return true; +} + +euler207(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-208-robot-walks.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-208-robot-walks.spanish.md new file mode 100644 index 0000000000..0d3bfeff21 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-208-robot-walks.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f43f1000cf542c50ff51 +challengeType: 5 +title: 'Problem 208: Robot Walks' +--- + +## Description +
+Un robot se mueve en una serie de arcos circulares de una quinta parte (72 °), con una elección libre de un arco en el sentido de las agujas del reloj o en el sentido contrario a las agujas del reloj para cada paso, pero sin girar en el lugar. + +Uno de los 70932 posibles caminos cerrados de 25 arcos que comienzan hacia el norte es + + + +Dado que el robot comienza mirando hacia el Norte, ¿cuántos viajes de 70 arcos de longitud puede tomar para que, después del arco final, retorne a su posición inicial? ? +(Cualquier arco puede ser atravesado varias veces). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler208() debe devolver 331951449665644800. + testString: 'assert.strictEqual(euler208(), 331951449665644800, "euler208() should return 331951449665644800.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler208() { + // Good luck! + return true; +} + +euler208(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-209-circular-logic.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-209-circular-logic.spanish.md new file mode 100644 index 0000000000..03f880155e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-209-circular-logic.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f43e1000cf542c50ff4f +challengeType: 5 +title: 'Problem 209: Circular Logic' +--- + +## Description +
+Una tabla de verdad binaria de entrada k es un mapa de k bits de entrada +(dígitos binarios, 0 [falso] o 1 [verdadero]) a 1 bit de salida. Por ejemplo, las tablas de verdad binaria de 2 entradas para las funciones lógicas AND y XOR son: + +x +y +x AND y000010100111x +y +x XOR y000011101110Cuántas tablas de verdad binaria de 6 entradas, τ, satisfacen la fórmula + +τ (a, b, c, d, e, f) AND τ (b, c, d, e, f, a XOR (b AND c)) = 0 +para todas las entradas de 6 bits (a, b, c, d, e, f)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler209() debe devolver 15964587728784. + testString: 'assert.strictEqual(euler209(), 15964587728784, "euler209() should return 15964587728784.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler209() { + // Good luck! + return true; +} + +euler209(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-21-amicable-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-21-amicable-numbers.spanish.md new file mode 100644 index 0000000000..5dec2d4527 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-21-amicable-numbers.spanish.md @@ -0,0 +1,83 @@ +--- +id: 5 +localeTitle: 5900f3811000cf542c50fe94 +challengeType: 5 +title: 'Problem 21: Amicable numbers' +--- + +## Description +
+Deje que d ( n ) se defina como la suma de los divisores propios de n (números menores que n que se dividen uniformemente en n ). +Si d ( a ) = b y d ( b ) = a , donde ab , entonces a y b son un par amigable y cada uno de a y b se llama números amistosos. +Por ejemplo, los divisores propios de 220 son 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 y 110; por lo tanto, d (220) = 284. Los divisores propios de 284 son 1, 2, 4, 71 y 142; entonces d (284) = 220. +Evalúa la suma de todos los números amistosos debajo de n . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: sumAmicableNum(1000) debe devolver 504. + testString: 'assert.strictEqual(sumAmicableNum(1000), 504, "sumAmicableNum(1000) should return 504.");' + - text: sumAmicableNum(2000) debe devolver 2898. + testString: 'assert.strictEqual(sumAmicableNum(2000), 2898, "sumAmicableNum(2000) should return 2898.");' + - text: sumAmicableNum(5000) debe devolver 8442. + testString: 'assert.strictEqual(sumAmicableNum(5000), 8442, "sumAmicableNum(5000) should return 8442.");' + - text: sumAmicableNum(10000) debe devolver 31626. + testString: 'assert.strictEqual(sumAmicableNum(10000), 31626, "sumAmicableNum(10000) should return 31626.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function sumAmicableNum(n) { + // Good luck! + return n; +} + +sumAmicableNum(10000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const sumAmicableNum = (n) => { + const fsum = (n) => { + let sum = 1; + for (let i = 2; i <= Math.floor(Math.sqrt(n)); i++) + if (Math.floor(n % i) === 0) + sum += i + Math.floor(n / i); + return sum; + }; + let d = []; + let amicableSum = 0; + for (let i=2; i diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-210-obtuse-angled-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-210-obtuse-angled-triangles.spanish.md new file mode 100644 index 0000000000..687b530372 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-210-obtuse-angled-triangles.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f43e1000cf542c50ff50 +challengeType: 5 +title: 'Problem 210: Obtuse Angled Triangles' +--- + +## Description +
+Considere el conjunto S (r) de puntos (x, y) con coordenadas enteras que satisfacen | x | + | y ​​| ≤ r. +Sea O el punto (0,0) y C el punto (r / 4, r / 4). +Sea N (r) el número de puntos B en S (r), de modo que el triángulo OBC tenga un ángulo obtuso, es decir, el ángulo mayor α satisface 90 ° <α <180 °. +Entonces, por ejemplo, N (4) = 24 y N (8) = 100. + +¿Qué es N (1,000,000,000)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler210() debe devolver 1598174770174689500. + testString: 'assert.strictEqual(euler210(), 1598174770174689500, "euler210() should return 1598174770174689500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler210() { + // Good luck! + return true; +} + +euler210(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-211-divisor-square-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-211-divisor-square-sum.spanish.md new file mode 100644 index 0000000000..6b3e5fdd33 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-211-divisor-square-sum.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f43f1000cf542c50ff52 +challengeType: 5 +title: 'Problem 211: Divisor Square Sum' +--- + +## Description +
+Para un entero positivo n, sea σ2 (n) la suma de los cuadrados de sus divisores. Por ejemplo, +σ2 (10) = 1 + 4 + 25 + 100 = 130. +Halla la suma de todos n, 0 <n <64,000,000 de manera que σ2 (n) sea un cuadrado perfecto. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler211() debe devolver 1922364685. + testString: 'assert.strictEqual(euler211(), 1922364685, "euler211() should return 1922364685.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler211() { + // Good luck! + return true; +} + +euler211(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-212-combined-volume-of-cuboids.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-212-combined-volume-of-cuboids.spanish.md new file mode 100644 index 0000000000..ef363f3e4e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-212-combined-volume-of-cuboids.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4411000cf542c50ff53 +challengeType: 5 +title: 'Problem 212: Combined Volume of Cuboids' +--- + +## Description +
+Un cuboide alineado con el eje, especificado por los parámetros {(x0, y0, z0), (dx, dy, dz)}, consta de todos los puntos (X, Y, Z) de manera que x0 ≤ X ≤ x0 + dx, y0 ≤ Y ≤ y0 + dy y z0 ≤ Z ≤ z0 + dz. El volumen del cuboide es el producto, dx × dy × dz. El volumen combinado de una colección de cuboides es el volumen de su unión y será menor que la suma de los volúmenes individuales si alguno de los cuboides se superponen. + +Sean C1, ..., C50000 una colección de 50000 cuboides alineados con el eje, de manera que Cn tenga parámetros + +x0 = S6n-5 módulo 10000y0 = S6n-4 módulo 10000z0 = S6n-3 módulo 10000dx = 1 + (S6n -2 modulo 399) dy = 1 + (S6n-1 modulo 399) dz = 1 + (S6n modulo 399) + +donde S1, ..., S300000 provienen del "Generador de Fibonacci Lagged": + +Para 1 ≤ k ≤ 55, Sk = [100003 - 200003k + 300007k3] (módulo 1000000) Para 56 ≤ k, Sk = [Sk-24 + Sk-55] (módulo 1000000) + +Por lo tanto, C1 tiene parámetros {(7,53,183), (94,369,56)}, C2 tiene los parámetros {(2383,3563,5079), (42,212,344)}, y así sucesivamente. + +El volumen combinado de los primeros 100 cuboides, C1, ..., C100, es 723581599. + +¿Cuál es el volumen combinado de todos los 50000 cuboides, C1, ..., C50000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler212() debe devolver 328968937309. + testString: 'assert.strictEqual(euler212(), 328968937309, "euler212() should return 328968937309.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler212() { + // Good luck! + return true; +} + +euler212(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-213-flea-circus.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-213-flea-circus.spanish.md new file mode 100644 index 0000000000..518b7a969c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-213-flea-circus.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f4411000cf542c50ff54 +challengeType: 5 +title: 'Problem 213: Flea Circus' +--- + +## Description +
+Una cuadrícula de cuadrados de 30 × 30 contiene 900 pulgas, inicialmente una pulga por cuadrado. +Cuando se toca una campana, cada pulga salta a un cuadrado adyacente al azar (generalmente 4 posibilidades, excepto las pulgas en el borde de la cuadrícula o en las esquinas). + +¿Cuál es el número esperado de cuadrados desocupados después de 50 timbres de la campana? Da tu respuesta redondeada a seis decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler213() debe devolver 330.721154. + testString: 'assert.strictEqual(euler213(), 330.721154, "euler213() should return 330.721154.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler213() { + // Good luck! + return true; +} + +euler213(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-214-totient-chains.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-214-totient-chains.spanish.md new file mode 100644 index 0000000000..40026a916a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-214-totient-chains.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4421000cf542c50ff55 +challengeType: 5 +title: 'Problem 214: Totient Chains' +--- + +## Description +
+Sea tot la función total de Euler, es decir, para un número natural n, +φ (n) es el número de k, 1 ≤ k ≤ n, para el cual gcd (k, n) = 1. + +Al iterar φ, cada uno un entero positivo genera una cadena decreciente de números que termina en 1. +Por ejemplo, si comenzamos con 5, se genera la secuencia 5,4,2,1. +Aquí hay una lista de todas las cadenas con longitud 4: + + +5,4,2,1 +7,6,2,1 +8,4,2,1 +9,6,2,1 +10,4 , 2,1 +12,4,2,1 +14,6,2,1 +18,6,2,1 + +Solo dos de estas cadenas comienzan con un primo, su suma es 12. + +¿Qué es el ¿La suma de todos los números primos menores que 40000000 que generan una cadena de longitud 25? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler214() debe devolver 1677366278943. + testString: 'assert.strictEqual(euler214(), 1677366278943, "euler214() should return 1677366278943.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler214() { + // Good luck! + return true; +} + +euler214(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-215-crack-free-walls.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-215-crack-free-walls.spanish.md new file mode 100644 index 0000000000..9284980e6a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-215-crack-free-walls.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4431000cf542c50ff56 +challengeType: 5 +title: 'Problem 215: Crack-free Walls' +--- + +## Description +
+Considere el problema de construir un muro con ladrillos de 2 × 1 y 3 × 1 (dimensiones horizontales × verticales) de manera que, para mayor resistencia, los espacios entre los ladrillos adyacentes horizontalmente nunca se alineen en capas consecutivas, es decir, nunca formen un " grieta corriendo ". + +Por ejemplo, la siguiente pared de 9 × 3 no es aceptable debido a la grieta en movimiento que se muestra en rojo: + + + + +Hay ocho formas de formar una pared de 9 × 3 sin grietas, escrita W (9,3) = 8. + +Calcula W (32,10). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler215() debe devolver 806844323190414. + testString: 'assert.strictEqual(euler215(), 806844323190414, "euler215() should return 806844323190414.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler215() { + // Good luck! + return true; +} + +euler215(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-216-investigating-the-primality-of-numbers-of-the-form-2n2-1.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-216-investigating-the-primality-of-numbers-of-the-form-2n2-1.spanish.md new file mode 100644 index 0000000000..642256cd40 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-216-investigating-the-primality-of-numbers-of-the-form-2n2-1.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4451000cf542c50ff57 +challengeType: 5 +title: 'Problem 216: Investigating the primality of numbers of the form 2n2-1' +--- + +## Description +
+Considere los números t (n) de la forma t (n) = 2n2-1 con n> 1. +Los primeros números son 7, 17, 31, 49, 71, 97, 127 y 161. +Resulta que solo 49 = 7 * 7 y 161 = 7 * 23 no son primos. +Para n ≤ 10000 hay 2202 números t (n) que son primos. + +¿Cuántos números t (n) son primos para n ≤ 50,000,000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler216() debe devolver 5437849. + testString: 'assert.strictEqual(euler216(), 5437849, "euler216() should return 5437849.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler216() { + // Good luck! + return true; +} + +euler216(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-217-balanced-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-217-balanced-numbers.spanish.md new file mode 100644 index 0000000000..15128e832e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-217-balanced-numbers.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4461000cf542c50ff58 +challengeType: 5 +title: 'Problem 217: Balanced Numbers' +--- + +## Description +
+Un entero positivo con k dígitos (decimales) se llama balanceado si sus primeros dígitos ⌈k / 2⌉ suman el mismo valor que sus últimos dígitos ⌈k / 2⌉, donde ⌈x⌉, el techo pronunciado de x, es el más pequeño entero ≥ x, entonces ⌈π⌈ = 4 y ⌈5⌉ = 5. +Entonces, por ejemplo, todos los palíndromos están balanceados, como lo es 13722. +Sea T (n) la suma de todos los números balanceados menores que 10n. +Así: T (1) = 45, T (2) = 540 y T (5) = 334795890. +Encuentra T (47) mod 315 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler217() debe devolver 6273134. + testString: 'assert.strictEqual(euler217(), 6273134, "euler217() should return 6273134.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler217() { + // Good luck! + return true; +} + +euler217(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-218-perfect-right-angled-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-218-perfect-right-angled-triangles.spanish.md new file mode 100644 index 0000000000..c959c50201 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-218-perfect-right-angled-triangles.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4461000cf542c50ff59 +challengeType: 5 +title: 'Problem 218: Perfect right-angled triangles' +--- + +## Description +
+Considera el triángulo rectángulo con lados a = 7, b = 24 y c = 25. +El área de este triángulo es 84, que es divisible por los números perfectos 6 y 28. +Además, es un triángulo rectángulo primitivo como gcd (a, b) = 1 y gcd (b, c) = 1. +También c es un cuadrado perfecto. + +Llamaremos un triángulo rectángulo perfecto si +-es un triángulo rectángulo primitivo +-su hipotenusa es un cuadrado perfecto + +Llamaremos un triángulo rectángulo súper perfecto si +-es un triángulo rectángulo perfecto y +-su área es un múltiplo de los números perfectos 6 y 28. + + +¿Cuántos triángulos rectángulos perfectos existen con c≤1016 que no sean super perfectos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler218() debe devolver 0. + testString: 'assert.strictEqual(euler218(), 0, "euler218() should return 0.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler218() { + // Good luck! + return true; +} + +euler218(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-219-skew-cost-coding.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-219-skew-cost-coding.spanish.md new file mode 100644 index 0000000000..1608e7abc4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-219-skew-cost-coding.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4481000cf542c50ff5a +challengeType: 5 +title: 'Problem 219: Skew-cost coding' +--- + +## Description +
+Sean A y B cadenas de bits (secuencias de 0 y 1). +Si A es igual a la longitud de la izquierda (A) bits de B, entonces A se dice que es un prefijo de B. +Por ejemplo, 00110 es un prefijo de 001101001, pero no de 00111 o 100110. + +Un prefijo el código libre de tamaño n es una colección de n cadenas de bits distintas, de modo que ninguna cadena es un prefijo de ninguna otra. Por ejemplo, este es un código sin prefijo de tamaño 6: + +0000, 0001, 001, 01, 10, 11 + +Ahora suponga que cuesta un centavo transmitir un bit '0', pero cuatro peniques para transmitir un '1'. +Entonces, el costo total del código sin prefijo que se muestra arriba es de 35 peniques, que es el más barato posible para el esquema de precios sesgado en cuestión. +En resumen, escribimos Costo (6) = 35. + +¿Qué es el Costo (109)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler219() debe devolver 64564225042. + testString: 'assert.strictEqual(euler219(), 64564225042, "euler219() should return 64564225042.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler219() { + // Good luck! + return true; +} + +euler219(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-22-names-scores.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-22-names-scores.spanish.md new file mode 100644 index 0000000000..9b267b4907 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-22-names-scores.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5a51eabcad78bf416f316e2a +challengeType: 5 +title: 'Problem 22: Names scores' +--- + +## Description +
+Usando names , una matriz que contiene más de cinco mil nombres, comienza ordenándolos en orden alfabético. Luego, calculando el valor alfabético de cada nombre, multiplique este valor por su posición alfabética en la lista para obtener una puntuación de nombre. +Por ejemplo, cuando la lista está ordenada por orden alfabético, COLIN, que vale 3 + 15 + 12 + 9 + 14 = 53, es el 938º nombre en la lista. Entonces, COLIN obtendría una puntuación de 938 × 53 = 49714. +¿Cuál es el total de todas las puntuaciones de nombres en el archivo? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: namesScores(test1) debe devolver 791. + testString: 'assert.strictEqual(namesScores(test1), 791, "namesScores(test1) should return 791.");' + - text: namesScores(test2) debe devolver 1468. + testString: 'assert.strictEqual(namesScores(test2), 1468, "namesScores(test2) should return 1468.");' + - text: namesScores(names) debe devolver 871198282. + testString: 'assert.strictEqual(namesScores(names), 871198282, "namesScores(names) should return 871198282.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function namesScores(arr) { + // Good luck! + return arr; +} + +// Only change code above this line +const test1 = ['THIS', 'IS', 'ONLY', 'A', 'TEST']; +const test2 = ['I', 'REPEAT', 'THIS', 'IS', 'ONLY', 'A', 'TEST']; + +namesScores(test1); +``` + +
+ +### Before Test +
+ +```js +const names = ['MARY','PATRICIA','LINDA','BARBARA','ELIZABETH','JENNIFER','MARIA','SUSAN','MARGARET','DOROTHY','LISA','NANCY','KAREN','BETTY','HELEN','SANDRA','DONNA','CAROL','RUTH','SHARON','MICHELLE','LAURA','SARAH','KIMBERLY','DEBORAH','JESSICA','SHIRLEY','CYNTHIA','ANGELA','MELISSA','BRENDA','AMY','ANNA','REBECCA','VIRGINIA','KATHLEEN','PAMELA','MARTHA','DEBRA','AMANDA','STEPHANIE','CAROLYN','CHRISTINE','MARIE','JANET','CATHERINE','FRANCES','ANN','JOYCE','DIANE','ALICE','JULIE','HEATHER','TERESA','DORIS','GLORIA','EVELYN','JEAN','CHERYL','MILDRED','KATHERINE','JOAN','ASHLEY','JUDITH','ROSE','JANICE','KELLY','NICOLE','JUDY','CHRISTINA','KATHY','THERESA','BEVERLY','DENISE','TAMMY','IRENE','JANE','LORI','RACHEL','MARILYN','ANDREA','KATHRYN','LOUISE','SARA','ANNE','JACQUELINE','WANDA','BONNIE','JULIA','RUBY','LOIS','TINA','PHYLLIS','NORMA','PAULA','DIANA','ANNIE','LILLIAN','EMILY','ROBIN','PEGGY','CRYSTAL','GLADYS','RITA','DAWN','CONNIE','FLORENCE','TRACY','EDNA','TIFFANY','CARMEN','ROSA','CINDY','GRACE','WENDY','VICTORIA','EDITH','KIM','SHERRY','SYLVIA','JOSEPHINE','THELMA','SHANNON','SHEILA','ETHEL','ELLEN','ELAINE','MARJORIE','CARRIE','CHARLOTTE','MONICA','ESTHER','PAULINE','EMMA','JUANITA','ANITA','RHONDA','HAZEL','AMBER','EVA','DEBBIE','APRIL','LESLIE','CLARA','LUCILLE','JAMIE','JOANNE','ELEANOR','VALERIE','DANIELLE','MEGAN','ALICIA','SUZANNE','MICHELE','GAIL','BERTHA','DARLENE','VERONICA','JILL','ERIN','GERALDINE','LAUREN','CATHY','JOANN','LORRAINE','LYNN','SALLY','REGINA','ERICA','BEATRICE','DOLORES','BERNICE','AUDREY','YVONNE','ANNETTE','JUNE','SAMANTHA','MARION','DANA','STACY','ANA','RENEE','IDA','VIVIAN','ROBERTA','HOLLY','BRITTANY','MELANIE','LORETTA','YOLANDA','JEANETTE','LAURIE','KATIE','KRISTEN','VANESSA','ALMA','SUE','ELSIE','BETH','JEANNE','VICKI','CARLA','TARA','ROSEMARY','EILEEN','TERRI','GERTRUDE','LUCY','TONYA','ELLA','STACEY','WILMA','GINA','KRISTIN','JESSIE','NATALIE','AGNES','VERA','WILLIE','CHARLENE','BESSIE','DELORES','MELINDA','PEARL','ARLENE','MAUREEN','COLLEEN','ALLISON','TAMARA','JOY','GEORGIA','CONSTANCE','LILLIE','CLAUDIA','JACKIE','MARCIA','TANYA','NELLIE','MINNIE','MARLENE','HEIDI','GLENDA','LYDIA','VIOLA','COURTNEY','MARIAN','STELLA','CAROLINE','DORA','JO','VICKIE','MATTIE','TERRY','MAXINE','IRMA','MABEL','MARSHA','MYRTLE','LENA','CHRISTY','DEANNA','PATSY','HILDA','GWENDOLYN','JENNIE','NORA','MARGIE','NINA','CASSANDRA','LEAH','PENNY','KAY','PRISCILLA','NAOMI','CAROLE','BRANDY','OLGA','BILLIE','DIANNE','TRACEY','LEONA','JENNY','FELICIA','SONIA','MIRIAM','VELMA','BECKY','BOBBIE','VIOLET','KRISTINA','TONI','MISTY','MAE','SHELLY','DAISY','RAMONA','SHERRI','ERIKA','KATRINA','CLAIRE','LINDSEY','LINDSAY','GENEVA','GUADALUPE','BELINDA','MARGARITA','SHERYL','CORA','FAYE','ADA','NATASHA','SABRINA','ISABEL','MARGUERITE','HATTIE','HARRIET','MOLLY','CECILIA','KRISTI','BRANDI','BLANCHE','SANDY','ROSIE','JOANNA','IRIS','EUNICE','ANGIE','INEZ','LYNDA','MADELINE','AMELIA','ALBERTA','GENEVIEVE','MONIQUE','JODI','JANIE','MAGGIE','KAYLA','SONYA','JAN','LEE','KRISTINE','CANDACE','FANNIE','MARYANN','OPAL','ALISON','YVETTE','MELODY','LUZ','SUSIE','OLIVIA','FLORA','SHELLEY','KRISTY','MAMIE','LULA','LOLA','VERNA','BEULAH','ANTOINETTE','CANDICE','JUANA','JEANNETTE','PAM','KELLI','HANNAH','WHITNEY','BRIDGET','KARLA','CELIA','LATOYA','PATTY','SHELIA','GAYLE','DELLA','VICKY','LYNNE','SHERI','MARIANNE','KARA','JACQUELYN','ERMA','BLANCA','MYRA','LETICIA','PAT','KRISTA','ROXANNE','ANGELICA','JOHNNIE','ROBYN','FRANCIS','ADRIENNE','ROSALIE','ALEXANDRA','BROOKE','BETHANY','SADIE','BERNADETTE','TRACI','JODY','KENDRA','JASMINE','NICHOLE','RACHAEL','CHELSEA','MABLE','ERNESTINE','MURIEL','MARCELLA','ELENA','KRYSTAL','ANGELINA','NADINE','KARI','ESTELLE','DIANNA','PAULETTE','LORA','MONA','DOREEN','ROSEMARIE','ANGEL','DESIREE','ANTONIA','HOPE','GINGER','JANIS','BETSY','CHRISTIE','FREDA','MERCEDES','MEREDITH','LYNETTE','TERI','CRISTINA','EULA','LEIGH','MEGHAN','SOPHIA','ELOISE','ROCHELLE','GRETCHEN','CECELIA','RAQUEL','HENRIETTA','ALYSSA','JANA','KELLEY','GWEN','KERRY','JENNA','TRICIA','LAVERNE','OLIVE','ALEXIS','TASHA','SILVIA','ELVIRA','CASEY','DELIA','SOPHIE','KATE','PATTI','LORENA','KELLIE','SONJA','LILA','LANA','DARLA','MAY','MINDY','ESSIE','MANDY','LORENE','ELSA','JOSEFINA','JEANNIE','MIRANDA','DIXIE','LUCIA','MARTA','FAITH','LELA','JOHANNA','SHARI','CAMILLE','TAMI','SHAWNA','ELISA','EBONY','MELBA','ORA','NETTIE','TABITHA','OLLIE','JAIME','WINIFRED','KRISTIE','MARINA','ALISHA','AIMEE','RENA','MYRNA','MARLA','TAMMIE','LATASHA','BONITA','PATRICE','RONDA','SHERRIE','ADDIE','FRANCINE','DELORIS','STACIE','ADRIANA','CHERI','SHELBY','ABIGAIL','CELESTE','JEWEL','CARA','ADELE','REBEKAH','LUCINDA','DORTHY','CHRIS','EFFIE','TRINA','REBA','SHAWN','SALLIE','AURORA','LENORA','ETTA','LOTTIE','KERRI','TRISHA','NIKKI','ESTELLA','FRANCISCA','JOSIE','TRACIE','MARISSA','KARIN','BRITTNEY','JANELLE','LOURDES','LAUREL','HELENE','FERN','ELVA','CORINNE','KELSEY','INA','BETTIE','ELISABETH','AIDA','CAITLIN','INGRID','IVA','EUGENIA','CHRISTA','GOLDIE','CASSIE','MAUDE','JENIFER','THERESE','FRANKIE','DENA','LORNA','JANETTE','LATONYA','CANDY','MORGAN','CONSUELO','TAMIKA','ROSETTA','DEBORA','CHERIE','POLLY','DINA','JEWELL','FAY','JILLIAN','DOROTHEA','NELL','TRUDY','ESPERANZA','PATRICA','KIMBERLEY','SHANNA','HELENA','CAROLINA','CLEO','STEFANIE','ROSARIO','OLA','JANINE','MOLLIE','LUPE','ALISA','LOU','MARIBEL','SUSANNE','BETTE','SUSANA','ELISE','CECILE','ISABELLE','LESLEY','JOCELYN','PAIGE','JONI','RACHELLE','LEOLA','DAPHNE','ALTA','ESTER','PETRA','GRACIELA','IMOGENE','JOLENE','KEISHA','LACEY','GLENNA','GABRIELA','KERI','URSULA','LIZZIE','KIRSTEN','SHANA','ADELINE','MAYRA','JAYNE','JACLYN','GRACIE','SONDRA','CARMELA','MARISA','ROSALIND','CHARITY','TONIA','BEATRIZ','MARISOL','CLARICE','JEANINE','SHEENA','ANGELINE','FRIEDA','LILY','ROBBIE','SHAUNA','MILLIE','CLAUDETTE','CATHLEEN','ANGELIA','GABRIELLE','AUTUMN','KATHARINE','SUMMER','JODIE','STACI','LEA','CHRISTI','JIMMIE','JUSTINE','ELMA','LUELLA','MARGRET','DOMINIQUE','SOCORRO','RENE','MARTINA','MARGO','MAVIS','CALLIE','BOBBI','MARITZA','LUCILE','LEANNE','JEANNINE','DEANA','AILEEN','LORIE','LADONNA','WILLA','MANUELA','GALE','SELMA','DOLLY','SYBIL','ABBY','LARA','DALE','IVY','DEE','WINNIE','MARCY','LUISA','JERI','MAGDALENA','OFELIA','MEAGAN','AUDRA','MATILDA','LEILA','CORNELIA','BIANCA','SIMONE','BETTYE','RANDI','VIRGIE','LATISHA','BARBRA','GEORGINA','ELIZA','LEANN','BRIDGETTE','RHODA','HALEY','ADELA','NOLA','BERNADINE','FLOSSIE','ILA','GRETA','RUTHIE','NELDA','MINERVA','LILLY','TERRIE','LETHA','HILARY','ESTELA','VALARIE','BRIANNA','ROSALYN','EARLINE','CATALINA','AVA','MIA','CLARISSA','LIDIA','CORRINE','ALEXANDRIA','CONCEPCION','TIA','SHARRON','RAE','DONA','ERICKA','JAMI','ELNORA','CHANDRA','LENORE','NEVA','MARYLOU','MELISA','TABATHA','SERENA','AVIS','ALLIE','SOFIA','JEANIE','ODESSA','NANNIE','HARRIETT','LORAINE','PENELOPE','MILAGROS','EMILIA','BENITA','ALLYSON','ASHLEE','TANIA','TOMMIE','ESMERALDA','KARINA','EVE','PEARLIE','ZELMA','MALINDA','NOREEN','TAMEKA','SAUNDRA','HILLARY','AMIE','ALTHEA','ROSALINDA','JORDAN','LILIA','ALANA','GAY','CLARE','ALEJANDRA','ELINOR','MICHAEL','LORRIE','JERRI','DARCY','EARNESTINE','CARMELLA','TAYLOR','NOEMI','MARCIE','LIZA','ANNABELLE','LOUISA','EARLENE','MALLORY','CARLENE','NITA','SELENA','TANISHA','KATY','JULIANNE','JOHN','LAKISHA','EDWINA','MARICELA','MARGERY','KENYA','DOLLIE','ROXIE','ROSLYN','KATHRINE','NANETTE','CHARMAINE','LAVONNE','ILENE','KRIS','TAMMI','SUZETTE','CORINE','KAYE','JERRY','MERLE','CHRYSTAL','LINA','DEANNE','LILIAN','JULIANA','ALINE','LUANN','KASEY','MARYANNE','EVANGELINE','COLETTE','MELVA','LAWANDA','YESENIA','NADIA','MADGE','KATHIE','EDDIE','OPHELIA','VALERIA','NONA','MITZI','MARI','GEORGETTE','CLAUDINE','FRAN','ALISSA','ROSEANN','LAKEISHA','SUSANNA','REVA','DEIDRE','CHASITY','SHEREE','CARLY','JAMES','ELVIA','ALYCE','DEIRDRE','GENA','BRIANA','ARACELI','KATELYN','ROSANNE','WENDI','TESSA','BERTA','MARVA','IMELDA','MARIETTA','MARCI','LEONOR','ARLINE','SASHA','MADELYN','JANNA','JULIETTE','DEENA','AURELIA','JOSEFA','AUGUSTA','LILIANA','YOUNG','CHRISTIAN','LESSIE','AMALIA','SAVANNAH','ANASTASIA','VILMA','NATALIA','ROSELLA','LYNNETTE','CORINA','ALFREDA','LEANNA','CAREY','AMPARO','COLEEN','TAMRA','AISHA','WILDA','KARYN','CHERRY','QUEEN','MAURA','MAI','EVANGELINA','ROSANNA','HALLIE','ERNA','ENID','MARIANA','LACY','JULIET','JACKLYN','FREIDA','MADELEINE','MARA','HESTER','CATHRYN','LELIA','CASANDRA','BRIDGETT','ANGELITA','JANNIE','DIONNE','ANNMARIE','KATINA','BERYL','PHOEBE','MILLICENT','KATHERYN','DIANN','CARISSA','MARYELLEN','LIZ','LAURI','HELGA','GILDA','ADRIAN','RHEA','MARQUITA','HOLLIE','TISHA','TAMERA','ANGELIQUE','FRANCESCA','BRITNEY','KAITLIN','LOLITA','FLORINE','ROWENA','REYNA','TWILA','FANNY','JANELL','INES','CONCETTA','BERTIE','ALBA','BRIGITTE','ALYSON','VONDA','PANSY','ELBA','NOELLE','LETITIA','KITTY','DEANN','BRANDIE','LOUELLA','LETA','FELECIA','SHARLENE','LESA','BEVERLEY','ROBERT','ISABELLA','HERMINIA','TERRA','CELINA','TORI','OCTAVIA','JADE','DENICE','GERMAINE','SIERRA','MICHELL','CORTNEY','NELLY','DORETHA','SYDNEY','DEIDRA','MONIKA','LASHONDA','JUDI','CHELSEY','ANTIONETTE','MARGOT','BOBBY','ADELAIDE','NAN','LEEANN','ELISHA','DESSIE','LIBBY','KATHI','GAYLA','LATANYA','MINA','MELLISA','KIMBERLEE','JASMIN','RENAE','ZELDA','ELDA','MA','JUSTINA','GUSSIE','EMILIE','CAMILLA','ABBIE','ROCIO','KAITLYN','JESSE','EDYTHE','ASHLEIGH','SELINA','LAKESHA','GERI','ALLENE','PAMALA','MICHAELA','DAYNA','CARYN','ROSALIA','SUN','JACQULINE','REBECA','MARYBETH','KRYSTLE','IOLA','DOTTIE','BENNIE','BELLE','AUBREY','GRISELDA','ERNESTINA','ELIDA','ADRIANNE','DEMETRIA','DELMA','CHONG','JAQUELINE','DESTINY','ARLEEN','VIRGINA','RETHA','FATIMA','TILLIE','ELEANORE','CARI','TREVA','BIRDIE','WILHELMINA','ROSALEE','MAURINE','LATRICE','YONG','JENA','TARYN','ELIA','DEBBY','MAUDIE','JEANNA','DELILAH','CATRINA','SHONDA','HORTENCIA','THEODORA','TERESITA','ROBBIN','DANETTE','MARYJANE','FREDDIE','DELPHINE','BRIANNE','NILDA','DANNA','CINDI','BESS','IONA','HANNA','ARIEL','WINONA','VIDA','ROSITA','MARIANNA','WILLIAM','RACHEAL','GUILLERMINA','ELOISA','CELESTINE','CAREN','MALISSA','LONA','CHANTEL','SHELLIE','MARISELA','LEORA','AGATHA','SOLEDAD','MIGDALIA','IVETTE','CHRISTEN','ATHENA','JANEL','CHLOE','VEDA','PATTIE','TESSIE','TERA','MARILYNN','LUCRETIA','KARRIE','DINAH','DANIELA','ALECIA','ADELINA','VERNICE','SHIELA','PORTIA','MERRY','LASHAWN','DEVON','DARA','TAWANA','OMA','VERDA','CHRISTIN','ALENE','ZELLA','SANDI','RAFAELA','MAYA','KIRA','CANDIDA','ALVINA','SUZAN','SHAYLA','LYN','LETTIE','ALVA','SAMATHA','ORALIA','MATILDE','MADONNA','LARISSA','VESTA','RENITA','INDIA','DELOIS','SHANDA','PHILLIS','LORRI','ERLINDA','CRUZ','CATHRINE','BARB','ZOE','ISABELL','IONE','GISELA','CHARLIE','VALENCIA','ROXANNA','MAYME','KISHA','ELLIE','MELLISSA','DORRIS','DALIA','BELLA','ANNETTA','ZOILA','RETA','REINA','LAURETTA','KYLIE','CHRISTAL','PILAR','CHARLA','ELISSA','TIFFANI','TANA','PAULINA','LEOTA','BREANNA','JAYME','CARMEL','VERNELL','TOMASA','MANDI','DOMINGA','SANTA','MELODIE','LURA','ALEXA','TAMELA','RYAN','MIRNA','KERRIE','VENUS','NOEL','FELICITA','CRISTY','CARMELITA','BERNIECE','ANNEMARIE','TIARA','ROSEANNE','MISSY','CORI','ROXANA','PRICILLA','KRISTAL','JUNG','ELYSE','HAYDEE','ALETHA','BETTINA','MARGE','GILLIAN','FILOMENA','CHARLES','ZENAIDA','HARRIETTE','CARIDAD','VADA','UNA','ARETHA','PEARLINE','MARJORY','MARCELA','FLOR','EVETTE','ELOUISE','ALINA','TRINIDAD','DAVID','DAMARIS','CATHARINE','CARROLL','BELVA','NAKIA','MARLENA','LUANNE','LORINE','KARON','DORENE','DANITA','BRENNA','TATIANA','SAMMIE','LOUANN','LOREN','JULIANNA','ANDRIA','PHILOMENA','LUCILA','LEONORA','DOVIE','ROMONA','MIMI','JACQUELIN','GAYE','TONJA','MISTI','JOE','GENE','CHASTITY','STACIA','ROXANN','MICAELA','NIKITA','MEI','VELDA','MARLYS','JOHNNA','AURA','LAVERN','IVONNE','HAYLEY','NICKI','MAJORIE','HERLINDA','GEORGE','ALPHA','YADIRA','PERLA','GREGORIA','DANIEL','ANTONETTE','SHELLI','MOZELLE','MARIAH','JOELLE','CORDELIA','JOSETTE','CHIQUITA','TRISTA','LOUIS','LAQUITA','GEORGIANA','CANDI','SHANON','LONNIE','HILDEGARD','CECIL','VALENTINA','STEPHANY','MAGDA','KAROL','GERRY','GABRIELLA','TIANA','ROMA','RICHELLE','RAY','PRINCESS','OLETA','JACQUE','IDELLA','ALAINA','SUZANNA','JOVITA','BLAIR','TOSHA','RAVEN','NEREIDA','MARLYN','KYLA','JOSEPH','DELFINA','TENA','STEPHENIE','SABINA','NATHALIE','MARCELLE','GERTIE','DARLEEN','THEA','SHARONDA','SHANTEL','BELEN','VENESSA','ROSALINA','ONA','GENOVEVA','COREY','CLEMENTINE','ROSALBA','RENATE','RENATA','MI','IVORY','GEORGIANNA','FLOY','DORCAS','ARIANA','TYRA','THEDA','MARIAM','JULI','JESICA','DONNIE','VIKKI','VERLA','ROSELYN','MELVINA','JANNETTE','GINNY','DEBRAH','CORRIE','ASIA','VIOLETA','MYRTIS','LATRICIA','COLLETTE','CHARLEEN','ANISSA','VIVIANA','TWYLA','PRECIOUS','NEDRA','LATONIA','LAN','HELLEN','FABIOLA','ANNAMARIE','ADELL','SHARYN','CHANTAL','NIKI','MAUD','LIZETTE','LINDY','KIA','KESHA','JEANA','DANELLE','CHARLINE','CHANEL','CARROL','VALORIE','LIA','DORTHA','CRISTAL','SUNNY','LEONE','LEILANI','GERRI','DEBI','ANDRA','KESHIA','IMA','EULALIA','EASTER','DULCE','NATIVIDAD','LINNIE','KAMI','GEORGIE','CATINA','BROOK','ALDA','WINNIFRED','SHARLA','RUTHANN','MEAGHAN','MAGDALENE','LISSETTE','ADELAIDA','VENITA','TRENA','SHIRLENE','SHAMEKA','ELIZEBETH','DIAN','SHANTA','MICKEY','LATOSHA','CARLOTTA','WINDY','SOON','ROSINA','MARIANN','LEISA','JONNIE','DAWNA','CATHIE','BILLY','ASTRID','SIDNEY','LAUREEN','JANEEN','HOLLI','FAWN','VICKEY','TERESSA','SHANTE','RUBYE','MARCELINA','CHANDA','CARY','TERESE','SCARLETT','MARTY','MARNIE','LULU','LISETTE','JENIFFER','ELENOR','DORINDA','DONITA','CARMAN','BERNITA','ALTAGRACIA','ALETA','ADRIANNA','ZORAIDA','RONNIE','NICOLA','LYNDSEY','KENDALL','JANINA','CHRISSY','AMI','STARLA','PHYLIS','PHUONG','KYRA','CHARISSE','BLANCH','SANJUANITA','RONA','NANCI','MARILEE','MARANDA','CORY','BRIGETTE','SANJUANA','MARITA','KASSANDRA','JOYCELYN','IRA','FELIPA','CHELSIE','BONNY','MIREYA','LORENZA','KYONG','ILEANA','CANDELARIA','TONY','TOBY','SHERIE','OK','MARK','LUCIE','LEATRICE','LAKESHIA','GERDA','EDIE','BAMBI','MARYLIN','LAVON','HORTENSE','GARNET','EVIE','TRESSA','SHAYNA','LAVINA','KYUNG','JEANETTA','SHERRILL','SHARA','PHYLISS','MITTIE','ANABEL','ALESIA','THUY','TAWANDA','RICHARD','JOANIE','TIFFANIE','LASHANDA','KARISSA','ENRIQUETA','DARIA','DANIELLA','CORINNA','ALANNA','ABBEY','ROXANE','ROSEANNA','MAGNOLIA','LIDA','KYLE','JOELLEN','ERA','CORAL','CARLEEN','TRESA','PEGGIE','NOVELLA','NILA','MAYBELLE','JENELLE','CARINA','NOVA','MELINA','MARQUERITE','MARGARETTE','JOSEPHINA','EVONNE','DEVIN','CINTHIA','ALBINA','TOYA','TAWNYA','SHERITA','SANTOS','MYRIAM','LIZABETH','LISE','KEELY','JENNI','GISELLE','CHERYLE','ARDITH','ARDIS','ALESHA','ADRIANE','SHAINA','LINNEA','KAROLYN','HONG','FLORIDA','FELISHA','DORI','DARCI','ARTIE','ARMIDA','ZOLA','XIOMARA','VERGIE','SHAMIKA','NENA','NANNETTE','MAXIE','LOVIE','JEANE','JAIMIE','INGE','FARRAH','ELAINA','CAITLYN','STARR','FELICITAS','CHERLY','CARYL','YOLONDA','YASMIN','TEENA','PRUDENCE','PENNIE','NYDIA','MACKENZIE','ORPHA','MARVEL','LIZBETH','LAURETTE','JERRIE','HERMELINDA','CAROLEE','TIERRA','MIRIAN','META','MELONY','KORI','JENNETTE','JAMILA','ENA','ANH','YOSHIKO','SUSANNAH','SALINA','RHIANNON','JOLEEN','CRISTINE','ASHTON','ARACELY','TOMEKA','SHALONDA','MARTI','LACIE','KALA','JADA','ILSE','HAILEY','BRITTANI','ZONA','SYBLE','SHERRYL','RANDY','NIDIA','MARLO','KANDICE','KANDI','DEB','DEAN','AMERICA','ALYCIA','TOMMY','RONNA','NORENE','MERCY','JOSE','INGEBORG','GIOVANNA','GEMMA','CHRISTEL','AUDRY','ZORA','VITA','VAN','TRISH','STEPHAINE','SHIRLEE','SHANIKA','MELONIE','MAZIE','JAZMIN','INGA','HOA','HETTIE','GERALYN','FONDA','ESTRELLA','ADELLA','SU','SARITA','RINA','MILISSA','MARIBETH','GOLDA','EVON','ETHELYN','ENEDINA','CHERISE','CHANA','VELVA','TAWANNA','SADE','MIRTA','LI','KARIE','JACINTA','ELNA','DAVINA','CIERRA','ASHLIE','ALBERTHA','TANESHA','STEPHANI','NELLE','MINDI','LU','LORINDA','LARUE','FLORENE','DEMETRA','DEDRA','CIARA','CHANTELLE','ASHLY','SUZY','ROSALVA','NOELIA','LYDA','LEATHA','KRYSTYNA','KRISTAN','KARRI','DARLINE','DARCIE','CINDA','CHEYENNE','CHERRIE','AWILDA','ALMEDA','ROLANDA','LANETTE','JERILYN','GISELE','EVALYN','CYNDI','CLETA','CARIN','ZINA','ZENA','VELIA','TANIKA','PAUL','CHARISSA','THOMAS','TALIA','MARGARETE','LAVONDA','KAYLEE','KATHLENE','JONNA','IRENA','ILONA','IDALIA','CANDIS','CANDANCE','BRANDEE','ANITRA','ALIDA','SIGRID','NICOLETTE','MARYJO','LINETTE','HEDWIG','CHRISTIANA','CASSIDY','ALEXIA','TRESSIE','MODESTA','LUPITA','LITA','GLADIS','EVELIA','DAVIDA','CHERRI','CECILY','ASHELY','ANNABEL','AGUSTINA','WANITA','SHIRLY','ROSAURA','HULDA','EUN','BAILEY','YETTA','VERONA','THOMASINA','SIBYL','SHANNAN','MECHELLE','LUE','LEANDRA','LANI','KYLEE','KANDY','JOLYNN','FERNE','EBONI','CORENE','ALYSIA','ZULA','NADA','MOIRA','LYNDSAY','LORRETTA','JUAN','JAMMIE','HORTENSIA','GAYNELL','CAMERON','ADRIA','VINA','VICENTA','TANGELA','STEPHINE','NORINE','NELLA','LIANA','LESLEE','KIMBERELY','ILIANA','GLORY','FELICA','EMOGENE','ELFRIEDE','EDEN','EARTHA','CARMA','BEA','OCIE','MARRY','LENNIE','KIARA','JACALYN','CARLOTA','ARIELLE','YU','STAR','OTILIA','KIRSTIN','KACEY','JOHNETTA','JOEY','JOETTA','JERALDINE','JAUNITA','ELANA','DORTHEA','CAMI','AMADA','ADELIA','VERNITA','TAMAR','SIOBHAN','RENEA','RASHIDA','OUIDA','ODELL','NILSA','MERYL','KRISTYN','JULIETA','DANICA','BREANNE','AUREA','ANGLEA','SHERRON','ODETTE','MALIA','LORELEI','LIN','LEESA','KENNA','KATHLYN','FIONA','CHARLETTE','SUZIE','SHANTELL','SABRA','RACQUEL','MYONG','MIRA','MARTINE','LUCIENNE','LAVADA','JULIANN','JOHNIE','ELVERA','DELPHIA','CLAIR','CHRISTIANE','CHAROLETTE','CARRI','AUGUSTINE','ASHA','ANGELLA','PAOLA','NINFA','LEDA','LAI','EDA','SUNSHINE','STEFANI','SHANELL','PALMA','MACHELLE','LISSA','KECIA','KATHRYNE','KARLENE','JULISSA','JETTIE','JENNIFFER','HUI','CORRINA','CHRISTOPHER','CAROLANN','ALENA','TESS','ROSARIA','MYRTICE','MARYLEE','LIANE','KENYATTA','JUDIE','JANEY','IN','ELMIRA','ELDORA','DENNA','CRISTI','CATHI','ZAIDA','VONNIE','VIVA','VERNIE','ROSALINE','MARIELA','LUCIANA','LESLI','KARAN','FELICE','DENEEN','ADINA','WYNONA','TARSHA','SHERON','SHASTA','SHANITA','SHANI','SHANDRA','RANDA','PINKIE','PARIS','NELIDA','MARILOU','LYLA','LAURENE','LACI','JOI','JANENE','DOROTHA','DANIELE','DANI','CAROLYNN','CARLYN','BERENICE','AYESHA','ANNELIESE','ALETHEA','THERSA','TAMIKO','RUFINA','OLIVA','MOZELL','MARYLYN','MADISON','KRISTIAN','KATHYRN','KASANDRA','KANDACE','JANAE','GABRIEL','DOMENICA','DEBBRA','DANNIELLE','CHUN','BUFFY','BARBIE','ARCELIA','AJA','ZENOBIA','SHAREN','SHAREE','PATRICK','PAGE','MY','LAVINIA','KUM','KACIE','JACKELINE','HUONG','FELISA','EMELIA','ELEANORA','CYTHIA','CRISTIN','CLYDE','CLARIBEL','CARON','ANASTACIA','ZULMA','ZANDRA','YOKO','TENISHA','SUSANN','SHERILYN','SHAY','SHAWANDA','SABINE','ROMANA','MATHILDA','LINSEY','KEIKO','JOANA','ISELA','GRETTA','GEORGETTA','EUGENIE','DUSTY','DESIRAE','DELORA','CORAZON','ANTONINA','ANIKA','WILLENE','TRACEE','TAMATHA','REGAN','NICHELLE','MICKIE','MAEGAN','LUANA','LANITA','KELSIE','EDELMIRA','BREE','AFTON','TEODORA','TAMIE','SHENA','MEG','LINH','KELI','KACI','DANYELLE','BRITT','ARLETTE','ALBERTINE','ADELLE','TIFFINY','STORMY','SIMONA','NUMBERS','NICOLASA','NICHOL','NIA','NAKISHA','MEE','MAIRA','LOREEN','KIZZY','JOHNNY','JAY','FALLON','CHRISTENE','BOBBYE','ANTHONY','YING','VINCENZA','TANJA','RUBIE','RONI','QUEENIE','MARGARETT','KIMBERLI','IRMGARD','IDELL','HILMA','EVELINA','ESTA','EMILEE','DENNISE','DANIA','CARL','CARIE','ANTONIO','WAI','SANG','RISA','RIKKI','PARTICIA','MUI','MASAKO','MARIO','LUVENIA','LOREE','LONI','LIEN','KEVIN','GIGI','FLORENCIA','DORIAN','DENITA','DALLAS','CHI','BILLYE','ALEXANDER','TOMIKA','SHARITA','RANA','NIKOLE','NEOMA','MARGARITE','MADALYN','LUCINA','LAILA','KALI','JENETTE','GABRIELE','EVELYNE','ELENORA','CLEMENTINA','ALEJANDRINA','ZULEMA','VIOLETTE','VANNESSA','THRESA','RETTA','PIA','PATIENCE','NOELLA','NICKIE','JONELL','DELTA','CHUNG','CHAYA','CAMELIA','BETHEL','ANYA','ANDREW','THANH','SUZANN','SPRING','SHU','MILA','LILLA','LAVERNA','KEESHA','KATTIE','GIA','GEORGENE','EVELINE','ESTELL','ELIZBETH','VIVIENNE','VALLIE','TRUDIE','STEPHANE','MICHEL','MAGALY','MADIE','KENYETTA','KARREN','JANETTA','HERMINE','HARMONY','DRUCILLA','DEBBI','CELESTINA','CANDIE','BRITNI','BECKIE','AMINA','ZITA','YUN','YOLANDE','VIVIEN','VERNETTA','TRUDI','SOMMER','PEARLE','PATRINA','OSSIE','NICOLLE','LOYCE','LETTY','LARISA','KATHARINA','JOSELYN','JONELLE','JENELL','IESHA','HEIDE','FLORINDA','FLORENTINA','FLO','ELODIA','DORINE','BRUNILDA','BRIGID','ASHLI','ARDELLA','TWANA','THU','TARAH','SUNG','SHEA','SHAVON','SHANE','SERINA','RAYNA','RAMONITA','NGA','MARGURITE','LUCRECIA','KOURTNEY','KATI','JESUS','JESENIA','DIAMOND','CRISTA','AYANA','ALICA','ALIA','VINNIE','SUELLEN','ROMELIA','RACHELL','PIPER','OLYMPIA','MICHIKO','KATHALEEN','JOLIE','JESSI','JANESSA','HANA','HA','ELEASE','CARLETTA','BRITANY','SHONA','SALOME','ROSAMOND','REGENA','RAINA','NGOC','NELIA','LOUVENIA','LESIA','LATRINA','LATICIA','LARHONDA','JINA','JACKI','HOLLIS','HOLLEY','EMMY','DEEANN','CORETTA','ARNETTA','VELVET','THALIA','SHANICE','NETA','MIKKI','MICKI','LONNA','LEANA','LASHUNDA','KILEY','JOYE','JACQULYN','IGNACIA','HYUN','HIROKO','HENRY','HENRIETTE','ELAYNE','DELINDA','DARNELL','DAHLIA','COREEN','CONSUELA','CONCHITA','CELINE','BABETTE','AYANNA','ANETTE','ALBERTINA','SKYE','SHAWNEE','SHANEKA','QUIANA','PAMELIA','MIN','MERRI','MERLENE','MARGIT','KIESHA','KIERA','KAYLENE','JODEE','JENISE','ERLENE','EMMIE','ELSE','DARYL','DALILA','DAISEY','CODY','CASIE','BELIA','BABARA','VERSIE','VANESA','SHELBA','SHAWNDA','SAM','NORMAN','NIKIA','NAOMA','MARNA','MARGERET','MADALINE','LAWANA','KINDRA','JUTTA','JAZMINE','JANETT','HANNELORE','GLENDORA','GERTRUD','GARNETT','FREEDA','FREDERICA','FLORANCE','FLAVIA','DENNIS','CARLINE','BEVERLEE','ANJANETTE','VALDA','TRINITY','TAMALA','STEVIE','SHONNA','SHA','SARINA','ONEIDA','MICAH','MERILYN','MARLEEN','LURLINE','LENNA','KATHERIN','JIN','JENI','HAE','GRACIA','GLADY','FARAH','ERIC','ENOLA','EMA','DOMINQUE','DEVONA','DELANA','CECILA','CAPRICE','ALYSHA','ALI','ALETHIA','VENA','THERESIA','TAWNY','SONG','SHAKIRA','SAMARA','SACHIKO','RACHELE','PAMELLA','NICKY','MARNI','MARIEL','MAREN','MALISA','LIGIA','LERA','LATORIA','LARAE','KIMBER','KATHERN','KAREY','JENNEFER','JANETH','HALINA','FREDIA','DELISA','DEBROAH','CIERA','CHIN','ANGELIKA','ANDREE','ALTHA','YEN','VIVAN','TERRESA','TANNA','SUK','SUDIE','SOO','SIGNE','SALENA','RONNI','REBBECCA','MYRTIE','MCKENZIE','MALIKA','MAIDA','LOAN','LEONARDA','KAYLEIGH','FRANCE','ETHYL','ELLYN','DAYLE','CAMMIE','BRITTNI','BIRGIT','AVELINA','ASUNCION','ARIANNA','AKIKO','VENICE','TYESHA','TONIE','TIESHA','TAKISHA','STEFFANIE','SINDY','SANTANA','MEGHANN','MANDA','MACIE','LADY','KELLYE','KELLEE','JOSLYN','JASON','INGER','INDIRA','GLINDA','GLENNIS','FERNANDA','FAUSTINA','ENEIDA','ELICIA','DOT','DIGNA','DELL','ARLETTA','ANDRE','WILLIA','TAMMARA','TABETHA','SHERRELL','SARI','REFUGIO','REBBECA','PAULETTA','NIEVES','NATOSHA','NAKITA','MAMMIE','KENISHA','KAZUKO','KASSIE','GARY','EARLEAN','DAPHINE','CORLISS','CLOTILDE','CAROLYNE','BERNETTA','AUGUSTINA','AUDREA','ANNIS','ANNABELL','YAN','TENNILLE','TAMICA','SELENE','SEAN','ROSANA','REGENIA','QIANA','MARKITA','MACY','LEEANNE','LAURINE','KYM','JESSENIA','JANITA','GEORGINE','GENIE','EMIKO','ELVIE','DEANDRA','DAGMAR','CORIE','COLLEN','CHERISH','ROMAINE','PORSHA','PEARLENE','MICHELINE','MERNA','MARGORIE','MARGARETTA','LORE','KENNETH','JENINE','HERMINA','FREDERICKA','ELKE','DRUSILLA','DORATHY','DIONE','DESIRE','CELENA','BRIGIDA','ANGELES','ALLEGRA','THEO','TAMEKIA','SYNTHIA','STEPHEN','SOOK','SLYVIA','ROSANN','REATHA','RAYE','MARQUETTA','MARGART','LING','LAYLA','KYMBERLY','KIANA','KAYLEEN','KATLYN','KARMEN','JOELLA','IRINA','EMELDA','ELENI','DETRA','CLEMMIE','CHERYLL','CHANTELL','CATHEY','ARNITA','ARLA','ANGLE','ANGELIC','ALYSE','ZOFIA','THOMASINE','TENNIE','SON','SHERLY','SHERLEY','SHARYL','REMEDIOS','PETRINA','NICKOLE','MYUNG','MYRLE','MOZELLA','LOUANNE','LISHA','LATIA','LANE','KRYSTA','JULIENNE','JOEL','JEANENE','JACQUALINE','ISAURA','GWENDA','EARLEEN','DONALD','CLEOPATRA','CARLIE','AUDIE','ANTONIETTA','ALISE','ALEX','VERDELL','VAL','TYLER','TOMOKO','THAO','TALISHA','STEVEN','SO','SHEMIKA','SHAUN','SCARLET','SAVANNA','SANTINA','ROSIA','RAEANN','ODILIA','NANA','MINNA','MAGAN','LYNELLE','LE','KARMA','JOEANN','IVANA','INELL','ILANA','HYE','HONEY','HEE','GUDRUN','FRANK','DREAMA','CRISSY','CHANTE','CARMELINA','ARVILLA','ARTHUR','ANNAMAE','ALVERA','ALEIDA','AARON','YEE','YANIRA','VANDA','TIANNA','TAM','STEFANIA','SHIRA','PERRY','NICOL','NANCIE','MONSERRATE','MINH','MELYNDA','MELANY','MATTHEW','LOVELLA','LAURE','KIRBY','KACY','JACQUELYNN','HYON','GERTHA','FRANCISCO','ELIANA','CHRISTENA','CHRISTEEN','CHARISE','CATERINA','CARLEY','CANDYCE','ARLENA','AMMIE','YANG','WILLETTE','VANITA','TUYET','TINY','SYREETA','SILVA','SCOTT','RONALD','PENNEY','NYLA','MICHAL','MAURICE','MARYAM','MARYA','MAGEN','LUDIE','LOMA','LIVIA','LANELL','KIMBERLIE','JULEE','DONETTA','DIEDRA','DENISHA','DEANE','DAWNE','CLARINE','CHERRYL','BRONWYN','BRANDON','ALLA','VALERY','TONDA','SUEANN','SORAYA','SHOSHANA','SHELA','SHARLEEN','SHANELLE','NERISSA','MICHEAL','MERIDITH','MELLIE','MAYE','MAPLE','MAGARET','LUIS','LILI','LEONILA','LEONIE','LEEANNA','LAVONIA','LAVERA','KRISTEL','KATHEY','KATHE','JUSTIN','JULIAN','JIMMY','JANN','ILDA','HILDRED','HILDEGARDE','GENIA','FUMIKO','EVELIN','ERMELINDA','ELLY','DUNG','DOLORIS','DIONNA','DANAE','BERNEICE','ANNICE','ALIX','VERENA','VERDIE','TRISTAN','SHAWNNA','SHAWANA','SHAUNNA','ROZELLA','RANDEE','RANAE','MILAGRO','LYNELL','LUISE','LOUIE','LOIDA','LISBETH','KARLEEN','JUNITA','JONA','ISIS','HYACINTH','HEDY','GWENN','ETHELENE','ERLINE','EDWARD','DONYA','DOMONIQUE','DELICIA','DANNETTE','CICELY','BRANDA','BLYTHE','BETHANN','ASHLYN','ANNALEE','ALLINE','YUKO','VELLA','TRANG','TOWANDA','TESHA','SHERLYN','NARCISA','MIGUELINA','MERI','MAYBELL','MARLANA','MARGUERITA','MADLYN','LUNA','LORY','LORIANN','LIBERTY','LEONORE','LEIGHANN','LAURICE','LATESHA','LARONDA','KATRICE','KASIE','KARL','KALEY','JADWIGA','GLENNIE','GEARLDINE','FRANCINA','EPIFANIA','DYAN','DORIE','DIEDRE','DENESE','DEMETRICE','DELENA','DARBY','CRISTIE','CLEORA','CATARINA','CARISA','BERNIE','BARBERA','ALMETA','TRULA','TEREASA','SOLANGE','SHEILAH','SHAVONNE','SANORA','ROCHELL','MATHILDE','MARGARETA','MAIA','LYNSEY','LAWANNA','LAUNA','KENA','KEENA','KATIA','JAMEY','GLYNDA','GAYLENE','ELVINA','ELANOR','DANUTA','DANIKA','CRISTEN','CORDIE','COLETTA','CLARITA','CARMON','BRYNN','AZUCENA','AUNDREA','ANGELE','YI','WALTER','VERLIE','VERLENE','TAMESHA','SILVANA','SEBRINA','SAMIRA','REDA','RAYLENE','PENNI','PANDORA','NORAH','NOMA','MIREILLE','MELISSIA','MARYALICE','LARAINE','KIMBERY','KARYL','KARINE','KAM','JOLANDA','JOHANA','JESUSA','JALEESA','JAE','JACQUELYNE','IRISH','ILUMINADA','HILARIA','HANH','GENNIE','FRANCIE','FLORETTA','EXIE','EDDA','DREMA','DELPHA','BEV','BARBAR','ASSUNTA','ARDELL','ANNALISA','ALISIA','YUKIKO','YOLANDO','WONDA','WEI','WALTRAUD','VETA','TEQUILA','TEMEKA','TAMEIKA','SHIRLEEN','SHENITA','PIEDAD','OZELLA','MIRTHA','MARILU','KIMIKO','JULIANE','JENICE','JEN','JANAY','JACQUILINE','HILDE','FE','FAE','EVAN','EUGENE','ELOIS','ECHO','DEVORAH','CHAU','BRINDA','BETSEY','ARMINDA','ARACELIS','APRYL','ANNETT','ALISHIA','VEOLA','USHA','TOSHIKO','THEOLA','TASHIA','TALITHA','SHERY','RUDY','RENETTA','REIKO','RASHEEDA','OMEGA','OBDULIA','MIKA','MELAINE','MEGGAN','MARTIN','MARLEN','MARGET','MARCELINE','MANA','MAGDALEN','LIBRADA','LEZLIE','LEXIE','LATASHIA','LASANDRA','KELLE','ISIDRA','ISA','INOCENCIA','GWYN','FRANCOISE','ERMINIA','ERINN','DIMPLE','DEVORA','CRISELDA','ARMANDA','ARIE','ARIANE','ANGELO','ANGELENA','ALLEN','ALIZA','ADRIENE','ADALINE','XOCHITL','TWANNA','TRAN','TOMIKO','TAMISHA','TAISHA','SUSY','SIU','RUTHA','ROXY','RHONA','RAYMOND','OTHA','NORIKO','NATASHIA','MERRIE','MELVIN','MARINDA','MARIKO','MARGERT','LORIS','LIZZETTE','LEISHA','KAILA','KA','JOANNIE','JERRICA','JENE','JANNET','JANEE','JACINDA','HERTA','ELENORE','DORETTA','DELAINE','DANIELL','CLAUDIE','CHINA','BRITTA','APOLONIA','AMBERLY','ALEASE','YURI','YUK','WEN','WANETA','UTE','TOMI','SHARRI','SANDIE','ROSELLE','REYNALDA','RAGUEL','PHYLICIA','PATRIA','OLIMPIA','ODELIA','MITZIE','MITCHELL','MISS','MINDA','MIGNON','MICA','MENDY','MARIVEL','MAILE','LYNETTA','LAVETTE','LAURYN','LATRISHA','LAKIESHA','KIERSTEN','KARY','JOSPHINE','JOLYN','JETTA','JANISE','JACQUIE','IVELISSE','GLYNIS','GIANNA','GAYNELLE','EMERALD','DEMETRIUS','DANYELL','DANILLE','DACIA','CORALEE','CHER','CEOLA','BRETT','BELL','ARIANNE','ALESHIA','YUNG','WILLIEMAE','TROY','TRINH','THORA','TAI','SVETLANA','SHERIKA','SHEMEKA','SHAUNDA','ROSELINE','RICKI','MELDA','MALLIE','LAVONNA','LATINA','LARRY','LAQUANDA','LALA','LACHELLE','KLARA','KANDIS','JOHNA','JEANMARIE','JAYE','HANG','GRAYCE','GERTUDE','EMERITA','EBONIE','CLORINDA','CHING','CHERY','CAROLA','BREANN','BLOSSOM','BERNARDINE','BECKI','ARLETHA','ARGELIA','ARA','ALITA','YULANDA','YON','YESSENIA','TOBI','TASIA','SYLVIE','SHIRL','SHIRELY','SHERIDAN','SHELLA','SHANTELLE','SACHA','ROYCE','REBECKA','REAGAN','PROVIDENCIA','PAULENE','MISHA','MIKI','MARLINE','MARICA','LORITA','LATOYIA','LASONYA','KERSTIN','KENDA','KEITHA','KATHRIN','JAYMIE','JACK','GRICELDA','GINETTE','ERYN','ELINA','ELFRIEDA','DANYEL','CHEREE','CHANELLE','BARRIE','AVERY','AURORE','ANNAMARIA','ALLEEN','AILENE','AIDE','YASMINE','VASHTI','VALENTINE','TREASA','TORY','TIFFANEY','SHERYLL','SHARIE','SHANAE','SAU','RAISA','PA','NEDA','MITSUKO','MIRELLA','MILDA','MARYANNA','MARAGRET','MABELLE','LUETTA','LORINA','LETISHA','LATARSHA','LANELLE','LAJUANA','KRISSY','KARLY','KARENA','JON','JESSIKA','JERICA','JEANELLE','JANUARY','JALISA','JACELYN','IZOLA','IVEY','GREGORY','EUNA','ETHA','DREW','DOMITILA','DOMINICA','DAINA','CREOLA','CARLI','CAMIE','BUNNY','BRITTNY','ASHANTI','ANISHA','ALEEN','ADAH','YASUKO','WINTER','VIKI','VALRIE','TONA','TINISHA','THI','TERISA','TATUM','TANEKA','SIMONNE','SHALANDA','SERITA','RESSIE','REFUGIA','PAZ','OLENE','NA','MERRILL','MARGHERITA','MANDIE','MAN','MAIRE','LYNDIA','LUCI','LORRIANE','LORETA','LEONIA','LAVONA','LASHAWNDA','LAKIA','KYOKO','KRYSTINA','KRYSTEN','KENIA','KELSI','JUDE','JEANICE','ISOBEL','GEORGIANN','GENNY','FELICIDAD','EILENE','DEON','DELOISE','DEEDEE','DANNIE','CONCEPTION','CLORA','CHERILYN','CHANG','CALANDRA','BERRY','ARMANDINA','ANISA','ULA','TIMOTHY','TIERA','THERESSA','STEPHANIA','SIMA','SHYLA','SHONTA','SHERA','SHAQUITA','SHALA','SAMMY','ROSSANA','NOHEMI','NERY','MORIAH','MELITA','MELIDA','MELANI','MARYLYNN','MARISHA','MARIETTE','MALORIE','MADELENE','LUDIVINA','LORIA','LORETTE','LORALEE','LIANNE','LEON','LAVENIA','LAURINDA','LASHON','KIT','KIMI','KEILA','KATELYNN','KAI','JONE','JOANE','JI','JAYNA','JANELLA','JA','HUE','HERTHA','FRANCENE','ELINORE','DESPINA','DELSIE','DEEDRA','CLEMENCIA','CARRY','CAROLIN','CARLOS','BULAH','BRITTANIE','BOK','BLONDELL','BIBI','BEAULAH','BEATA','ANNITA','AGRIPINA','VIRGEN','VALENE','UN','TWANDA','TOMMYE','TOI','TARRA','TARI','TAMMERA','SHAKIA','SADYE','RUTHANNE','ROCHEL','RIVKA','PURA','NENITA','NATISHA','MING','MERRILEE','MELODEE','MARVIS','LUCILLA','LEENA','LAVETA','LARITA','LANIE','KEREN','ILEEN','GEORGEANN','GENNA','GENESIS','FRIDA','EWA','EUFEMIA','EMELY','ELA','EDYTH','DEONNA','DEADRA','DARLENA','CHANELL','CHAN','CATHERN','CASSONDRA','CASSAUNDRA','BERNARDA','BERNA','ARLINDA','ANAMARIA','ALBERT','WESLEY','VERTIE','VALERI','TORRI','TATYANA','STASIA','SHERISE','SHERILL','SEASON','SCOTTIE','SANDA','RUTHE','ROSY','ROBERTO','ROBBI','RANEE','QUYEN','PEARLY','PALMIRA','ONITA','NISHA','NIESHA','NIDA','NEVADA','NAM','MERLYN','MAYOLA','MARYLOUISE','MARYLAND','MARX','MARTH','MARGENE','MADELAINE','LONDA','LEONTINE','LEOMA','LEIA','LAWRENCE','LAURALEE','LANORA','LAKITA','KIYOKO','KETURAH','KATELIN','KAREEN','JONIE','JOHNETTE','JENEE','JEANETT','IZETTA','HIEDI','HEIKE','HASSIE','HAROLD','GIUSEPPINA','GEORGANN','FIDELA','FERNANDE','ELWANDA','ELLAMAE','ELIZ','DUSTI','DOTTY','CYNDY','CORALIE','CELESTA','ARGENTINA','ALVERTA','XENIA','WAVA','VANETTA','TORRIE','TASHINA','TANDY','TAMBRA','TAMA','STEPANIE','SHILA','SHAUNTA','SHARAN','SHANIQUA','SHAE','SETSUKO','SERAFINA','SANDEE','ROSAMARIA','PRISCILA','OLINDA','NADENE','MUOI','MICHELINA','MERCEDEZ','MARYROSE','MARIN','MARCENE','MAO','MAGALI','MAFALDA','LOGAN','LINN','LANNIE','KAYCE','KAROLINE','KAMILAH','KAMALA','JUSTA','JOLINE','JENNINE','JACQUETTA','IRAIDA','GERALD','GEORGEANNA','FRANCHESCA','FAIRY','EMELINE','ELANE','EHTEL','EARLIE','DULCIE','DALENE','CRIS','CLASSIE','CHERE','CHARIS','CAROYLN','CARMINA','CARITA','BRIAN','BETHANIE','AYAKO','ARICA','AN','ALYSA','ALESSANDRA','AKILAH','ADRIEN','ZETTA','YOULANDA','YELENA','YAHAIRA','XUAN','WENDOLYN','VICTOR','TIJUANA','TERRELL','TERINA','TERESIA','SUZI','SUNDAY','SHERELL','SHAVONDA','SHAUNTE','SHARDA','SHAKITA','SENA','RYANN','RUBI','RIVA','REGINIA','REA','RACHAL','PARTHENIA','PAMULA','MONNIE','MONET','MICHAELE','MELIA','MARINE','MALKA','MAISHA','LISANDRA','LEO','LEKISHA','LEAN','LAURENCE','LAKENDRA','KRYSTIN','KORTNEY','KIZZIE','KITTIE','KERA','KENDAL','KEMBERLY','KANISHA','JULENE','JULE','JOSHUA','JOHANNE','JEFFREY','JAMEE','HAN','HALLEY','GIDGET','GALINA','FREDRICKA','FLETA','FATIMAH','EUSEBIA','ELZA','ELEONORE','DORTHEY','DORIA','DONELLA','DINORAH','DELORSE','CLARETHA','CHRISTINIA','CHARLYN','BONG','BELKIS','AZZIE','ANDERA','AIKO','ADENA','YER','YAJAIRA','WAN','VANIA','ULRIKE','TOSHIA','TIFANY','STEFANY','SHIZUE','SHENIKA','SHAWANNA','SHAROLYN','SHARILYN','SHAQUANA','SHANTAY','SEE','ROZANNE','ROSELEE','RICKIE','REMONA','REANNA','RAELENE','QUINN','PHUNG','PETRONILA','NATACHA','NANCEY','MYRL','MIYOKO','MIESHA','MERIDETH','MARVELLA','MARQUITTA','MARHTA','MARCHELLE','LIZETH','LIBBIE','LAHOMA','LADAWN','KINA','KATHELEEN','KATHARYN','KARISA','KALEIGH','JUNIE','JULIEANN','JOHNSIE','JANEAN','JAIMEE','JACKQUELINE','HISAKO','HERMA','HELAINE','GWYNETH','GLENN','GITA','EUSTOLIA','EMELINA','ELIN','EDRIS','DONNETTE','DONNETTA','DIERDRE','DENAE','DARCEL','CLAUDE','CLARISA','CINDERELLA','CHIA','CHARLESETTA','CHARITA','CELSA','CASSY','CASSI','CARLEE','BRUNA','BRITTANEY','BRANDE','BILLI','BAO','ANTONETTA','ANGLA','ANGELYN','ANALISA','ALANE','WENONA','WENDIE','VERONIQUE','VANNESA','TOBIE','TEMPIE','SUMIKO','SULEMA','SPARKLE','SOMER','SHEBA','SHAYNE','SHARICE','SHANEL','SHALON','SAGE','ROY','ROSIO','ROSELIA','RENAY','REMA','REENA','PORSCHE','PING','PEG','OZIE','ORETHA','ORALEE','ODA','NU','NGAN','NAKESHA','MILLY','MARYBELLE','MARLIN','MARIS','MARGRETT','MARAGARET','MANIE','LURLENE','LILLIA','LIESELOTTE','LAVELLE','LASHAUNDA','LAKEESHA','KEITH','KAYCEE','KALYN','JOYA','JOETTE','JENAE','JANIECE','ILLA','GRISEL','GLAYDS','GENEVIE','GALA','FREDDA','FRED','ELMER','ELEONOR','DEBERA','DEANDREA','DAN','CORRINNE','CORDIA','CONTESSA','COLENE','CLEOTILDE','CHARLOTT','CHANTAY','CECILLE','BEATRIS','AZALEE','ARLEAN','ARDATH','ANJELICA','ANJA','ALFREDIA','ALEISHA','ADAM','ZADA','YUONNE','XIAO','WILLODEAN','WHITLEY','VENNIE','VANNA','TYISHA','TOVA','TORIE','TONISHA','TILDA','TIEN','TEMPLE','SIRENA','SHERRIL','SHANTI','SHAN','SENAIDA','SAMELLA','ROBBYN','RENDA','REITA','PHEBE','PAULITA','NOBUKO','NGUYET','NEOMI','MOON','MIKAELA','MELANIA','MAXIMINA','MARG','MAISIE','LYNNA','LILLI','LAYNE','LASHAUN','LAKENYA','LAEL','KIRSTIE','KATHLINE','KASHA','KARLYN','KARIMA','JOVAN','JOSEFINE','JENNELL','JACQUI','JACKELYN','HYO','HIEN','GRAZYNA','FLORRIE','FLORIA','ELEONORA','DWANA','DORLA','DONG','DELMY','DEJA','DEDE','DANN','CRYSTA','CLELIA','CLARIS','CLARENCE','CHIEKO','CHERLYN','CHERELLE','CHARMAIN','CHARA','CAMMY','BEE','ARNETTE','ARDELLE','ANNIKA','AMIEE','AMEE','ALLENA','YVONE','YUKI','YOSHIE','YEVETTE','YAEL','WILLETTA','VONCILE','VENETTA','TULA','TONETTE','TIMIKA','TEMIKA','TELMA','TEISHA','TAREN','TA','STACEE','SHIN','SHAWNTA','SATURNINA','RICARDA','POK','PASTY','ONIE','NUBIA','MORA','MIKE','MARIELLE','MARIELLA','MARIANELA','MARDELL','MANY','LUANNA','LOISE','LISABETH','LINDSY','LILLIANA','LILLIAM','LELAH','LEIGHA','LEANORA','LANG','KRISTEEN','KHALILAH','KEELEY','KANDRA','JUNKO','JOAQUINA','JERLENE','JANI','JAMIKA','JAME','HSIU','HERMILA','GOLDEN','GENEVIVE','EVIA','EUGENA','EMMALINE','ELFREDA','ELENE','DONETTE','DELCIE','DEEANNA','DARCEY','CUC','CLARINDA','CIRA','CHAE','CELINDA','CATHERYN','CATHERIN','CASIMIRA','CARMELIA','CAMELLIA','BREANA','BOBETTE','BERNARDINA','BEBE','BASILIA','ARLYNE','AMAL','ALAYNA','ZONIA','ZENIA','YURIKO','YAEKO','WYNELL','WILLOW','WILLENA','VERNIA','TU','TRAVIS','TORA','TERRILYN','TERICA','TENESHA','TAWNA','TAJUANA','TAINA','STEPHNIE','SONA','SOL','SINA','SHONDRA','SHIZUKO','SHERLENE','SHERICE','SHARIKA','ROSSIE','ROSENA','RORY','RIMA','RIA','RHEBA','RENNA','PETER','NATALYA','NANCEE','MELODI','MEDA','MAXIMA','MATHA','MARKETTA','MARICRUZ','MARCELENE','MALVINA','LUBA','LOUETTA','LEIDA','LECIA','LAURAN','LASHAWNA','LAINE','KHADIJAH','KATERINE','KASI','KALLIE','JULIETTA','JESUSITA','JESTINE','JESSIA','JEREMY','JEFFIE','JANYCE','ISADORA','GEORGIANNE','FIDELIA','EVITA','EURA','EULAH','ESTEFANA','ELSY','ELIZABET','ELADIA','DODIE','DION','DIA','DENISSE','DELORAS','DELILA','DAYSI','DAKOTA','CURTIS','CRYSTLE','CONCHA','COLBY','CLARETTA','CHU','CHRISTIA','CHARLSIE','CHARLENA','CARYLON','BETTYANN','ASLEY','ASHLEA','AMIRA','AI','AGUEDA','AGNUS','YUETTE','VINITA','VICTORINA','TYNISHA','TREENA','TOCCARA','TISH','THOMASENA','TEGAN','SOILA','SHILOH','SHENNA','SHARMAINE','SHANTAE','SHANDI','SEPTEMBER','SARAN','SARAI','SANA','SAMUEL','SALLEY','ROSETTE','ROLANDE','REGINE','OTELIA','OSCAR','OLEVIA','NICHOLLE','NECOLE','NAIDA','MYRTA','MYESHA','MITSUE','MINTA','MERTIE','MARGY','MAHALIA','MADALENE','LOVE','LOURA','LOREAN','LEWIS','LESHA','LEONIDA','LENITA','LAVONE','LASHELL','LASHANDRA','LAMONICA','KIMBRA','KATHERINA','KARRY','KANESHA','JULIO','JONG','JENEVA','JAQUELYN','HWA','GILMA','GHISLAINE','GERTRUDIS','FRANSISCA','FERMINA','ETTIE','ETSUKO','ELLIS','ELLAN','ELIDIA','EDRA','DORETHEA','DOREATHA','DENYSE','DENNY','DEETTA','DAINE','CYRSTAL','CORRIN','CAYLA','CARLITA','CAMILA','BURMA','BULA','BUENA','BLAKE','BARABARA','AVRIL','AUSTIN','ALAINE','ZANA','WILHEMINA','WANETTA','VIRGIL','VI','VERONIKA','VERNON','VERLINE','VASILIKI','TONITA','TISA','TEOFILA','TAYNA','TAUNYA','TANDRA','TAKAKO','SUNNI','SUANNE','SIXTA','SHARELL','SEEMA','RUSSELL','ROSENDA','ROBENA','RAYMONDE','PEI','PAMILA','OZELL','NEIDA','NEELY','MISTIE','MICHA','MERISSA','MAURITA','MARYLN','MARYETTA','MARSHALL','MARCELL','MALENA','MAKEDA','MADDIE','LOVETTA','LOURIE','LORRINE','LORILEE','LESTER','LAURENA','LASHAY','LARRAINE','LAREE','LACRESHA','KRISTLE','KRISHNA','KEVA','KEIRA','KAROLE','JOIE','JINNY','JEANNETTA','JAMA','HEIDY','GILBERTE','GEMA','FAVIOLA','EVELYNN','ENDA','ELLI','ELLENA','DIVINA','DAGNY','COLLENE','CODI','CINDIE','CHASSIDY','CHASIDY','CATRICE','CATHERINA','CASSEY','CAROLL','CARLENA','CANDRA','CALISTA','BRYANNA','BRITTENY','BEULA','BARI','AUDRIE','AUDRIA','ARDELIA','ANNELLE','ANGILA','ALONA','ALLYN','DOUGLAS','ROGER','JONATHAN','RALPH','NICHOLAS','BENJAMIN','BRUCE','HARRY','WAYNE','STEVE','HOWARD','ERNEST','PHILLIP','TODD','CRAIG','ALAN','PHILIP','EARL','DANNY','BRYAN','STANLEY','LEONARD','NATHAN','MANUEL','RODNEY','MARVIN','VINCENT','JEFFERY','JEFF','CHAD','JACOB','ALFRED','BRADLEY','HERBERT','FREDERICK','EDWIN','DON','RICKY','RANDALL','BARRY','BERNARD','LEROY','MARCUS','THEODORE','CLIFFORD','MIGUEL','JIM','TOM','CALVIN','BILL','LLOYD','DEREK','WARREN','DARRELL','JEROME','FLOYD','ALVIN','TIM','GORDON','GREG','JORGE','DUSTIN','PEDRO','DERRICK','ZACHARY','HERMAN','GLEN','HECTOR','RICARDO','RICK','BRENT','RAMON','GILBERT','MARC','REGINALD','RUBEN','NATHANIEL','RAFAEL','EDGAR','MILTON','RAUL','BEN','CHESTER','DUANE','FRANKLIN','BRAD','RON','ROLAND','ARNOLD','HARVEY','JARED','ERIK','DARRYL','NEIL','JAVIER','FERNANDO','CLINTON','TED','MATHEW','TYRONE','DARREN','LANCE','KURT','ALLAN','NELSON','GUY','CLAYTON','HUGH','MAX','DWAYNE','DWIGHT','ARMANDO','FELIX','EVERETT','IAN','WALLACE','KEN','BOB','ALFREDO','ALBERTO','DAVE','IVAN','BYRON','ISAAC','MORRIS','CLIFTON','WILLARD','ROSS','ANDY','SALVADOR','KIRK','SERGIO','SETH','KENT','TERRANCE','EDUARDO','TERRENCE','ENRIQUE','WADE','STUART','FREDRICK','ARTURO','ALEJANDRO','NICK','LUTHER','WENDELL','JEREMIAH','JULIUS','OTIS','TREVOR','OLIVER','LUKE','HOMER','GERARD','DOUG','KENNY','HUBERT','LYLE','MATT','ALFONSO','ORLANDO','REX','CARLTON','ERNESTO','NEAL','PABLO','LORENZO','OMAR','WILBUR','GRANT','HORACE','RODERICK','ABRAHAM','WILLIS','RICKEY','ANDRES','CESAR','JOHNATHAN','MALCOLM','RUDOLPH','DAMON','KELVIN','PRESTON','ALTON','ARCHIE','MARCO','WM','PETE','RANDOLPH','GARRY','GEOFFREY','JONATHON','FELIPE','GERARDO','ED','DOMINIC','DELBERT','COLIN','GUILLERMO','EARNEST','LUCAS','BENNY','SPENCER','RODOLFO','MYRON','EDMUND','GARRETT','SALVATORE','CEDRIC','LOWELL','GREGG','SHERMAN','WILSON','SYLVESTER','ROOSEVELT','ISRAEL','JERMAINE','FORREST','WILBERT','LELAND','SIMON','CLARK','IRVING','BRYANT','OWEN','RUFUS','WOODROW','KRISTOPHER','MACK','LEVI','MARCOS','GUSTAVO','JAKE','LIONEL','GILBERTO','CLINT','NICOLAS','ISMAEL','ORVILLE','ERVIN','DEWEY','AL','WILFRED','JOSH','HUGO','IGNACIO','CALEB','TOMAS','SHELDON','ERICK','STEWART','DOYLE','DARREL','ROGELIO','TERENCE','SANTIAGO','ALONZO','ELIAS','BERT','ELBERT','RAMIRO','CONRAD','NOAH','GRADY','PHIL','CORNELIUS','LAMAR','ROLANDO','CLAY','PERCY','DEXTER','BRADFORD','DARIN','AMOS','MOSES','IRVIN','SAUL','ROMAN','RANDAL','TIMMY','DARRIN','WINSTON','BRENDAN','ABEL','DOMINICK','BOYD','EMILIO','ELIJAH','DOMINGO','EMMETT','MARLON','EMANUEL','JERALD','EDMOND','EMIL','DEWAYNE','WILL','OTTO','TEDDY','REYNALDO','BRET','JESS','TRENT','HUMBERTO','EMMANUEL','STEPHAN','VICENTE','LAMONT','GARLAND','MILES','EFRAIN','HEATH','RODGER','HARLEY','ETHAN','ELDON','ROCKY','PIERRE','JUNIOR','FREDDY','ELI','BRYCE','ANTOINE','STERLING','CHASE','GROVER','ELTON','CLEVELAND','DYLAN','CHUCK','DAMIAN','REUBEN','STAN','AUGUST','LEONARDO','JASPER','RUSSEL','ERWIN','BENITO','HANS','MONTE','BLAINE','ERNIE','CURT','QUENTIN','AGUSTIN','MURRAY','JAMAL','ADOLFO','HARRISON','TYSON','BURTON','BRADY','ELLIOTT','WILFREDO','BART','JARROD','VANCE','DENIS','DAMIEN','JOAQUIN','HARLAN','DESMOND','ELLIOT','DARWIN','GREGORIO','BUDDY','XAVIER','KERMIT','ROSCOE','ESTEBAN','ANTON','SOLOMON','SCOTTY','NORBERT','ELVIN','WILLIAMS','NOLAN','ROD','QUINTON','HAL','BRAIN','ROB','ELWOOD','KENDRICK','DARIUS','MOISES','FIDEL','THADDEUS','CLIFF','MARCEL','JACKSON','RAPHAEL','BRYON','ARMAND','ALVARO','JEFFRY','DANE','JOESPH','THURMAN','NED','RUSTY','MONTY','FABIAN','REGGIE','MASON','GRAHAM','ISAIAH','VAUGHN','GUS','LOYD','DIEGO','ADOLPH','NORRIS','MILLARD','ROCCO','GONZALO','DERICK','RODRIGO','WILEY','RIGOBERTO','ALPHONSO','TY','NOE','VERN','REED','JEFFERSON','ELVIS','BERNARDO','MAURICIO','HIRAM','DONOVAN','BASIL','RILEY','NICKOLAS','MAYNARD','SCOT','VINCE','QUINCY','EDDY','SEBASTIAN','FEDERICO','ULYSSES','HERIBERTO','DONNELL','COLE','DAVIS','GAVIN','EMERY','WARD','ROMEO','JAYSON','DANTE','CLEMENT','COY','MAXWELL','JARVIS','BRUNO','ISSAC','DUDLEY','BROCK','SANFORD','CARMELO','BARNEY','NESTOR','STEFAN','DONNY','ART','LINWOOD','BEAU','WELDON','GALEN','ISIDRO','TRUMAN','DELMAR','JOHNATHON','SILAS','FREDERIC','DICK','IRWIN','MERLIN','CHARLEY','MARCELINO','HARRIS','CARLO','TRENTON','KURTIS','HUNTER','AURELIO','WINFRED','VITO','COLLIN','DENVER','CARTER','LEONEL','EMORY','PASQUALE','MOHAMMAD','MARIANO','DANIAL','LANDON','DIRK','BRANDEN','ADAN','BUFORD','GERMAN','WILMER','EMERSON','ZACHERY','FLETCHER','JACQUES','ERROL','DALTON','MONROE','JOSUE','EDWARDO','BOOKER','WILFORD','SONNY','SHELTON','CARSON','THERON','RAYMUNDO','DAREN','HOUSTON','ROBBY','LINCOLN','GENARO','BENNETT','OCTAVIO','CORNELL','HUNG','ARRON','ANTONY','HERSCHEL','GIOVANNI','GARTH','CYRUS','CYRIL','RONNY','LON','FREEMAN','DUNCAN','KENNITH','CARMINE','ERICH','CHADWICK','WILBURN','RUSS','REID','MYLES','ANDERSON','MORTON','JONAS','FOREST','MITCHEL','MERVIN','ZANE','RICH','JAMEL','LAZARO','ALPHONSE','RANDELL','MAJOR','JARRETT','BROOKS','ABDUL','LUCIANO','SEYMOUR','EUGENIO','MOHAMMED','VALENTIN','CHANCE','ARNULFO','LUCIEN','FERDINAND','THAD','EZRA','ALDO','RUBIN','ROYAL','MITCH','EARLE','ABE','WYATT','MARQUIS','LANNY','KAREEM','JAMAR','BORIS','ISIAH','EMILE','ELMO','ARON','LEOPOLDO','EVERETTE','JOSEF','ELOY','RODRICK','REINALDO','LUCIO','JERROD','WESTON','HERSHEL','BARTON','PARKER','LEMUEL','BURT','JULES','GIL','ELISEO','AHMAD','NIGEL','EFREN','ANTWAN','ALDEN','MARGARITO','COLEMAN','DINO','OSVALDO','LES','DEANDRE','NORMAND','KIETH','TREY','NORBERTO','NAPOLEON','JEROLD','FRITZ','ROSENDO','MILFORD','CHRISTOPER','ALFONZO','LYMAN','JOSIAH','BRANT','WILTON','RICO','JAMAAL','DEWITT','BRENTON','OLIN','FOSTER','FAUSTINO','CLAUDIO','JUDSON','GINO','EDGARDO','ALEC','TANNER','JARRED','DONN','TAD','PRINCE','PORFIRIO','ODIS','LENARD','CHAUNCEY','TOD','MEL','MARCELO','KORY','AUGUSTUS','KEVEN','HILARIO','BUD','SAL','ORVAL','MAURO','ZACHARIAH','OLEN','ANIBAL','MILO','JED','DILLON','AMADO','NEWTON','LENNY','RICHIE','HORACIO','BRICE','MOHAMED','DELMER','DARIO','REYES','MAC','JONAH','JERROLD','ROBT','HANK','RUPERT','ROLLAND','KENTON','DAMION','ANTONE','WALDO','FREDRIC','BRADLY','KIP','BURL','WALKER','TYREE','JEFFEREY','AHMED','WILLY','STANFORD','OREN','NOBLE','MOSHE','MIKEL','ENOCH','BRENDON','QUINTIN','JAMISON','FLORENCIO','DARRICK','TOBIAS','HASSAN','GIUSEPPE','DEMARCUS','CLETUS','TYRELL','LYNDON','KEENAN','WERNER','GERALDO','COLUMBUS','CHET','BERTRAM','MARKUS','HUEY','HILTON','DWAIN','DONTE','TYRON','OMER','ISAIAS','HIPOLITO','FERMIN','ADALBERTO','BO','BARRETT','TEODORO','MCKINLEY','MAXIMO','GARFIELD','RALEIGH','LAWERENCE','ABRAM','RASHAD','KING','EMMITT','DARON','SAMUAL','MIQUEL','EUSEBIO','DOMENIC','DARRON','BUSTER','WILBER','RENATO','JC','HOYT','HAYWOOD','EZEKIEL','CHAS','FLORENTINO','ELROY','CLEMENTE','ARDEN','NEVILLE','EDISON','DESHAWN','NATHANIAL','JORDON','DANILO','CLAUD','SHERWOOD','RAYMON','RAYFORD','CRISTOBAL','AMBROSE','TITUS','HYMAN','FELTON','EZEQUIEL','ERASMO','STANTON','LONNY','LEN','IKE','MILAN','LINO','JAROD','HERB','ANDREAS','WALTON','RHETT','PALMER','DOUGLASS','CORDELL','OSWALDO','ELLSWORTH','VIRGILIO','TONEY','NATHANAEL','DEL','BENEDICT','MOSE','JOHNSON','ISREAL','GARRET','FAUSTO','ASA','ARLEN','ZACK','WARNER','MODESTO','FRANCESCO','MANUAL','GAYLORD','GASTON','FILIBERTO','DEANGELO','MICHALE','GRANVILLE','WES','MALIK','ZACKARY','TUAN','ELDRIDGE','CRISTOPHER','CORTEZ','ANTIONE','MALCOM','LONG','KOREY','JOSPEH','COLTON','WAYLON','VON','HOSEA','SHAD','SANTO','RUDOLF','ROLF','REY','RENALDO','MARCELLUS','LUCIUS','KRISTOFER','BOYCE','BENTON','HAYDEN','HARLAND','ARNOLDO','RUEBEN','LEANDRO','KRAIG','JERRELL','JEROMY','HOBERT','CEDRICK','ARLIE','WINFORD','WALLY','LUIGI','KENETH','JACINTO','GRAIG','FRANKLYN','EDMUNDO','SID','PORTER','LEIF','JERAMY','BUCK','WILLIAN','VINCENZO','SHON','LYNWOOD','JERE','HAI','ELDEN','DORSEY','DARELL','BRODERICK','ALONSO']; +``` + +
+ + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-220-heighway-dragon.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-220-heighway-dragon.spanish.md new file mode 100644 index 0000000000..a4fd906558 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-220-heighway-dragon.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4481000cf542c50ff5b +challengeType: 5 +title: 'Problem 220: Heighway Dragon' +--- + +## Description +
+Sea D0 la cadena de dos letras "Fa". Para n≥1, derive Dn de Dn-1 mediante las reglas de reescritura de cadenas: + +"a" → "aRbFR" +"b" → "LFaLb" + +Por lo tanto, D0 = "Fa", D1 = "FaRbFR" , D2 = "FaRbFRRLFaLbFR", y así sucesivamente. + +Estas cadenas pueden interpretarse como instrucciones para un programa de gráficos de computadora, con "F" que significa "dibujar una unidad", "L" que significa "girar a la izquierda 90 grados", "R" que significa "girar a la derecha 90 grados", y "a" y "b" se ignoran. La posición inicial del cursor de la computadora es (0,0), apuntando hacia arriba (0,1). + +Entonces Dn es un dibujo exótico conocido como el Dragón Heighway de orden n. Por ejemplo, D10 se muestra a continuación; contando cada "F" como un paso, el punto resaltado en (18,16) es la posición alcanzada después de 500 pasos. + + + + +¿Cuál es la posición del cursor después de 1012 pasos en D50? +Da tu respuesta en la forma x, y sin espacios. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' euler220() debe devolver 139776, 963904.' + testString: 'assert.strictEqual(euler220(), 139776, 963904, "euler220() should return 139776, 963904.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler220() { + // Good luck! + return true; +} + +euler220(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-221-alexandrian-integers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-221-alexandrian-integers.spanish.md new file mode 100644 index 0000000000..55f3b0884e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-221-alexandrian-integers.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4491000cf542c50ff5c +challengeType: 5 +title: 'Problem 221: Alexandrian Integers' +--- + +## Description +
+Llamaremos a un entero positivo A un "entero alejandrino", si existen enteros p, q, r tales que: + + +A = p · q · r y + + +1A += + +1p ++ + +1q ++ + +1r +Por ejemplo, 630 es un número entero alejandrino (p = 5, q = −7, r = −18). +De hecho, 630 es el sexto número entero de Alejandría, siendo los primeros 6 enteros alejandrinos: 6, 42, 120, 156, 420 y 630. + +Encuentra el 150000 número entero de Alejandría. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler221() debe devolver 1884161251122450. + testString: 'assert.strictEqual(euler221(), 1884161251122450, "euler221() should return 1884161251122450.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler221() { + // Good luck! + return true; +} + +euler221(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-222-sphere-packing.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-222-sphere-packing.spanish.md new file mode 100644 index 0000000000..605c48fff7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-222-sphere-packing.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f44b1000cf542c50ff5d +challengeType: 5 +title: 'Problem 222: Sphere Packing' +--- + +## Description +
+¿Cuál es la longitud del tubo más corto, de radio interno de 50 mm, que puede contener completamente 21 bolas de radio de 30 mm, 31 mm, ..., 50 mm? + +Da tu respuesta en micrómetros (10-6 m) redondeados al número entero más cercano. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler222() debe devolver 1590933. + testString: 'assert.strictEqual(euler222(), 1590933, "euler222() should return 1590933.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler222() { + // Good luck! + return true; +} + +euler222(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-223-almost-right-angled-triangles-i.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-223-almost-right-angled-triangles-i.spanish.md new file mode 100644 index 0000000000..7ee68f1031 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-223-almost-right-angled-triangles-i.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f44b1000cf542c50ff5e +challengeType: 5 +title: 'Problem 223: Almost right-angled triangles I' +--- + +## Description +
+Llamemos a un triángulo de lados enteros con lados a ≤ b ≤ c apenas agudo si los lados satisfacen a2 + b2 = c2 + 1. + +¿Cuántos triángulos apenas agudos tienen un perímetro ≤ 25,000,000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler223() debe devolver 61614848. + testString: 'assert.strictEqual(euler223(), 61614848, "euler223() should return 61614848.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler223() { + // Good luck! + return true; +} + +euler223(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-224-almost-right-angled-triangles-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-224-almost-right-angled-triangles-ii.spanish.md new file mode 100644 index 0000000000..3dddcd224b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-224-almost-right-angled-triangles-ii.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f44e1000cf542c50ff5f +challengeType: 5 +title: 'Problem 224: Almost right-angled triangles II' +--- + +## Description +
+Llamemos a un triángulo de lados enteros con lados a ≤ b ≤ c apenas obtuso si los lados satisfacen a2 + b2 = c2 - 1. + +¿Cuántos triángulos apenas obtusos hay con el perímetro ≤ 75,000,000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler224() debe devolver 4137330. + testString: 'assert.strictEqual(euler224(), 4137330, "euler224() should return 4137330.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler224() { + // Good luck! + return true; +} + +euler224(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-225-tribonacci-non-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-225-tribonacci-non-divisors.spanish.md new file mode 100644 index 0000000000..62ae8544b8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-225-tribonacci-non-divisors.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f44e1000cf542c50ff60 +challengeType: 5 +title: 'Problem 225: Tribonacci non-divisors' +--- + +## Description +
+La secuencia 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201 ... +se define por T1 = T2 = T3 = 1 y Tn = Tn-1 + Tn-2 + Tn-3. + + +Se puede mostrar que 27 no divide ningún término de esta secuencia. De hecho, 27 es el primer número impar de esta propiedad. + +Encuentre el número impar número 124 que no divide ningún término de la secuencia anterior. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler225() debe devolver 2009. + testString: 'assert.strictEqual(euler225(), 2009, "euler225() should return 2009.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler225() { + // Good luck! + return true; +} + +euler225(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.spanish.md new file mode 100644 index 0000000000..e9ff384a0c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4511000cf542c50ff62 +challengeType: 5 +title: 'Problem 226: A Scoop of Blancmange' +--- + +## Description +
+La curva de rango de blanco es el conjunto de puntos (x, y) de manera que 0 ≤ x ≤ 1 y, donde s (x) = la distancia de x al entero más cercano. + +El área bajo la curva de rango de blanco es igual a ½, que se muestra en rosa en el siguiente diagrama. + + + + +Sea C el círculo con el centro (¼, ½) y el radio ¼, que se muestra en negro en el diagrama. + +¿Qué área bajo la curva de rango de blanco está encerrada por C? Da tu respuesta redondeada a ocho lugares decimales en la forma 0.abcdefgh +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler226() debe devolver 0.11316017. + testString: 'assert.strictEqual(euler226(), 0.11316017, "euler226() should return 0.11316017.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler226() { + // Good luck! + return true; +} + +euler226(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-227-the-chase.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-227-the-chase.spanish.md new file mode 100644 index 0000000000..8d38174b42 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-227-the-chase.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f44f1000cf542c50ff61 +challengeType: 5 +title: 'Problem 227: The Chase' +--- + +## Description +
+"The Chase" es un juego que se juega con dos dados y un número par de jugadores. + +Los jugadores se sientan alrededor de una mesa; el juego comienza con dos jugadores opuestos que tienen un dado cada uno. En cada turno, los dos jugadores con un dado lo tiran. +Si un jugador saca un 1, le pasa el dado a su vecino a la izquierda; si saca un 6, le pasa el dado a su vecino a la derecha; de lo contrario, mantiene el dado para el siguiente turno. +El juego termina cuando un jugador tiene ambos dados después de haber sido tirados y pasados; ese jugador entonces ha perdido. + +En un juego con 100 jugadores, ¿cuál es el número esperado de turnos que dura el juego? +Da tu respuesta redondeada a diez dígitos significativos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler227() debe devolver 3780.618622. + testString: 'assert.strictEqual(euler227(), 3780.618622, "euler227() should return 3780.618622.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler227() { + // Good luck! + return true; +} + +euler227(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-228-minkowski-sums.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-228-minkowski-sums.spanish.md new file mode 100644 index 0000000000..20ab9f9edc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-228-minkowski-sums.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f4511000cf542c50ff63 +challengeType: 5 +title: 'Problem 228: Minkowski Sums' +--- + +## Description +
+Sea Sn el polígono regular de n lados - o forma - cuyos vértices + +vk (k = 1,2,…, n) tienen coordenadas: + +xk = +cos (2k-1 / n × 180 °) + +yk = +sin (2k-1 / n × 180 °) +Cada Sn debe interpretarse como una forma rellena que consiste en todos los puntos en el perímetro y en el interior. + +La suma de Minkowski, S + T, de dos formas S y T es el resultado de + +sumando cada punto en S a cada punto en T, donde la adición del punto se realiza por coordenadas: + +(u, v) + (x, y) = (u + x, v + y). + +Por ejemplo, la suma de S3 y S4 es la forma de seis lados que se muestra en rosa a continuación: + + + + +¿Cuántos lados tiene S1864 + S1865 + ... + S1909? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler228() debe devolver 86226. + testString: 'assert.strictEqual(euler228(), 86226, "euler228() should return 86226.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler228() { + // Good luck! + return true; +} + +euler228(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.spanish.md new file mode 100644 index 0000000000..d7eb0500d1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4521000cf542c50ff64 +challengeType: 5 +title: 'Problem 229: Four Representations using Squares' +--- + +## Description +
+Considera el número 3600. Es muy especial, porque + +3600 = 482 + 362 +3600 = 202 + 2 × 402 +3600 = 302 + 3 × 302 +3600 = 452 + 7 × 152 + +Del mismo modo, encontramos que 88201 = 992 + 2802 = 2872 + 2 × 542 = 2832 + 3 × 522 = 1972 + 7 × 842. + +En 1747, Euler demostró qué números se pueden representar como la suma de dos cuadrados. +Estamos interesados ​​en los números n que admiten representaciones de los siguientes cuatro tipos: + +n = a12 + b12n = a22 + 2 b22n = a32 + 3 b32n = a72 + 7 b72, + +donde ak y bk son enteros positivos. + +Hay 75373 números de este tipo que no superan los 107. + +¿Cuántos de esos números hay que no superan 2 × 109? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler229() debe devolver 11325263. + testString: 'assert.strictEqual(euler229(), 11325263, "euler229() should return 11325263.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler229() { + // Good luck! + return true; +} + +euler229(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-23-non-abundant-sums.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-23-non-abundant-sums.spanish.md new file mode 100644 index 0000000000..c3cb6bd310 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-23-non-abundant-sums.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f3831000cf542c50fe96 +challengeType: 5 +title: 'Problem 23: Non-abundant sums' +--- + +## Description +
+Un número perfecto es un número para el cual la suma de sus divisores apropiados es exactamente igual al número. Por ejemplo, la suma de los divisores apropiados de 28 sería 1 + 2 + 4 + 7 + 14 = 28, lo que significa que 28 es un número perfecto. +Un número n se llama deficiente si la suma de sus divisores apropiados es menor que n y se llama abundante si esta suma excede n . +Como 12 es el número abundante más pequeño, 1 + 2 + 3 + 4 + 6 = 16, el número más pequeño que puede escribirse como la suma de dos números abundantes es 24. Por análisis matemático, se puede mostrar que todos los enteros son mayores 28123 se puede escribir como la suma de dos números abundantes. Sin embargo, este límite superior no puede reducirse más por análisis aunque se sepa que el mayor número que no puede expresarse como la suma de dos números abundantes es menor que este límite. +Encuentre la suma de todos los enteros positivos <= n que no se puede escribir como la suma de dos números abundantes. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: sumOfNonAbundantNumbers(10000) debe devolver 3731004. + testString: 'assert(sumOfNonAbundantNumbers(10000) === 3731004, "sumOfNonAbundantNumbers(10000) should return 3731004.");' + - text: sumOfNonAbundantNumbers(15000) debe devolver 4039939. + testString: 'assert(sumOfNonAbundantNumbers(15000) === 4039939, "sumOfNonAbundantNumbers(15000) should return 4039939.");' + - text: sumOfNonAbundantNumbers(20000) debe devolver 4159710. + testString: 'assert(sumOfNonAbundantNumbers(20000) === 4159710, "sumOfNonAbundantNumbers(20000) should return 4159710.");' + - text: sumOfNonAbundantNumbers(28123) debe devolver 4179871. + testString: 'assert(sumOfNonAbundantNumbers(28123) === 4179871, "sumOfNonAbundantNumbers(28123) should return 4179871.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function sumOfNonAbundantNumbers(n) { + // Good luck! + return n; +} + +sumOfNonAbundantNumbers(28123); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-230-fibonacci-words.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-230-fibonacci-words.spanish.md new file mode 100644 index 0000000000..c3ede3a15a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-230-fibonacci-words.spanish.md @@ -0,0 +1,82 @@ +--- +id: 5 +localeTitle: 5900f4531000cf542c50ff65 +challengeType: 5 +title: 'Problem 230: Fibonacci Words' +--- + +## Description +
+Para cualquiera de las dos cadenas de dígitos, A y B, definimos FA, B como la secuencia (A, B, AB, BAB, ABBAB, ...) en la que cada término es la concatenación de los dos anteriores. + +Además, definimos DA, B (n) como el n. ° dígito en el primer término de FA, B que contiene al menos n dígitos. + +Ejemplo: + +Sea A = 1415926535, B = 8979323846. Deseamos encontrar DA, B (35), por ejemplo. + +Los primeros términos de la FA, B son: +1415926535 +8979323846 +14159265358979323846 +897932384614159265358979323846 +14159265358979323846897932384614159265358979323846 + +A continuación, DA, B (35) es el dígito número 35 en el quinto término, que es 9. + +Ahora usamos para a los 100 primeros dígitos de π detrás de la coma decimal: +14159265358979323846264338327950288419716939937510 +58209749445923078164062862089986280348253421170679 + +y B para los próximos cien dígitos: + +82148086513282306647093844609550582231725359408128 +48111745028410270193852110555964462294895493038196. + +Encuentre ∑n = 0,1, ..., 17 10n × DA, B ((127 + 19n) × 7n). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler230() debe devolver 850481152593119200. + testString: 'assert.strictEqual(euler230(), 850481152593119200, "euler230() should return 850481152593119200.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler230() { + // Good luck! + return true; +} + +euler230(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.spanish.md new file mode 100644 index 0000000000..25d32b07db --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4531000cf542c50ff66 +challengeType: 5 +title: 'Problem 231: The prime factorisation of binomial coefficients' +--- + +## Description +
+El coeficiente binomial 10C3 = 120. +120 = 23 × 3 × 5 = 2 × 2 × 2 × 3 × 5, y 2 + 2 + 2 + 3 + 5 = 14. +Así que la suma de los términos en el primo la factorización de 10C3 es 14. + +Halla la suma de los términos en la factorización prima de 20000000C15000000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler231() debe devolver 7526965179680. + testString: 'assert.strictEqual(euler231(), 7526965179680, "euler231() should return 7526965179680.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler231() { + // Good luck! + return true; +} + +euler231(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-232-the-race.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-232-the-race.spanish.md new file mode 100644 index 0000000000..0d54869bc4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-232-the-race.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4551000cf542c50ff67 +challengeType: 5 +title: 'Problem 232: The Race' +--- + +## Description +
+Dos jugadores comparten una moneda imparcial y se turnan para jugar "The Race". En el turno del jugador 1, lanza la moneda una vez: si sale cabezas, anota un punto; Si sale Tails, no anota nada. En el turno del jugador 2, elige un número entero positivo T y lanza las monedas T veces: si sale todas las Jefes, obtiene 2T-1 puntos; de lo contrario, ella no anota nada. El jugador 1 va primero. El ganador es el primero a 100 o más puntos. + +En cada turno, el jugador 2 selecciona el número, T, de lanzamientos de monedas que maximizan la probabilidad de que gane. + +¿Cuál es la probabilidad de que el jugador 2 gane? + +Da tu respuesta redondeada a ocho lugares decimales en la forma 0.abcdefgh. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler232() debe devolver 0.83648556. + testString: 'assert.strictEqual(euler232(), 0.83648556, "euler232() should return 0.83648556.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler232() { + // Good luck! + return true; +} + +euler232(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.spanish.md new file mode 100644 index 0000000000..c1bb978b18 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f4551000cf542c50ff68 +challengeType: 5 +title: 'Problem 233: Lattice points on a circle' +--- + +## Description +
+Sea f (N) el número de puntos con coordenadas enteras que se encuentran en un círculo que pasa por (0,0), (N, 0), (0, N) y (N, N). +Se puede mostrar que f (10000) = 36. + +¿Cuál es la suma de todos los enteros positivos N ≤ 1011 de manera que f (N) = 420? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler233() debe devolver 271204031455541300. + testString: 'assert.strictEqual(euler233(), 271204031455541300, "euler233() should return 271204031455541300.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler233() { + // Good luck! + return true; +} + +euler233(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.spanish.md new file mode 100644 index 0000000000..47e2a19879 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4571000cf542c50ff69 +challengeType: 5 +title: 'Problem 234: Semidivisible numbers' +--- + +## Description +
+Para un entero n ≥ 4, definimos la raíz cuadrada principal inferior de n, denotada por lps (n), como la prima mayor ≤ √n y la raíz cuadrada prima superior de n, ups (n), como la prima más pequeña ≥ √n. +Entonces, por ejemplo, lps (4) = 2 = ups (4), lps (1000) = 31, ups (1000) = 37. +Llamemos a un entero n ≥ 4 semidivisible, si uno de lps (n) y ups (n) divide n, pero no ambas. + +La suma de los números semidivisibles que no exceden de 15 es 30, los números son 8, 10 y 12. 15 no es semidivisible porque es un múltiplo de ambos lps (15) = 3 y ups (15) = 5. +As otro ejemplo, la suma de los 92 números semidivisibles hasta 1000 es 34825. + +¿Cuál es la suma de todos los números semidivisibles que no excedan 999966663333? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler234() debe devolver 1259187438574927000. + testString: 'assert.strictEqual(euler234(), 1259187438574927000, "euler234() should return 1259187438574927000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler234() { + // Good luck! + return true; +} + +euler234(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.spanish.md new file mode 100644 index 0000000000..a432f18ff3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4571000cf542c50ff6a +challengeType: 5 +title: 'Problem 235: An Arithmetic Geometric sequence' +--- + +## Description +
+Dado es la secuencia aritmético-geométrica u (k) = (900-3k) rk-1. +Sea s (n) = Σk = 1 ... nu (k). + + +Halla el valor de r para el cual s (5000) = -600,000,000,000. + + +Da tu respuesta redondeada a 12 lugares detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler235() debe devolver 1.002322108633. + testString: 'assert.strictEqual(euler235(), 1.002322108633, "euler235() should return 1.002322108633.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler235() { + // Good luck! + return true; +} + +euler235(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-236-luxury-hampers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-236-luxury-hampers.spanish.md new file mode 100644 index 0000000000..a90fb107c5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-236-luxury-hampers.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4591000cf542c50ff6b +challengeType: 5 +title: 'Problem 236: Luxury Hampers' +--- + +## Description +
+proveedores 'A' y 'B' proporcionaron los siguientes números de productos para el mercado de la cesta de lujo: + +Producto'A "B'Beluga Caviar5248640Pastel de Navidad13121888Gammon Joint26243776Vintage Port57603776Champagne Truffles39365664 + +Aunque los proveedores intentan enviar sus productos en perfectas condiciones. , inevitablemente, hay cierto deterioro, es decir, productos que se han deteriorado. + +Los proveedores comparan su desempeño utilizando dos tipos de estadísticas: las cinco tasas de deterioro por producto para cada proveedor son iguales a la cantidad de productos que han ido mal divididos por la cantidad de productos suministrados, por cada uno de los cinco productos sucesivamente. +La tasa de deterioro global para cada proveedor es igual a la cantidad total de productos que se dañaron, dividida por la cantidad total de productos provistos por ese proveedor. Para su sorpresa, los proveedores encontraron que cada de las cinco tasas de deterioro por producto fue peor (más alta) para 'B' que para 'A' por el mismo factor (proporción de tasas de deterioro), m> 1; y, sin embargo, paradójicamente, el deterioro global la tasa de edad fue peor para 'A' que para 'B', también por un factor de m. + +Hay treinta y cinco m> 1 para los cuales podría haber ocurrido este resultado sorprendente, el más pequeño de los cuales es 1476/1475. + +¿Cuál es el mayor valor posible de m? +Da tu respuesta como una fracción reducida a sus términos más bajos, en la forma u / v. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler236() debe devolver euler236() . + testString: 'assert.strictEqual(euler236(), 123 / 59, "euler236() should return 123 / 59.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler236() { + // Good luck! + return true; +} + +euler236(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.spanish.md new file mode 100644 index 0000000000..ad79dcd137 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4591000cf542c50ff6c +challengeType: 5 +title: 'Problem 237: Tours on a 4 x n playing board' +--- + +## Description +
+Sea T (n) el número de recorridos en un tablero de juego de 4 × n tal que: +El recorrido comienza en la esquina superior izquierda. +El recorrido consiste en movimientos que son hacia arriba, hacia abajo, a la izquierda oa la derecha una casilla. +El tour visita cada plaza exactamente una vez. +El recorrido termina en la esquina inferior izquierda. +El diagrama muestra un recorrido en una tabla de 4 × 10: + + + + +T (10) es 2329. ¿Qué es T (1012) módulo 108? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler237() debe devolver 15836928. + testString: 'assert.strictEqual(euler237(), 15836928, "euler237() should return 15836928.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler237() { + // Good luck! + return true; +} + +euler237(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-238-infinite-string-tour.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-238-infinite-string-tour.spanish.md new file mode 100644 index 0000000000..f3ba845883 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-238-infinite-string-tour.spanish.md @@ -0,0 +1,89 @@ +--- +id: 5 +localeTitle: 5900f45b1000cf542c50ff6d +challengeType: 5 +title: 'Problem 238: Infinite string tour' +--- + +## Description +
+Crea una secuencia de números utilizando el generador de números pseudoaleatorios "Blum Blum Shub": + +s0 += +14025256 +sn + 1 += +sn2 mod 20300713 + + +Concatena estos números s0s1s2 ... para crear una cadena w de longitud infinita +Entonces, w = 14025256741014958470038053646… + +Para un entero positivo k, si no existe una subcadena de w con una suma de dígitos igual a k, p (k) se define como cero. Si al menos una subcadena de w existe con una suma de dígitos igual a k, definimos p (k) = z, donde z es la posición inicial de la primera subcadena de este tipo. + +Por ejemplo: + +Las subcadenas 1, 14, 1402,… +con sumas respectivas de dígitos iguales a 1, 5, 7,… +comienzan en la posición 1, por lo tanto, p (1) = p (5) = p ( 7) =… = 1. + +Las subcadenas 4, 402, 4025,… +con sumas respectivas de dígitos iguales a 4, 6, 11,… +comienzan en la posición 2, por lo tanto, p (4) = p (6) = p (11) = ... = 2. + +Las subcadenas 02, 0252, ... +con sumas respectivas de dígitos iguales a 2, 9, ... +comienzan en la posición 3, por lo tanto p (2) = p (9) = ... = 3. + +Tenga en cuenta que la subcadena 025 que comienza en la posición 3, tiene una suma de dígitos igual a 7, pero hubo una subcadena anterior (que comienza en la posición 1) con una suma de dígitos igual a 7, por lo que p (7) = 1 , no 3. + +Podemos verificar que, para 0 <k ≤ 103, ∑ p (k) = 4742. + +Encuentre ∑ p (k), para 0 <k ≤ 2 · 1015. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler238() debe devolver 9922545104535660. + testString: 'assert.strictEqual(euler238(), 9922545104535660, "euler238() should return 9922545104535660.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler238() { + // Good luck! + return true; +} + +euler238(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.spanish.md new file mode 100644 index 0000000000..150b61af50 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f45c1000cf542c50ff6e +challengeType: 5 +title: 'Problem 239: Twenty-two Foolish Primes' +--- + +## Description +
+Un conjunto de discos numerados del 1 al 100 se colocan en una línea en orden aleatorio. + +¿Cuál es la probabilidad de que tengamos un trastorno parcial tal que se encuentren exactamente 22 discos de números primos lejos de sus posiciones naturales? +(Cualquier número de discos no principales también se puede encontrar dentro o fuera de sus posiciones naturales). + +Dé su respuesta redondeada a 12 lugares detrás del punto decimal en la forma 0.abcdefghijkl. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler239() debe devolver 0.001887854841. + testString: 'assert.strictEqual(euler239(), 0.001887854841, "euler239() should return 0.001887854841.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler239() { + // Good luck! + return true; +} + +euler239(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.spanish.md new file mode 100644 index 0000000000..fffb137c77 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3841000cf542c50fe97 +challengeType: 5 +title: 'Problem 24: Lexicographic permutations' +--- + +## Description +
+Una permutación es una disposición ordenada de objetos. Por ejemplo, 3124 es una posible permutación de los dígitos 1, 2, 3 y 4. Si todas las permutaciones se enumeran numérica o alfabéticamente, lo llamamos orden lexicográfico. Las permutaciones lexicográficas de 0, 1 y 2 son: +
012 021 102 120 201 210
+¿Cuál es la n ª permutación lexicográfica de los dígitos 0, 1, 2, 3, 4, 5, 6, 7, 8 y 9? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: lexicographicPermutations(699999) deben devolver 1938246570. + testString: 'assert(lexicographicPermutations(699999) == 1938246570, "lexicographicPermutations(699999) should return 1938246570.");' + - text: lexicographicPermutations(899999) deben devolver 2536987410. + testString: 'assert(lexicographicPermutations(899999) == 2536987410, "lexicographicPermutations(899999) should return 2536987410.");' + - text: Permisos lexicographicPermutations(900000) deben devolver 2537014689. + testString: 'assert(lexicographicPermutations(900000) == 2537014689, "lexicographicPermutations(900000) should return 2537014689.");' + - text: lexicographicPermutations(999999) deben devolver 2783915460. + testString: 'assert(lexicographicPermutations(999999) == 2783915460, "lexicographicPermutations(999999) should return 2783915460.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function lexicographicPermutations(n) { + // Good luck! + return n; +} + +lexicographicPermutations(999999); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-240-top-dice.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-240-top-dice.spanish.md new file mode 100644 index 0000000000..aa16a8fd9c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-240-top-dice.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f45d1000cf542c50ff6f +challengeType: 5 +title: 'Problem 240: Top Dice' +--- + +## Description +
+Hay 1111 formas en que se pueden tirar cinco dados de 6 lados (lados numerados del 1 al 6) para que los tres primeros se sumen a 15. Algunos ejemplos son: + + +D1, D2, D3, D4, D5 = 4, 3,6,3,5 + +D1, D2, D3, D4, D5 = 4,3,3,5,6 + +D1, D2, D3, D4, D5 = 3,3,3,6,6 + +D1, D2, D3, D4, D5 = 6,6,3,3,3 + +¿De cuántas maneras se pueden tirar veinte dados de 12 caras (lados numerados del 1 al 12) para que la suma de los diez primeros sea 70? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler240() debe devolver 7448717393364182000. + testString: 'assert.strictEqual(euler240(), 7448717393364182000, "euler240() should return 7448717393364182000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler240() { + // Good luck! + return true; +} + +euler240(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-241-perfection-quotients.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-241-perfection-quotients.spanish.md new file mode 100644 index 0000000000..c588b33c91 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-241-perfection-quotients.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f45d1000cf542c50ff70 +challengeType: 5 +title: 'Problem 241: Perfection Quotients' +--- + +## Description +
+Para un entero positivo n, sea σ (n) la suma de todos los divisores de n, por lo que, por ejemplo, σ (6) = 1 + 2 + 3 + 6 = 12. + + +Un número perfecto, como probablemente sepa, es un número con σ (n) = 2n. + +Definamos el cociente de perfección de un entero positivo asp (n) = +σ (n) n +. +Encuentre la suma de todos los enteros positivos n ≤ 1018 para los cuales p (n) tiene la forma k + 1⁄2, donde k es un número entero. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler241() debe devolver 482316491800641150. + testString: 'assert.strictEqual(euler241(), 482316491800641150, "euler241() should return 482316491800641150.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler241() { + // Good luck! + return true; +} + +euler241(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-242-odd-triplets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-242-odd-triplets.spanish.md new file mode 100644 index 0000000000..4549880a9b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-242-odd-triplets.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f45f1000cf542c50ff71 +challengeType: 5 +title: 'Problem 242: Odd Triplets' +--- + +## Description +
+Dado el conjunto {1,2, ..., n}, definimos f (n, k) como el número de sus subconjuntos de elementos k con una suma impar de elementos. Por ejemplo, f (5,3) = 4, ya que el conjunto {1,2,3,4,5} tiene cuatro subconjuntos de 3 elementos que tienen una suma impar de elementos, es decir: {1,2,4}, { 1,3,5}, {2,3,4} y {2,4,5}. + +Cuando los tres valores n, k y f (n, k) son impares, decimos que hacen de +un triplete impar [n, k, f (n, k)]. + +Hay exactamente cinco tripletes impares con n ≤ 10, a saber: +[1,1, f (1,1) = 1], [5,1, f (5,1) = 3], [5, 5, f (5,5) = 1], [9,1, f (9,1) = 5] y [9,9, f (9,9) = 1]. + +¿Cuántos tripletes impares hay con n ≤ 1012? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler242() debe devolver 997104142249036700. + testString: 'assert.strictEqual(euler242(), 997104142249036700, "euler242() should return 997104142249036700.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler242() { + // Good luck! + return true; +} + +euler242(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-243-resilience.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-243-resilience.spanish.md new file mode 100644 index 0000000000..eef39ad2c9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-243-resilience.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4601000cf542c50ff73 +challengeType: 5 +title: 'Problem 243: Resilience' +--- + +## Description +
+Una fracción positiva cuyo numerador es menor que su denominador se llama fracción apropiada. +Para cualquier denominador, d, habrá d − 1 fracciones propias; por ejemplo, con d = 12: 1/12, 2/12, 3/12, 4/12, 5/12, 6/12, 7/12, 8/12, 9/12, 10/12, 11 / 12. + + +Llamaremos a una fracción que no puede cancelarse una fracción resistente. +Además definiremos la resiliencia de un denominador, R (d), que es la relación de sus fracciones adecuadas que son resistentes; por ejemplo, R (12) = 4/11. +De hecho, d = 12 es el denominador más pequeño con una capacidad de recuperación R (d) <4/10. + +Encuentre el denominador más pequeño d, con una capacidad de recuperación R (d) <15499/94744. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler243() debe devolver 892371480. + testString: 'assert.strictEqual(euler243(), 892371480, "euler243() should return 892371480.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler243() { + // Good luck! + return true; +} + +euler243(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-244-sliders.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-244-sliders.spanish.md new file mode 100644 index 0000000000..17b40b3856 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-244-sliders.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f4601000cf542c50ff72 +challengeType: 5 +title: 'Problem 244: Sliders' +--- + +## Description +
+Probablemente conozcas el juego Quince Puzzle. Aquí, en lugar de fichas numeradas, tenemos siete fichas rojas y ocho fichas azules. +Un movimiento se indica con la inicial en mayúscula de la dirección (Izquierda, Derecha, Arriba, Abajo) en la que se desliza el mosaico, por ejemplo, a partir de la configuración (S), por la secuencia LULUR llegamos a la configuración (E): + +(S), (E) + + +Para cada ruta, su suma de control se calcula mediante (pseudocódigo): + +suma de control = 0 +suma de control = (suma de control × 243 + m1) mod 100 000 007 +suma de control = (suma de control × 243 + m2) mod 100 000 007 +… +suma de comprobación = (suma de control × 243 + mn) mod 100 000 007 +donde mk es el valor ASCII de la letra kth en la secuencia de movimientos y los valores ASCII para los movimientos son: + + +L76R82U85D68 + +Para la secuencia LULUR dada anteriormente, la suma de control sería 19761398. +Ahora, a partir de la configuración (S), +encuentra todas las formas más cortas para alcanzar la configuración (T). + +(S), (T) + + +¿Cuál es la suma de todas las sumas de comprobación para las rutas que tienen la longitud mínima? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler244() debe devolver 96356848. + testString: 'assert.strictEqual(euler244(), 96356848, "euler244() should return 96356848.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler244() { + // Good luck! + return true; +} + +euler244(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-245-coresilience.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-245-coresilience.spanish.md new file mode 100644 index 0000000000..470aa19c4d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-245-coresilience.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4621000cf542c50ff74 +challengeType: 5 +title: 'Problem 245: Coresilience' +--- + +## Description +
+Llamaremos a una fracción que no puede cancelarse una fracción resiliente. Además, definiremos la resiliencia de un denominador, R (d), como la relación de sus fracciones propias que son resilientes; por ejemplo, R (12) = 4⁄11. + +La resistencia de un número d> 1 es entonces +φ (d) d - 1 +, donde φ es la función totient de Euler. +Definimos con más detalle la coresiliencia de un número n> 1 como C (n) = +n - φ (n) n - 1. +La coresiliencia de un primo p es C (p) += +1p - 1. +Buscar la suma de todos los enteros compuestos 1 <n ≤ 2 × 1011, para los cuales C (n) es una fracción unitaria. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler245() debe devolver 288084712410001. + testString: 'assert.strictEqual(euler245(), 288084712410001, "euler245() should return 288084712410001.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler245() { + // Good luck! + return true; +} + +euler245(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-246-tangents-to-an-ellipse.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-246-tangents-to-an-ellipse.spanish.md new file mode 100644 index 0000000000..b5464f82b2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-246-tangents-to-an-ellipse.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f4621000cf542c50ff75 +challengeType: 5 +title: 'Problem 246: Tangents to an ellipse' +--- + +## Description +
+Una definición para una elipse es: +Dado un círculo c con centro M y radio r y un punto G tal que d (G, M) 0 +La construcción de los puntos de la elipse se muestra a continuación. + + + + + +dan los puntos M (-2000,1500) y G (8000,1500). +Se da también el círculo c con el centro M y el radio 15000. +El lugar geométrico de los puntos que están equidistantes de G yc forman una elipse e. +Desde un punto P fuera e, se dibujan las dos tangentes t1 y t2 a la elipse. +Deje que los puntos donde t1 y t2 toquen la elipse sean R y S. + + + + +¿Cuántos puntos de la red P es el ángulo RPS mayor que 45 grados? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler246() debe devolver 810834388. + testString: 'assert.strictEqual(euler246(), 810834388, "euler246() should return 810834388.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler246() { + // Good luck! + return true; +} + +euler246(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-247-squares-under-a-hyperbola.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-247-squares-under-a-hyperbola.spanish.md new file mode 100644 index 0000000000..01b8b876ec --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-247-squares-under-a-hyperbola.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4641000cf542c50ff76 +challengeType: 5 +title: 'Problem 247: Squares under a hyperbola' +--- + +## Description +
+Considere la región restringida por 1 ≤ x y 0 ≤ y ≤ 1 / x. + +Sea S1 el cuadrado más grande que puede caber debajo de la curva. +Sea S2 el cuadrado más grande que cabe en el área restante, y así sucesivamente. +Deje que el índice de Sn sea el par (izquierda, abajo) que indica el número de cuadrados a la izquierda de Sn y el número de cuadrados debajo de Sn. + + + + +El diagrama muestra algunos de estos cuadrados etiquetados por número. +S2 tiene un cuadrado a su izquierda y ninguno debajo, por lo que el índice de S2 es (1,0). +Se puede ver que el índice de S32 es (1,1) al igual que el índice de S50. +50 es la n más grande para la cual el índice de Sn es (1,1). + + +¿Cuál es la n más grande para la cual el índice de Sn es (3,3)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler247() debe devolver 782252. + testString: 'assert.strictEqual(euler247(), 782252, "euler247() should return 782252.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler247() { + // Good luck! + return true; +} + +euler247(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-249-prime-subset-sums.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-249-prime-subset-sums.spanish.md new file mode 100644 index 0000000000..0957ceaf3b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-249-prime-subset-sums.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f4671000cf542c50ff79 +challengeType: 5 +title: 'Problem 249: Prime Subset Sums' +--- + +## Description +
+Sea S = {2, 3, 5, ..., 4999} el conjunto de números primos menores que 5000. +Encuentre el número de subconjuntos de S, la suma de cuyos elementos es un número primo. +Ingrese los 16 dígitos más a la derecha como su respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler249() debe devolver 9275262564250418. + testString: 'assert.strictEqual(euler249(), 9275262564250418, "euler249() should return 9275262564250418.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler249() { + // Good luck! + return true; +} + +euler249(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.spanish.md new file mode 100644 index 0000000000..9bfe5b2c9c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.spanish.md @@ -0,0 +1,82 @@ +--- +id: 5 +localeTitle: 5900f3851000cf542c50fe98 +challengeType: 5 +title: 'Problem 25: 1000-digit Fibonacci number' +--- + +## Description +
+La secuencia de Fibonacci se define por la relación de recurrencia: +
F n = F n − 1 + F n − 2 , donde F 1 = 1 y F 2 = 1.
+Por lo tanto, los primeros 12 términos serán: +
F 1 = 1
F 2 = 1
F 3 = 2
F 4 = 3
F 5 = 5
F 6 = 8
F 7 = 13
F 8 = 21
F 9 = 34
F 10 = 55
F 11 = 89
F 12 = 144
+El término 12, F 12 , es el primer término que contiene tres dígitos. +¿Cuál es el índice del primer término en la secuencia de Fibonacci para contener n dígitos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: digitFibonacci(5) debe devolver 21. + testString: 'assert.strictEqual(digitFibonacci(5), 21, "digitFibonacci(5) should return 21.");' + - text: digitFibonacci(10) debe devolver 45. + testString: 'assert.strictEqual(digitFibonacci(10), 45, "digitFibonacci(10) should return 45.");' + - text: digitFibonacci(15) debe devolver 69. + testString: 'assert.strictEqual(digitFibonacci(15), 69, "digitFibonacci(15) should return 69.");' + - text: digitFibonacci(20) debe devolver 93. + testString: 'assert.strictEqual(digitFibonacci(20), 93, "digitFibonacci(20) should return 93.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function digitFibonacci(n) { + // Good luck! + return n; +} + +digitFibonacci(20); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const digitFibonacci = (n) => { + const digits = (num) => { + return num.toString().length; + }; + let f1 = 1; + let f2 = 1; + let index = 3; + while (true) { + let fn = f1 + f2; + if (digits(fn) === n) return index; + [f1, f2] = [f2, fn]; + index++; + } +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-251-cardano-triplets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-251-cardano-triplets.spanish.md new file mode 100644 index 0000000000..415f4c91b4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-251-cardano-triplets.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4671000cf542c50ff7a +challengeType: 5 +title: 'Problem 251: Cardano Triplets' +--- + +## Description +
+Un triplete de enteros positivos (a, b, c) se llama Cardano Triplet si cumple la condición: + + + +Por ejemplo, (2,1,5) es un Cardano Triplet. + + +Existen 149 Cardano Triplets para los cuales a + b + c ≤ 1000. + + +Encuentre cuántos Cardano Triplets existen de tal manera que a + b + c ≤ 110,000,000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler251() debe devolver 18946051. + testString: 'assert.strictEqual(euler251(), 18946051, "euler251() should return 18946051.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler251() { + // Good luck! + return true; +} + +euler251(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-252-convex-holes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-252-convex-holes.spanish.md new file mode 100644 index 0000000000..6338a29073 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-252-convex-holes.spanish.md @@ -0,0 +1,82 @@ +--- +id: 5 +localeTitle: 5900f4691000cf542c50ff7b +challengeType: 5 +title: 'Problem 252: Convex Holes' +--- + +## Description +
+Dado un conjunto de puntos en un plano, definimos un orificio convexo como un polígono convexo que tiene como vértices cualquiera de los puntos dados y que no contiene ninguno de los puntos dados en su interior (además de los vértices, otros puntos dados pueden mentira en el perímetro del polígono). + + +A modo de ejemplo, la siguiente imagen muestra un conjunto de veinte puntos y algunos de estos agujeros convexos. +El orificio convexo que se muestra como un heptágono rojo tiene un área igual a 1049694.5 unidades cuadradas, que es el área más alta posible para un orificio convexo en el conjunto de puntos dado. + + + + +Para nuestro ejemplo, usamos los primeros 20 puntos (T2k-1, T2k), para k = 1,2, ..., 20, producidos con el generador de números pseudoaleatorios: + +S0 += +290797 +Sn + 1 += +Sn2 mod 50515093 +Tn += +(Sn mod 2000) - 1000 + + + +ie (527, 144), (−488, 732), (−454, −947),… + + +¿Cuál es el área máxima para un agujero convexo en el conjunto que contiene los primeros 500 puntos en la secuencia pseudoaleatoria? Especifique su respuesta incluyendo un dígito después del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler252() debe devolver 104924. + testString: 'assert.strictEqual(euler252(), 104924, "euler252() should return 104924.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler252() { + // Good luck! + return true; +} + +euler252(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-253-tidying-up.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-253-tidying-up.spanish.md new file mode 100644 index 0000000000..7d43285a40 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-253-tidying-up.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4691000cf542c50ff7c +challengeType: 5 +title: 'Problem 253: Tidying up' +--- + +## Description +
+Un niño pequeño tiene un "número de oruga" que consta de cuarenta piezas de rompecabezas, cada una con un número, que, cuando están conectadas en una línea, revelan los números del 1 al 40 en orden. + +Todas las noches, el padre del niño tiene que recoger las piezas de la oruga que se han dispersado por la sala de juegos. Recoge las piezas al azar y las coloca en el orden correcto. A medida que la oruga se construye de esta manera, forma segmentos distintos que se fusionan gradualmente. El número de segmentos comienza en cero (no hay piezas colocadas), generalmente aumenta hasta aproximadamente once o doce, y luego tiende a disminuir nuevamente antes de terminar en un solo segmento (todas las piezas colocadas). + +Por ejemplo: + +Pieza colocada +segmentos Hasta ahora121422936434554354 …… + +Sea M el número máximo de segmentos encontrados durante una ordenación aleatoria de la oruga. +Para una oruga de diez piezas, el número de posibilidades para cada M es + +M +Posibilidades1512 2250912 31815264 41418112 5144000 + +por lo que el valor más probable de M es 3 y el valor promedio es 385643⁄113400 = 3.400732, redondeado a seis lugares decimales. + +El valor más probable de M para una oruga de cuarenta piezas es 11; ¿Pero cuál es el valor promedio de M? +Da tu respuesta redondeada a seis lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler253() debe devolver 11.492847. + testString: 'assert.strictEqual(euler253(), 11.492847, "euler253() should return 11.492847.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler253() { + // Good luck! + return true; +} + +euler253(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.spanish.md new file mode 100644 index 0000000000..44c77e8d95 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f46b1000cf542c50ff7d +challengeType: 5 +title: 'Problem 254: Sums of Digit Factorials' +--- + +## Description +
+Defina f (n) como la suma de los factoriales de los dígitos de n. Por ejemplo, f (342) = 3! + 4! + 2! = 32. + +Defina sf (n) como la suma de los dígitos de f (n). Entonces, sf (342) = 3 + 2 = 5. + +Defina g (i) como el entero positivo más pequeño n tal que sf (n) = i. Aunque sf (342) es 5, sf (25) también es 5, y se puede verificar que g (5) es 25. + +Defina sg (i) como la suma de los dígitos de g (i). Entonces sg (5) = 2 + 5 = 7. + +Además, se puede verificar que g (20) es 267 y ∑ sg (i) para 1 ≤ i ≤ 20 es 156. + +¿Qué es ∑ sg (i ) para 1 ≤ i ≤ 150? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler254() debe devolver 8184523820510. + testString: 'assert.strictEqual(euler254(), 8184523820510, "euler254() should return 8184523820510.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler254() { + // Good luck! + return true; +} + +euler254(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-255-rounded-square-roots.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-255-rounded-square-roots.spanish.md new file mode 100644 index 0000000000..43b22e7fb3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-255-rounded-square-roots.spanish.md @@ -0,0 +1,79 @@ +--- +id: 5 +localeTitle: 5900f46d1000cf542c50ff7f +challengeType: 5 +title: 'Problem 255: Rounded Square Roots' +--- + +## Description +
+Definimos la raíz cuadrada redondeada de un entero positivo n como la raíz cuadrada de n redondeada al entero más cercano. + +El siguiente procedimiento (esencialmente el método de Heron adaptado a la aritmética de enteros) encuentra la raíz cuadrada redondeada de n: +Sea d el número de dígitos del número n. +Si d es impar, configure x0 = 2 × 10 (d-1) ⁄2. +Si d es par, establezca x0 = 7 × 10 (d-2) ⁄2. +Repetir: + + + + +hasta que xk + 1 = xk. + +A modo de ejemplo, encontremos la raíz cuadrada redondeada de n = 4321.n tiene 4 dígitos, por lo que x0 = 7 × 10 (4-2) ⁄2 = 70. +Dado que x2 = x1, paramos aquí . +Entonces, después de solo dos iteraciones, hemos encontrado que la raíz cuadrada redondeada de 4321 es 66 (la raíz cuadrada real es 65.7343137…). + +El número de iteraciones requeridas al usar este método es sorprendentemente bajo. +Por ejemplo, podemos encontrar la raíz cuadrada redondeada de un entero de 5 dígitos (10,000 ≤ n ≤ 99,999) con un promedio de 3.2102888889 iteraciones (el valor promedio se redondea a 10 lugares decimales). + +Utilizando el procedimiento descrito anteriormente, ¿cuál es el número promedio de iteraciones requeridas para encontrar la raíz cuadrada redondeada de un número de 14 dígitos (1013 ≤ n <1014)? +Da tu respuesta redondeada a 10 decimales. + +Nota: Los símbolos ⌊x⌋ y ⌈x⌉ representan la función de piso y la función de techo respectivamente. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler255() debe devolver 4.447401118. + testString: 'assert.strictEqual(euler255(), 4.447401118, "euler255() should return 4.447401118.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler255() { + // Good luck! + return true; +} + +euler255(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.spanish.md new file mode 100644 index 0000000000..c9fd4f145e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f46c1000cf542c50ff7e +challengeType: 5 +title: 'Problem 256: Tatami-Free Rooms' +--- + +## Description +
+tatami son esteras rectangulares, que se utilizan para cubrir completamente el piso de una habitación, sin superposición. + +Suponiendo que el único tipo de tatami disponible tiene dimensiones 1 × 2, obviamente hay algunas limitaciones para la forma y el tamaño de las habitaciones que se pueden cubrir. + +Para este problema, consideramos solo habitaciones rectangulares con dimensiones enteras a, by tamaño s = a · b. +Usamos el término 'tamaño' para denotar el área de superficie del piso de la habitación y, sin pérdida de generalidad, agregamos la condición a ≤ b. + +Hay una regla que se debe seguir al diseñar el tatami: no debe haber puntos en los rincones de cuatro tapetes diferentes. +Por ejemplo, considere los dos arreglos a continuación para una habitación 4 × 4: + + + +El arreglo de la izquierda es aceptable, mientras que el de la derecha no lo es: una "X" roja en el centro, marca el punto donde cuatro tatami se encuentran. + +Debido a esta regla, ciertas habitaciones de tamaño uniforme no pueden cubrirse con tatami: las llamamos habitaciones libres de tatami. +Además, definimos T (s) como el número de habitaciones libres de tatami de tamaño s. + +La habitación más pequeña sin tatami tiene un tamaño s = 70 y dimensiones 7 × 10. +Todas las otras habitaciones de tamaño s = 70 se pueden cubrir con tatami; son: 1 × 70, 2 × 35 y 5 × 14. +Por lo tanto, T (70) = 1. + +De manera similar, podemos verificar que T (1320) = 5 porque hay exactamente 5 habitaciones libres de tatami de tamaño s = 1320: +20 × 66, 22 × 60, 24 × 55, 30 × 44 y 33 × 40. +De hecho, s = 1320 es el tamaño de sala más pequeño s para el cual T (s) = 5. + +Encuentre el tamaño más pequeño de sala s para el cual T (s) = 200. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler256() debe devolver 85765680. + testString: 'assert.strictEqual(euler256(), 85765680, "euler256() should return 85765680.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler256() { + // Good luck! + return true; +} + +euler256(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-257-angular-bisectors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-257-angular-bisectors.spanish.md new file mode 100644 index 0000000000..3a147637d4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-257-angular-bisectors.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f46e1000cf542c50ff80 +challengeType: 5 +title: 'Problem 257: Angular Bisectors' +--- + +## Description +
+Dado es un triángulo ABC de lados enteros con lados a ≤ b ≤ c. +(AB = c, BC = a y AC = b). +Las bisectrices angulares del triángulo intersecan los lados en los puntos E, F y G (vea la imagen a continuación). + + + + +Los segmentos EF, EG y FG dividen el triángulo ABC en cuatro triángulos más pequeños: AEG, BFE, CGF y EFG. +Se puede probar que para cada uno de estos cuatro triángulos, el área de relación (ABC) / área (sub-triángulo) es racional. +Sin embargo, existen triángulos para los cuales algunas o todas estas relaciones son integrales. + + +¿Cuántos triángulos ABC con perímetro ≤100,000,000 existen para que la relación área (ABC) / área (AEG) sea integral? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler257() debe devolver 139012411. + testString: 'assert.strictEqual(euler257(), 139012411, "euler257() should return 139012411.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler257() { + // Good luck! + return true; +} + +euler257(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-258-a-lagged-fibonacci-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-258-a-lagged-fibonacci-sequence.spanish.md new file mode 100644 index 0000000000..eea4f7f877 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-258-a-lagged-fibonacci-sequence.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f46e1000cf542c50ff81 +challengeType: 5 +title: 'Problem 258: A lagged Fibonacci sequence' +--- + +## Description +
+Una secuencia se define como: + +gk = 1, para 0 ≤ k ≤ 1999 +gk = gk-2000 + gk-1999, para k ≥ 2000. +Encontrar gk mod 20092010 para k = 1018. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler258() debe devolver 12747994. + testString: 'assert.strictEqual(euler258(), 12747994, "euler258() should return 12747994.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler258() { + // Good luck! + return true; +} + +euler258(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-259-reachable-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-259-reachable-numbers.spanish.md new file mode 100644 index 0000000000..7229b56a92 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-259-reachable-numbers.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4701000cf542c50ff82 +challengeType: 5 +title: 'Problem 259: Reachable Numbers' +--- + +## Description +
+Se llamará alcanzable a un entero positivo si puede ser el resultado de una expresión aritmética que obedezca las siguientes reglas: + +Usa los dígitos del 1 al 9, en ese orden y exactamente una vez por cada uno. +Cualquier dígito sucesivo puede ser concatenado (por ejemplo, utilizando los dígitos 2, 3 y 4 obtenemos el número 234). +Solo se permiten las cuatro operaciones aritméticas binarias habituales (suma, resta, multiplicación y división). +Cada operación se puede utilizar cualquier número de veces, o no se usa en absoluto. +Unario menos no está permitido. +Se puede usar cualquier número de paréntesis (posiblemente anidados) para definir el orden de las operaciones. +Por ejemplo, 42 es accesible, ya que (1/23) * ((4 * 5) -6) * (78-9) = 42. + +¿Cuál es la suma de todos los enteros alcanzables positivos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler259() debe devolver 20101196798. + testString: 'assert.strictEqual(euler259(), 20101196798, "euler259() should return 20101196798.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler259() { + // Good luck! + return true; +} + +euler259(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.spanish.md new file mode 100644 index 0000000000..0feeca69e2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f3861000cf542c50fe99 +challengeType: 5 +title: 'Problem 26: Reciprocal cycles' +--- + +## Description +
+Una fracción unitaria contiene 1 en el numerador. Se da la representación decimal de las fracciones unitarias con denominadores 2 a 10: +
Media = 0,5
1/3 = 0. (3)
1/4 = 0,25
1/5 = 0,2
1/6 = 0,1 (6)
Séptima = 0. (142857)
1/8 = 0,125
1/9 = 0. (1)
1/10 = 0,1
+Donde 0.1 (6) significa 0.166666 ..., y tiene un ciclo recurrente de 1 dígito. Puede ser visto que 1/7 tiene un ciclo recurrente de 6 dígitos. +Encuentre el valor de d < n para el cual 1 / d contiene el ciclo recurrente más largo en su parte de fracción decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: reciprocalCycles(700) deben devolver 659. + testString: 'assert(reciprocalCycles(700) == 659, "reciprocalCycles(700) should return 659.");' + - text: reciprocalCycles(800) deben devolver 743. + testString: 'assert(reciprocalCycles(800) == 743, "reciprocalCycles(800) should return 743.");' + - text: reciprocalCycles(900) deben devolver 887. + testString: 'assert(reciprocalCycles(900) == 887, "reciprocalCycles(900) should return 887.");' + - text: reciprocalCycles(1000) deben devolver 983. + testString: 'assert(reciprocalCycles(1000) == 983, "reciprocalCycles(1000) should return 983.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function reciprocalCycles(n) { + // Good luck! + return n; +} + +reciprocalCycles(1000); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-260-stone-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-260-stone-game.spanish.md new file mode 100644 index 0000000000..912b06e69a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-260-stone-game.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4701000cf542c50ff83 +challengeType: 5 +title: 'Problem 260: Stone Game' +--- + +## Description +
+Un juego se juega con tres pilas de piedras y dos jugadores. +En su turno, un jugador quita una o más piedras de las pilas. Sin embargo, si toma piedras de más de una pila, debe quitar la misma cantidad de piedras de cada una de las pilas seleccionadas. + +En otras palabras, el jugador elige algunas N> 0 y elimina: +N piedras de cualquier pila individual; o +N piedras de cada una de las dos pilas (2N en total); o +N piedras de cada una de las tres pilas (3N total). +El jugador que toma la última piedra (s) gana el juego. + +Una configuración ganadora es aquella en la que el primer jugador puede forzar una victoria. +Por ejemplo, (0,0,13), (0,11,11) y (5,5,5) son configuraciones ganadoras porque el primer jugador puede eliminar inmediatamente todas las piedras. + +Una configuración perdida es aquella en la que el segundo jugador puede forzar una victoria, sin importar lo que haga el primer jugador. +Por ejemplo, (0,1,2) y (1,3,3) están perdiendo configuraciones: cualquier movimiento legal deja una configuración ganadora para el segundo jugador. + +Considere todas las configuraciones perdidas (xi, yi, zi) donde xi ≤ yi ≤ zi ≤ 100. +Podemos verificar que Σ (xi + yi + zi) = 173895 para estas. + +Encuentre Σ (xi + yi + zi) donde (xi, yi, zi) varía sobre las configuraciones perdidas +con xi ≤ yi ≤ zi ≤ 1000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler260() debe devolver 167542057. + testString: 'assert.strictEqual(euler260(), 167542057, "euler260() should return 167542057.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler260() { + // Good luck! + return true; +} + +euler260(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-262-mountain-range.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-262-mountain-range.spanish.md new file mode 100644 index 0000000000..3618c4f951 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-262-mountain-range.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4731000cf542c50ff85 +challengeType: 5 +title: 'Problem 262: Mountain Range' +--- + +## Description +
+La siguiente ecuación representa la topografía continua de una región montañosa, que da la elevación h en cualquier punto (x, y): + + + + +Un mosquito tiene la intención de volar desde A (200,200) a B (1400,1400), sin dejando el área dada por 0 ≤ x, y ≤ 1600. + +Debido a las montañas que intervienen, primero se eleva directamente hasta un punto A ', que tiene una elevación f. Luego, mientras permanece en la misma elevación f, vuela alrededor de cualquier obstáculo hasta que llega a un punto B 'directamente arriba de B. + +Primero, determine fmin, que es la elevación constante mínima que permite un viaje de A a B, mientras permanece En el área especificada. +Luego, encuentra la longitud del camino más corto entre A 'y B', mientras vuelas a esa constante constante fmin. + +Da esa longitud como tu respuesta, redondeada a tres lugares decimales. + +Nota: Por conveniencia, la función de elevación que se muestra arriba se repite a continuación, en una forma adecuada para la mayoría de los lenguajes de programación: +h = (5000-0.005 * (x * x + y * y + x * y) + 12.5 * ( x + y)) * exp (-abs (0.000001 * (x * x + y * y) -0.0015 * (x + y) +0.7)) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler262() debe devolver 2531.205. + testString: 'assert.strictEqual(euler262(), 2531.205, "euler262() should return 2531.205.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler262() { + // Good luck! + return true; +} + +euler262(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-263-an-engineers-dream-come-true.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-263-an-engineers-dream-come-true.spanish.md new file mode 100644 index 0000000000..33d95ced7b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-263-an-engineers-dream-come-true.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4741000cf542c50ff86 +challengeType: 5 +title: 'Problem 263: An engineers" dream come true' +--- + +## Description +
+Considere el número 6. Los divisores de 6 son: 1,2,3 y 6. +Cada número desde 1 hasta e incluyendo 6 puede escribirse como una suma de divisores distintos de 6: +1 = 1, 2 = 2 , 3 = 1 + 2, 4 = 1 + 3, 5 = 2 + 3, 6 = 6. +Un número n se denomina número práctico si cada número desde 1 hasta e incluyendo n puede expresarse como una suma de divisores distintos de n. + + +Un par de números primos consecutivos con una diferencia de seis se llama un par sexy (ya que "sexo" es la palabra latina para "seis"). La primera pareja sexy es (23, 29). + + +Ocasionalmente podemos encontrar un par triple, lo que significa tres pares primos sexy consecutivos, de manera que el segundo miembro de cada par es el primer miembro del siguiente par. + + +Llamaremos a un número n tal que: +(n-9, n-3), (n-3, n + 3), (n + 3, n + 9) forman un par triple y +Los números n-8, n-4, n, n + 4 y n + 8 son prácticos, + +un paraíso para los ingenieros. + + +Encuentra la suma de los primeros cuatro paraísos de los ingenieros. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler263() debe devolver 2039506520. + testString: 'assert.strictEqual(euler263(), 2039506520, "euler263() should return 2039506520.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler263() { + // Good luck! + return true; +} + +euler263(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-264-triangle-centres.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-264-triangle-centres.spanish.md new file mode 100644 index 0000000000..facfaee388 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-264-triangle-centres.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f4751000cf542c50ff87 +challengeType: 5 +title: 'Problem 264: Triangle Centres' +--- + +## Description +
+Considera todos los triángulos que tienen: +Todos sus vértices en los puntos de la red. +Circuncentro en el origen O. +Ortocentro en el punto H (5, 0). +Hay nueve triángulos que tienen un perímetro ≤ 50. +Listados y mostrados en orden ascendente de su perímetro, son: + +A (-4, 3), B (5, 0), C (4, -3) +A (4, 3), B (5, 0), C (-4, -3) +A (-3, 4), B (5, 0), C (3, -4) +A (3 , 4), B (5, 0), C (-3, -4) +A (0, 5), B (5, 0), C (0, -5) +A (1, 8), B (8, -1), C (-4, -7) +A (8, 1), B (1, -8), C (-4, 7) +A (2, 9), B (9, -2), C (-6, -7) +A (9, 2), B (2, -9), C (-6, 7) + +La suma de sus perímetros, redondeada a cuatro decimales, es 291.0089. + +Encuentre todos los triángulos con un perímetro ≤ 105. +Introduzca como respuesta la suma de sus perímetros redondeados a cuatro lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler264() debe devolver 2816417.1055. + testString: 'assert.strictEqual(euler264(), 2816417.1055, "euler264() should return 2816417.1055.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler264() { + // Good luck! + return true; +} + +euler264(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-265-binary-circles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-265-binary-circles.spanish.md new file mode 100644 index 0000000000..9a13dab2ea --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-265-binary-circles.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4761000cf542c50ff88 +challengeType: 5 +title: 'Problem 265: Binary Circles' +--- + +## Description +
+2N dígitos binarios se pueden colocar en un círculo para que todas las subsecuencias en el sentido de las agujas del reloj de N dígitos sean distintas. + +Para N = 3, dos disposiciones circulares de este tipo son posibles, ignorando rotaciones: + + +Para la primera disposición, las subsecuencias de 3 dígitos, en el sentido de las agujas del reloj, son: 000, 001, 010, 101, 011, 111, 110 y 100. + +Cada disposición circular puede codificarse como un número al concatenar los dígitos binarios comenzando con la subsecuencia de todos los ceros como los bits más significativos y proceder en el sentido de las agujas del reloj. Las dos disposiciones para N = 3 se representan así como 23 y 29: +00010111 2 = 23 +00011101 2 = 29 + +Llamando a S (N) la suma de las representaciones numéricas únicas, podemos ver que S (3) = 23 + 29 = 52. + +Encuentra S (5). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler265() debe devolver 209110240768. + testString: 'assert.strictEqual(euler265(), 209110240768, "euler265() should return 209110240768.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler265() { + // Good luck! + return true; +} + +euler265(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-266-pseudo-square-root.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-266-pseudo-square-root.spanish.md new file mode 100644 index 0000000000..3fc1756d25 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-266-pseudo-square-root.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4771000cf542c50ff89 +challengeType: 5 +title: 'Problem 266: Pseudo Square Root' +--- + +## Description +
+Los divisores de 12 son: 1,2,3,4,6 y 12. +El divisor más grande de 12 que no excede la raíz cuadrada de 12 es 3. +Llamaremos el divisor más grande de un entero n que hace no exceda la raíz cuadrada de n la pseudo raíz cuadrada (PSR) de n. +Se puede ver que PSR (3102) = 47. + + +Sea p el producto de los números primos por debajo de 190. +Encuentre PSR (p) mod 1016. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler266() debe devolver 1096883702440585. + testString: 'assert.strictEqual(euler266(), 1096883702440585, "euler266() should return 1096883702440585.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler266() { + // Good luck! + return true; +} + +euler266(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-267-billionaire.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-267-billionaire.spanish.md new file mode 100644 index 0000000000..0a300e1166 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-267-billionaire.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4771000cf542c50ff8a +challengeType: 5 +title: 'Problem 267: Billionaire' +--- + +## Description +
+Se le da una oportunidad de inversión única. +A partir de £ 1 de capital, puede elegir una proporción fija, f, de su capital para apostar en un sorteo de moneda justa repetidamente para 1000 sorteos. +Su devolución es el doble de su apuesta por caras y usted pierde su apuesta por las colas. +Por ejemplo, si f = 1/4, para el primer lanzamiento usted apuesta £ 0.25, y si sale cara, gana £ 0.5 y entonces tiene £ 1.5. Luego apuestas $ 0.375 y si el segundo sorteo son colas, tienes £ 1.125. +Elegir f para maximizar sus posibilidades de tener al menos 1,000,000,000 de libras después de 1,000 vueltas, ¿cuál es la probabilidad de que se convierta en multimillonario? +Se supone que todos los cálculos son exactos (sin redondeo), pero su respuesta se redondea a 12 dígitos detrás del punto decimal en la forma 0.abcdefghijkl. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler267() debe devolver 0.999992836187. + testString: 'assert.strictEqual(euler267(), 0.999992836187, "euler267() should return 0.999992836187.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler267() { + // Good luck! + return true; +} + +euler267(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.spanish.md new file mode 100644 index 0000000000..e868845cce --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f4791000cf542c50ff8b +challengeType: 5 +title: 'Problem 268: Counting numbers with at least four distinct prime factors less than 100' +--- + +## Description +
+Se puede verificar que hay 23 enteros positivos menores que 1000 que son divisibles por al menos cuatro primos distintos menores que 100. + +Encuentre cuántos enteros positivos menores de 1016 son divisibles por al menos cuatro primos distintos menores que 100. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler268() debe devolver 785478606870985. + testString: 'assert.strictEqual(euler268(), 785478606870985, "euler268() should return 785478606870985.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler268() { + // Good luck! + return true; +} + +euler268(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.spanish.md new file mode 100644 index 0000000000..5002a2e3fe --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4791000cf542c50ff8c +challengeType: 5 +title: 'Problem 269: Polynomials with at least one integer root' +--- + +## Description +
+Una raíz o cero de un polinomio P (x) es una solución a la ecuación P (x) = 0. +Defina Pn como el polinomio cuyos coeficientes son los dígitos de n. +Por ejemplo, P5703 (x) = 5x3 + 7x2 + 3. + +Podemos ver que: Pn (0) es el último dígito de n, +Pn (1) es la suma de los dígitos de n, +Pn ( 10) es n en sí. Defina Z (k) como el número de enteros positivos, n, que no exceda de k para los cuales el polinomio Pn tiene al menos una raíz entera. + +Se puede verificar que Z (100 000) es 14696. + +¿Qué es Z (1016)? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler269() debe devolver 1311109198529286. + testString: 'assert.strictEqual(euler269(), 1311109198529286, "euler269() should return 1311109198529286.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler269() { + // Good luck! + return true; +} + +euler269(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-27-quadratic-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-27-quadratic-primes.spanish.md new file mode 100644 index 0000000000..9ae2535487 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-27-quadratic-primes.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f3871000cf542c50fe9a +challengeType: 5 +title: 'Problem 27: Quadratic primes' +--- + +## Description +
+Euler descubrió la extraordinaria fórmula cuadrática: +$ n ^ 2 + n + 41 $ +Resulta que la fórmula producirá 40 primos para los valores enteros consecutivos $ 0 \ le n \ le 39 $. Sin embargo, cuando $ n = 40, 40 ^ 2 + 40 + 41 = 40 (40 + 1) + 41 $ es divisible por 41, y ciertamente cuando $ n = 41, 41 ^ 2 + 41 + 41 $ es claramente divisible por 41. +Se descubrió la fórmula increíble $ n ^ 2 - 79n + 1601 $, que produce 80 números primos para los valores consecutivos $ 0 \ le n \ le 79 $. El producto de los coeficientes, −79 y 1601, es −126479. +Considerando las cuestiones cuadráticas de la forma: + +$ n ^ 2 + an + b $, donde $ | a | <rango $ y $ | b | \ le range $ donde $ | n | $ es el módulo / valor absoluto de $ n $, por ejemplo, $ | 11 | = 11 $ y $ | -4 | = 4 $ + +Encuentre el producto de los coeficientes, $ a $ y $ b $, para la expresión cuadrática que produce el número máximo de primos para valores consecutivos de $ n $, comenzando con $ n = 0 $. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: quadraticPrimes(200) debe devolver -4925. + testString: 'assert(quadraticPrimes(200) == -4925, "quadraticPrimes(200) should return -4925.");' + - text: quadraticPrimes(500) debe devolver -18901. + testString: 'assert(quadraticPrimes(500) == -18901, "quadraticPrimes(500) should return -18901.");' + - text: quadraticPrimes(800) debe devolver -43835. + testString: 'assert(quadraticPrimes(800) == -43835, "quadraticPrimes(800) should return -43835.");' + - text: quadraticPrimes(1000) debe devolver -59231. + testString: 'assert(quadraticPrimes(1000) == -59231, "quadraticPrimes(1000) should return -59231.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function quadraticPrimes(range) { + // Good luck! + return range; +} + +quadraticPrimes(1000); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-270-cutting-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-270-cutting-squares.spanish.md new file mode 100644 index 0000000000..726191994a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-270-cutting-squares.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f47c1000cf542c50ff8e +challengeType: 5 +title: 'Problem 270: Cutting Squares' +--- + +## Description +
+Una pieza cuadrada de papel con dimensiones enteras N × N se coloca con una esquina en el origen y dos de sus lados a lo largo de los ejes x e y. Luego, lo cortamos respetando las siguientes reglas: +Solo hacemos cortes rectos entre dos puntos que se encuentran en lados diferentes del cuadrado y que tienen coordenadas enteras. +Dos cortes no pueden cruzarse, pero varios cortes pueden encontrarse en el mismo punto de borde. +Continuar hasta que no se puedan hacer más recortes legales. +contamos las reflexiones o rotaciones como distintas, llamamos a C (N) el número de formas de cortar un cuadrado N × N. Por ejemplo, C (1) = 2 y C (2) = 30 (se muestra a continuación). + + +¿Qué es C (30) mod 108? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler270() debe devolver 82282080. + testString: 'assert.strictEqual(euler270(), 82282080, "euler270() should return 82282080.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler270() { + // Good luck! + return true; +} + +euler270(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.spanish.md new file mode 100644 index 0000000000..a9772c05d0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f47b1000cf542c50ff8d +challengeType: 5 +title: 'Problem 271: Modular Cubes, part 1' +--- + +## Description +
+Para un número positivo n, defina S (n) como la suma de los enteros x, para lo cual 1 0 + +Cuando n = 91, hay 8 valores posibles para x, a saber: 9, 16, 22, 29, 53, 74, 79, 81. +Por lo tanto, S (91) = 9 + 16 + 22 + 29 + 53 + 74 + 79 + 81 = 363. + +Encuentra S (13082761331670030). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler271() debe devolver 4617456485273130000. + testString: 'assert.strictEqual(euler271(), 4617456485273130000, "euler271() should return 4617456485273130000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler271() { + // Good luck! + return true; +} + +euler271(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.spanish.md new file mode 100644 index 0000000000..4283088aff --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f47d1000cf542c50ff8f +challengeType: 5 +title: 'Problem 272: Modular Cubes, part 2' +--- + +## Description +
+Para un número positivo n, defina C (n) como el número de los enteros x, para los cuales 1 0 + +Cuando n = 91, hay 8 valores posibles para x, a saber: 9, 16, 22, 29, 53, 74, 79, 81. +Por lo tanto, C (91) = 8. + +Encuentra la suma de los números positivos n≤1011 para los que C (n) = 242. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler272() debe devolver 8495585919506151000. + testString: 'assert.strictEqual(euler272(), 8495585919506151000, "euler272() should return 8495585919506151000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler272() { + // Good luck! + return true; +} + +euler272(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-273-sum-of-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-273-sum-of-squares.spanish.md new file mode 100644 index 0000000000..4271a98159 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-273-sum-of-squares.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f47e1000cf542c50ff90 +challengeType: 5 +title: 'Problem 273: Sum of Squares' +--- + +## Description +
+Considera las ecuaciones de la forma: a2 + b2 = N, 0 ≤ a ≤ b, a, by N entero. + +Para N = 65 hay dos soluciones: +a = 1, b = 8 y a = 4, b = 7. +Llamamos a S (N) la suma de los valores de a de todas las soluciones de a2 + b2 = N, 0 ≤ a ≤ b, a, by N entero. +Así, S (65) = 1 + 4 = 5. +Encuentre FindS (N), para todos los cuadrados libres N solo divisibles por números primos de la forma 4k + 1 con 4k + 1 <150. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler273() debe devolver 2032447591196869000. + testString: 'assert.strictEqual(euler273(), 2032447591196869000, "euler273() should return 2032447591196869000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler273() { + // Good luck! + return true; +} + +euler273(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-274-divisibility-multipliers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-274-divisibility-multipliers.spanish.md new file mode 100644 index 0000000000..c9d79543ff --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-274-divisibility-multipliers.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f47f1000cf542c50ff91 +challengeType: 5 +title: 'Problem 274: Divisibility Multipliers' +--- + +## Description +
+Para cada entero p> 1 coprime a 10 hay un multiplicador de divisibilidad positiva m <p que preserva la divisibilidad por p para la siguiente función en cualquier entero positivo, n: + +f (n) = (todos menos el último dígito de n ) + (el último dígito de n) * m + +Es decir, si m es el multiplicador de divisibilidad para p, entonces f (n) es divisible por p si y solo si n es divisible por p. + +(cuando n es mucho mayor que p, f (n) será menor que n y la aplicación repetida de f proporciona una prueba de divisibilidad multiplicativa para p.) + +Por ejemplo, el multiplicador de divisibilidad para 113 es 34. + +f (76275) = 7627 + 5 * 34 = 7797: 76275 y 7797 son divisibles por 113f (12345) = 1234 + 5 * 34 = 1404: 12345 y 1404 no son divisibles por 113 + +La suma de los multiplicadores de divisibilidad para los números primos que son coprime a 10 y menos de 1000 son 39517. ¿Cuál es la suma de los multiplicadores de divisibilidad para los números primos que son coprime a 10 y menos de 107? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler274() debe devolver 1601912348822. + testString: 'assert.strictEqual(euler274(), 1601912348822, "euler274() should return 1601912348822.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler274() { + // Good luck! + return true; +} + +euler274(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-275-balanced-sculptures.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-275-balanced-sculptures.spanish.md new file mode 100644 index 0000000000..486f271c41 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-275-balanced-sculptures.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4801000cf542c50ff92 +challengeType: 5 +title: 'Problem 275: Balanced Sculptures' +--- + +## Description +
+Definamos una escultura equilibrada de orden n de la siguiente manera: +Un poliomino compuesto de n + 1 fichas conocidas como bloques (n fichas) y el plinto (baldosas restantes); +el zócalo tiene su centro en la posición (x = 0, y = 0); +los bloques tienen coordenadas y mayores que cero (por lo tanto, el plinto es el único mosaico más bajo); +el centro de masa de todos los bloques, combinado, tiene la coordenada x igual a cero. +Al contar las esculturas, los arreglos que son simplemente reflexiones sobre el eje y, no se cuentan como distintos. Por ejemplo, las 18 esculturas balanceadas de orden 6 se muestran a continuación; tenga en cuenta que cada par de imágenes en espejo (sobre el eje y) se cuenta como una escultura: + + +Hay 964 esculturas equilibradas de orden 10 y 360505 de orden 15. ¿Cuántas esculturas balanceadas hay de orden 18? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler275() debe devolver 15030564. + testString: 'assert.strictEqual(euler275(), 15030564, "euler275() should return 15030564.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler275() { + // Good luck! + return true; +} + +euler275(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-276-primitive-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-276-primitive-triangles.spanish.md new file mode 100644 index 0000000000..baa8eaa303 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-276-primitive-triangles.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f4801000cf542c50ff93 +challengeType: 5 +title: 'Problem 276: Primitive Triangles' +--- + +## Description +
+Considera los triángulos con lados enteros a, b y c con a ≤ b ≤ c. +Un triángulo de un lado entero (a, b, c) se llama primitivo si gcd (a, b, c) = 1. +¿Cuántos triángulos de lados enteros primitivos existen con un perímetro que no exceda de 10 000 000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler276() debe devolver 5777137137739633000. + testString: 'assert.strictEqual(euler276(), 5777137137739633000, "euler276() should return 5777137137739633000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler276() { + // Good luck! + return true; +} + +euler276(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-277-a-modified-collatz-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-277-a-modified-collatz-sequence.spanish.md new file mode 100644 index 0000000000..1f74303df5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-277-a-modified-collatz-sequence.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f4811000cf542c50ff94 +challengeType: 5 +title: 'Problem 277: A Modified Collatz sequence' +--- + +## Description +
+Se obtiene una secuencia de enteros de Collatz modificada a partir de un valor inicial a1 de la siguiente manera: + +an + 1 = an / 3 si an es divisible entre 3. Denotaremos esto como un gran paso hacia abajo, "D". + +an + 1 = (4an + 2) / 3 si dividido por 3 da un resto de 1. Denotaremos esto como un paso hacia arriba, "U". + + +an + 1 = (2an - 1) / 3 si dividido por 3 da un resto de 2. Denotaremos esto como un pequeño paso hacia abajo, "d". + + + + +La secuencia termina cuando algunos an = 1. + + +Dado cualquier entero, podemos enumerar la secuencia de pasos. +Por ejemplo, si a1 = 231, entonces la secuencia {an} = {231,77,51,17,11,7,10,14,9,3,1} corresponde a los pasos "DdDddUUdDD". + + +Por supuesto, hay otras secuencias que comienzan con esa misma secuencia "DdDddUUdDD ....". +Por ejemplo, si a1 = 1004064, entonces la secuencia es DdDddUUdDDDdUDUUUdDdUUDDDUdDD. +De hecho, 1004064 es el a1> 106 más pequeño posible que comienza con la secuencia DdDddUUdDD. + + +¿Cuál es el a1> 1015 más pequeño que comienza con la secuencia "UDDDUdddDDUDDddDdDddDDUDDdUUDd"? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler277() debe devolver 1125977393124310. + testString: 'assert.strictEqual(euler277(), 1125977393124310, "euler277() should return 1125977393124310.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler277() { + // Good luck! + return true; +} + +euler277(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-278-linear-combinations-of-semiprimes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-278-linear-combinations-of-semiprimes.spanish.md new file mode 100644 index 0000000000..769d5bf245 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-278-linear-combinations-of-semiprimes.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4831000cf542c50ff95 +challengeType: 5 +title: 'Problem 278: Linear Combinations of Semiprimes' +--- + +## Description +
+Dados los valores de los enteros 1 <a1 <a2 <... <an, considere la combinación lineal q1a1 + q2a2 + ... + qnan = b, utilizando solo valores enteros qk ≥ 0. + + +Tenga en cuenta que para un conjunto dado de ak, puede ser que no todos los valores de b sean posibles. +Por ejemplo, si a1 = 5 y a2 = 7, no hay q1 ≥ 0 y q2 ≥ 0, por lo que b podría ser +1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18 o 23. + +De hecho, 23 es el mayor valor imposible de b para a1 = 5 y a2 = 7. Por lo tanto, llamamos f (5, 7) = 23. Del mismo modo, se puede mostrar que f (6, 10, 15) = 29 y f (14, 22, 77) = 195. + + +Encuentre ∑ f (p * q, p * r, q * r), donde p, qyr son números primos yp <q < r <5000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler278() debe devolver 1228215747273908500. + testString: 'assert.strictEqual(euler278(), 1228215747273908500, "euler278() should return 1228215747273908500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler278() { + // Good luck! + return true; +} + +euler278(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-279-triangles-with-integral-sides-and-an-integral-angle.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-279-triangles-with-integral-sides-and-an-integral-angle.spanish.md new file mode 100644 index 0000000000..ee27bfd49b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-279-triangles-with-integral-sides-and-an-integral-angle.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f4841000cf542c50ff96 +challengeType: 5 +title: 'Problem 279: Triangles with integral sides and an integral angle' +--- + +## Description +
+¿Cuántos triángulos hay con lados integrales, al menos un ángulo integral (medido en grados) y un perímetro que no exceda de 108? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler279() debe devolver 416577688. + testString: 'assert.strictEqual(euler279(), 416577688, "euler279() should return 416577688.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler279() { + // Good luck! + return true; +} + +euler279(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.spanish.md new file mode 100644 index 0000000000..23fba04437 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f3881000cf542c50fe9b +challengeType: 5 +title: 'Problem 28: Number spiral diagonals' +--- + +## Description +
+Comenzando con el número 1 y moviéndose hacia la derecha en el sentido de las agujas del reloj, se forma una espiral de 5 por 5 de la siguiente manera: +21 22 23 24 25 +20 7 8 9 10 +19 6 1 2 11 +18 5 4 3 12 +17 16 15 14 13 +Se puede verificar que la suma de los números en las diagonales es 101. +¿Cuál es la suma de los números en las diagonales en una espiral by by n formada de la misma manera? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: spiralDiagonals(101) debe devolver 692101. + testString: 'assert(spiralDiagonals(101) == 692101, "spiralDiagonals(101) should return 692101.");' + - text: spiralDiagonals(303) debe devolver 18591725. + testString: 'assert(spiralDiagonals(303) == 18591725, "spiralDiagonals(303) should return 18591725.");' + - text: spiralDiagonals(505) debe devolver 85986601. + testString: 'assert(spiralDiagonals(505) == 85986601, "spiralDiagonals(505) should return 85986601.");' + - text: spiralDiagonals(1001) debe devolver 669171001. + testString: 'assert(spiralDiagonals(1001) == 669171001, "spiralDiagonals(1001) should return 669171001.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function spiralDiagonals(n) { + // Good luck! + return n; +} + +spiralDiagonals(1001); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const spiralDiagonals = (n) => { + const Sn2 = (n) => { + return n*(n+1)*(2*n+1)/6; + }; + const Sn = (n) => { + return n*(n+1)/2; + }; + let sum = (Sn2(n-1) + Sn(n-1) + n-1) + (Math.floor(n/2) + Sn2(n)); + return sum; +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-280-ant-and-seeds.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-280-ant-and-seeds.spanish.md new file mode 100644 index 0000000000..25f964eb3b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-280-ant-and-seeds.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4841000cf542c50ff97 +challengeType: 5 +title: 'Problem 280: Ant and seeds' +--- + +## Description +
+Una hormiga laboriosa camina al azar en una cuadrícula de 5x5. El paseo comienza desde la plaza central. En cada paso, la hormiga se mueve a un cuadrado adyacente al azar, sin salir de la cuadrícula; por lo tanto, hay 2, 3 o 4 movimientos posibles en cada paso dependiendo de la posición de la hormiga. + +Al comienzo de la caminata, se coloca una semilla en cada cuadrado de la fila inferior. Cuando la hormiga no lleva una semilla y alcanza un cuadrado de la fila inferior que contiene una semilla, comenzará a llevar la semilla. La hormiga caerá la semilla en el primer cuadrado vacío de la fila superior que eventualmente alcance. + +¿Cuál es el número esperado de pasos hasta que todas las semillas se hayan caído en la fila superior? +Da tu respuesta redondeada a 6 lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler280() debe devolver 430.088247. + testString: 'assert.strictEqual(euler280(), 430.088247, "euler280() should return 430.088247.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler280() { + // Good luck! + return true; +} + +euler280(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-281-pizza-toppings.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-281-pizza-toppings.spanish.md new file mode 100644 index 0000000000..43596cbfb9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-281-pizza-toppings.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4861000cf542c50ff98 +challengeType: 5 +title: 'Problem 281: Pizza Toppings' +--- + +## Description +
+Se le da una pizza (círculo perfecto) que se ha cortado en muchos nudos y desea tener exactamente una cobertura en cada rebanada. + +Deje que f (m, n) denote la cantidad de formas en que puede tener ingredientes en la pizza con m ingredientes diferentes (m ≥ 2), usando cada cobertura en exactamente n rebanadas (n ≥ 1). Las reflexiones se consideran distintas, las rotaciones no. + +Así, por ejemplo, f (2,1) = 1, f (2,2) = f (3,1) = 2 y f (3,2) = 16. f (3,2) se muestra a continuación : + + + +Halla la suma de todos f (m, n) tal que f (m, n) ≤ 1015. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler281() debe devolver 1485776387445623. + testString: 'assert.strictEqual(euler281(), 1485776387445623, "euler281() should return 1485776387445623.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler281() { + // Good luck! + return true; +} + +euler281(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-282-the-ackermann-function.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-282-the-ackermann-function.spanish.md new file mode 100644 index 0000000000..ee835b715d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-282-the-ackermann-function.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4861000cf542c50ff99 +challengeType: 5 +title: 'Problem 282: The Ackermann function' +--- + +## Description +
+Para enteros no negativos m, n, la función de Ackermann A (m, n) se define como sigue: + + + +Para el ejemplo A (1, 0) = 2, A (2, 2) = 7 y A ( 3, 4) = 125. + + +Encuentra A (n, n) y da tu respuesta mod 148. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler282() debe devolver 1098988351. + testString: 'assert.strictEqual(euler282(), 1098988351, "euler282() should return 1098988351.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler282() { + // Good luck! + return true; +} + +euler282(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-283-integer-sided-triangles-for-which-the-area--perimeter-ratio-is-integral.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-283-integer-sided-triangles-for-which-the-area--perimeter-ratio-is-integral.spanish.md new file mode 100644 index 0000000000..210d53f2ae --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-283-integer-sided-triangles-for-which-the-area--perimeter-ratio-is-integral.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4881000cf542c50ff9a +challengeType: 5 +title: 'Problem 283: Integer sided triangles for which the area * perimeter ratio is integral' +--- + +## Description +
+Considera el triángulo con los lados 6, 8 y 10. Se puede ver que tanto el perímetro como el área son iguales a 24. +Entonces, la relación área / perímetro es igual a 1. +Considera también el triángulo con los lados 13, 14 y 15. El perímetro es igual a 42 mientras que el área es igual a 84. +Entonces, para este triángulo, la relación área / perímetro es igual a 2. + + +Halla la suma de los perímetros de todos los triángulos de lados enteros para los cuales el área / perímetro las razones son iguales a enteros positivos que no superan 1000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler283() debe devolver 28038042525570324. + testString: 'assert.strictEqual(euler283(), 28038042525570324, "euler283() should return 28038042525570324.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler283() { + // Good luck! + return true; +} + +euler283(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-284-steady-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-284-steady-squares.spanish.md new file mode 100644 index 0000000000..eccd52d46c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-284-steady-squares.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4891000cf542c50ff9b +challengeType: 5 +title: 'Problem 284: Steady Squares' +--- + +## Description +
+El número de 3 dígitos 376 en el sistema de numeración decimal es un ejemplo de números con la propiedad especial que su cuadrado termina con los mismos dígitos: 3762 = 141376. Llamemos a un número con esta propiedad un cuadrado estable. + +cuadrados fijos también se pueden observar en otros sistemas de numeración. En el sistema de numeración de base 14, el número de 3 dígitos c37 también es un cuadrado constante: c372 = aa0c37, y la suma de sus dígitos es c + 3 + 7 = 18 en el mismo sistema de numeración. Las letras a, b, cyd se usan para los 10, 11, 12 y 13 dígitos respectivamente, de una manera similar al sistema de numeración hexadecimal. + +Para 1 ≤ n ≤ 9, la suma de los dígitos de todos los cuadrados constantes de n dígitos en el sistema de numeración de base 14 es 2d8 (582 decimal). No se permiten cuadrados fijos con 0 iniciales. + +Encuentre la suma de los dígitos de todos los cuadrados constantes de n dígitos en el sistema de numeración de base 14 para +1 ≤ n ≤ 10000 (decimal) y dé su respuesta en el sistema de base 14 usando letras minúsculas donde sea necesario. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler284() debe devolver 5a411d7b. + testString: 'assert.strictEqual(euler284(), 5a411d7b, "euler284() should return 5a411d7b.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler284() { + // Good luck! + return true; +} + +euler284(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-285-pythagorean-odds.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-285-pythagorean-odds.spanish.md new file mode 100644 index 0000000000..165ce38a8d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-285-pythagorean-odds.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f48a1000cf542c50ff9c +challengeType: 5 +title: 'Problem 285: Pythagorean odds' +--- + +## Description +
+Albert elige un entero positivo k, luego dos números reales a, b se eligen aleatoriamente en el intervalo [0,1] con distribución uniforme. +La raíz cuadrada de la suma (k · a + 1) 2 + (k · b + 1) 2 se calcula y redondea al entero más cercano. Si el resultado es igual a k, él puntúa k puntos; De lo contrario no anota nada. + +Por ejemplo, si k = 6, a = 0.2 y b = 0.85, entonces (k · a + 1) 2 + (k · b + 1) 2 = 42.05. +La raíz cuadrada de 42.05 es 6.484 ... y cuando se redondea al entero más cercano, se convierte en 6. +Esto es igual a k, por lo que obtiene 6 puntos. + +Se puede mostrar que si juega 10 turnos con k = 1, k = 2, ..., k = 10, el valor esperado de su puntaje total, redondeado a cinco lugares decimales, es 10.20914. + +Si juega 105 turnos con k = 1, k = 2, k = 3, ..., k = 105, ¿cuál es el valor esperado de su puntaje total, redondeado a cinco lugares decimales? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler285() debe devolver 157055.80999. + testString: 'assert.strictEqual(euler285(), 157055.80999, "euler285() should return 157055.80999.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler285() { + // Good luck! + return true; +} + +euler285(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-286-scoring-probabilities.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-286-scoring-probabilities.spanish.md new file mode 100644 index 0000000000..690769e3b0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-286-scoring-probabilities.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f48a1000cf542c50ff9d +challengeType: 5 +title: 'Problem 286: Scoring probabilities' +--- + +## Description +
+Barbara es una matemática y una jugadora de baloncesto. Ha encontrado que la probabilidad de anotar un punto al disparar desde una distancia x es exactamente (1 - x / q), donde q es una constante real mayor que 50. + +Durante cada carrera de práctica, toma disparos desde distancias x = 1, x = 2, ..., x = 50 y, según sus registros, tiene exactamente un 2% de probabilidad de anotar un total de exactamente 20 puntos. + +Encuentra q y da tu respuesta redondeada a 10 decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler286() debe devolver 52.6494571953. + testString: 'assert.strictEqual(euler286(), 52.6494571953, "euler286() should return 52.6494571953.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler286() { + // Good luck! + return true; +} + +euler286(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.spanish.md new file mode 100644 index 0000000000..d1b167ce8c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-287-quadtree-encoding-a-simple-compression-algorithm.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f48b1000cf542c50ff9e +challengeType: 5 +title: 'Problem 287: Quadtree encoding (a simple compression algorithm)' +--- + +## Description +
+La codificación de quadtree nos permite describir una imagen en blanco y negro 2N × 2N como una secuencia de bits (0 y 1). Esas secuencias deben leerse de izquierda a derecha de la siguiente manera: +el primer bit se ocupa de la región completa 2N × 2N; +"0" denota una división: +la región actual 2n × 2n se divide en 4 subregiones de dimensión 2n-1 × 2n-1, +los siguientes bits contienen la descripción de la parte superior izquierda, superior derecha, inferior izquierda y Subregiones de abajo a la derecha - en ese orden; +"10" indica que la región actual contiene solo píxeles negros; +"11" indica que la región actual solo contiene píxeles blancos. Considere la siguiente imagen 4 × 4 (las marcas de color indican lugares donde puede ocurrir una división): + +Esta imagen se puede describir mediante varias secuencias, por ejemplo: +"0010101010010111110101010101010 ", de longitud 30, o +" 0100101111101110 ", de longitud 16, que es la secuencia mínima para esta imagen. + +Para un entero positivo N, defina DN como la imagen 2N × 2N con el siguiente esquema de coloración: +el píxel con coordenadas x = 0, y = 0 corresponde al píxel inferior izquierdo, +si (x - 2N-1) 2 + (y - 2N-1) 2 ≤ 22N-2, entonces el píxel es negro, +contrario el píxel es blanco. ¿Cuál es la longitud de la secuencia mínima que describe D24? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler287() debe devolver 313135496. + testString: 'assert.strictEqual(euler287(), 313135496, "euler287() should return 313135496.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler287() { + // Good luck! + return true; +} + +euler287(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.spanish.md new file mode 100644 index 0000000000..d8ced95a81 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-288-an-enormous-factorial.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f48d1000cf542c50ff9f +challengeType: 5 +title: 'Problem 288: An enormous factorial' +--- + +## Description +
+Para cualquier primo p, el número N (p, q) se define por +N (p, q) = ∑n = 0 a q Tn * pn con Tn generada por el siguiente generador de números aleatorios: + +S0 = 290797 +Sn +1 = Sn2 mod 50515093 +Tn = Sn mod p + + +Sea Nfac (p, q) el factorial de N (p, q). +Sea NF (p, q) el número de factores p en Nfac (p, q). + + +Se le ha dado que NF (3,10000) mod 320 = 624955285. + + +Encuentra NF (61,107) mod 6110 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler288() debe devolver 605857431263982000. + testString: 'assert.strictEqual(euler288(), 605857431263982000, "euler288() should return 605857431263982000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler288() { + // Good luck! + return true; +} + +euler288(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-289-eulerian-cycles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-289-eulerian-cycles.spanish.md new file mode 100644 index 0000000000..082ee7b58f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-289-eulerian-cycles.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f48d1000cf542c50ffa0 +challengeType: 5 +title: 'Problem 289: Eulerian Cycles' +--- + +## Description +
+Sea C (x, y) un círculo que pasa por los puntos (x, y), (x, y + 1), (x + 1, y) y (x + 1, y + 1). + +Para los enteros positivos m y n, sea E (m, n) una configuración que consiste en los círculos m · n: +{C (x, y): 0 ≤ x <m, 0 ≤ y <n, x y y son números enteros} + +Un ciclo euleriano en E (m, n) es un camino cerrado que pasa a través de cada arco exactamente una vez. +Muchos de estos caminos son posibles en E (m, n), pero solo nos interesan aquellos que no se cruzan solos: +Un camino que no se cruza solo se toca en los puntos de la red, pero nunca se cruza. + +La imagen de abajo muestra E (3,3) y un ejemplo de una ruta Euleriana sin cruce. + +Sea L (m, n) el número de caminos no cruzados eulerianos en E (m, n). +Por ejemplo, L (1,2) = 2, L (2,2) = 37 y L (3,3) = 104290. + +Encuentra L (6,10) mod 1010. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler289() debe devolver 6567944538. + testString: 'assert.strictEqual(euler289(), 6567944538, "euler289() should return 6567944538.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler289() { + // Good luck! + return true; +} + +euler289(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-29-distinct-powers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-29-distinct-powers.spanish.md new file mode 100644 index 0000000000..64665eca5f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-29-distinct-powers.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f3891000cf542c50fe9c +challengeType: 5 +title: 'Problem 29: Distinct powers' +--- + +## Description +
+Considere todas las combinaciones de números enteros de ab para 2 ≤ a ≤ 5 y 2 ≤ b ≤ 5: +22 = 4, 23 = 8, 24 = 16, 25 = 32 +32 = 9, 33 = 27, 34 = 81, 35 = 243 +42 = 16, 43 = 64, 44 = 256, 45 = 1024 +52 = 25, 53 = 125, 54 = 625, 55 = 3125 +Si se colocan en orden numérico, con cualquier repetición eliminada, obtenga la siguiente secuencia de 15 términos distintos: +4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125 +¿Cuántos términos distintos hay en la secuencia generada por ab para 2 ≤ a ≤ n y 2 ≤ b ≤ n? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: distinctPowers(15) debe devolver 177. + testString: 'assert.strictEqual(distinctPowers(15), 177, "distinctPowers(15) should return 177.");' + - text: distinctPowers(20) debe devolver 324. + testString: 'assert.strictEqual(distinctPowers(20), 324, "distinctPowers(20) should return 324.");' + - text: distinctPowers(25) debe devolver 519. + testString: 'assert.strictEqual(distinctPowers(25), 519, "distinctPowers(25) should return 519.");' + - text: distinctPowers(30) debe devolver 755. + testString: 'assert.strictEqual(distinctPowers(30), 755, "distinctPowers(30) should return 755.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function distinctPowers(n) { + // Good luck! + return n; +} + +distinctPowers(30); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const distinctPowers = (n) => { + let list = []; + for (let a=2; a<=n; a++) { + for (let b=2; b<=n; b++) { + let term = Math.pow(a, b); + if (list.indexOf(term)===-1) list.push(term); + } + } + return list.length; +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-290-digital-signature.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-290-digital-signature.spanish.md new file mode 100644 index 0000000000..2d963f27ed --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-290-digital-signature.spanish.md @@ -0,0 +1,56 @@ +--- +id: 5 +localeTitle: 5900f48f1000cf542c50ffa1 +challengeType: 5 +title: 'Problem 290: Digital Signature' +--- + +## Description +
+¿Cuántos enteros 0 ≤ n <1018 tienen la propiedad de que la suma de los dígitos de n es igual a la suma de los dígitos de 137n? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler290() debe devolver 20444710234716470. + testString: 'assert.strictEqual(euler290(), 20444710234716470, "euler290() should return 20444710234716470.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler290() { + // Good luck! + return true; +} + +euler290(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-291-panaitopol-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-291-panaitopol-primes.spanish.md new file mode 100644 index 0000000000..d301247f95 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-291-panaitopol-primes.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f48f1000cf542c50ffa2 +challengeType: 5 +title: 'Problem 291: Panaitopol Primes' +--- + +## Description +
+Un número primo p se llama un primo de Panaitopol si para algunos enterosx e y positivos. + + +Halla cuántos primos de Panaitopol son menores que 5 × 1015. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler291() debe devolver 4037526. + testString: 'assert.strictEqual(euler291(), 4037526, "euler291() should return 4037526.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler291() { + // Good luck! + return true; +} + +euler291(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.spanish.md new file mode 100644 index 0000000000..ad1a3bc07e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-292-pythagorean-polygons.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4911000cf542c50ffa3 +challengeType: 5 +title: 'Problem 292: Pythagorean Polygons' +--- + +## Description +
+Definiremos un polígono pitagórico como un polígono convexo con las siguientes propiedades: hay al menos tres vértices, +no hay tres vértices alineados, +cada vértice tiene coordenadas enteras, +cada borde tiene una longitud entera. Para un entero dado n , defina P (n) como el número de polígonos pitagóricos distintos para los cuales el perímetro es ≤ n. +polígonos pitagóricos deben considerarse distintos siempre que ninguno sea una traducción de otro. + +Se le da que P (4) = 1, P (30) = 3655 y P (60) = 891045. +Encuentre P (120). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler292() debe devolver 3600060866. + testString: 'assert.strictEqual(euler292(), 3600060866, "euler292() should return 3600060866.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler292() { + // Good luck! + return true; +} + +euler292(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.spanish.md new file mode 100644 index 0000000000..82a6de0158 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4931000cf542c50ffa4 +challengeType: 5 +title: 'Problem 293: Pseudo-Fortunate Numbers' +--- + +## Description +
+Un número entero positivo N se llamará admisible, si es una potencia de 2 o sus distintos factores primos son primos consecutivos. +Los doce primeros números admisibles son 2,4,6,8,12,16,18,24,30,32,36,48. + + +Si N es admisible, el entero más pequeño M> 1 tal que N + M es primo, se llamará el número pseudo-Afortunado para N. + + +Por ejemplo, N = 630 es admisible ya que es par y su los factores primos distintos son los números primos consecutivos 2,3,5 y 7. +El siguiente número primo después de 631 es 641; por lo tanto, el número pseudo-afortunado para 630 es M = 11. +También se puede ver que el número pseudo-afortunado para 16 es 3. + + +Encuentre la suma de todos los números distintos de pseudo-afortunados para los números admisibles N menos que 109. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler293() debe devolver 2209. + testString: 'assert.strictEqual(euler293(), 2209, "euler293() should return 2209.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler293() { + // Good luck! + return true; +} + +euler293(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.spanish.md new file mode 100644 index 0000000000..9c24671833 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-294-sum-of-digits---experience-23.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f4931000cf542c50ffa5 +challengeType: 5 +title: 'Problem 294: Sum of digits - experience #23' +--- + +## Description +
+Para un entero k positivo, defina d (k) como la suma de los dígitos de k en su representación decimal usual. +Así, d (42) = 4 + 2 = 6. + + +Para un entero positivo n, defina S (n) como el número de enteros positivos k <10n con las siguientes propiedades: +k es divisible por 23 y +d (k) = 23. + +Se le da que S (9) = 263626 y S (42) = 6377168878570056. + + +Encuentre S (1112) y dé su respuesta mod 109. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler294() debe devolver 789184709. + testString: 'assert.strictEqual(euler294(), 789184709, "euler294() should return 789184709.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler294() { + // Good luck! + return true; +} + +euler294(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-295-lenticular-holes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-295-lenticular-holes.spanish.md new file mode 100644 index 0000000000..46e32d0d23 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-295-lenticular-holes.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f4931000cf542c50ffa6 +challengeType: 5 +title: 'Problem 295: Lenticular holes' +--- + +## Description +
+Llamamos al área convexa encerrada por dos círculos un agujero lenticular si: +Los centros de ambos círculos están en puntos de celosía. +Los dos círculos se intersecan en dos puntos de celosía distintos. +El interior del área convexa encerrada por ambos círculos no contiene ningún punto de celosía. + +Considera los círculos: +C0: x2 + y2 = 25 +C1: (x + 4) 2+ (y-4) 2 = 1 +C2: (x-12) 2+ (y-4) 2 = 65 + + +Los círculos C0, C1 y C2 se dibujan en la siguiente imagen. + + +C0 y C1 forman un orificio lenticular, así como C0 y C2. + +Llamamos a un par ordenado de números reales positivos (r1, r2) un par lenticular si existen dos círculos con radios r1 y r2 que forman un agujero lenticular. +Podemos verificar que (1, 5) y (5, √65) son los pares lenticulares del ejemplo anterior. + +Sea L (N) el número de pares lenticulares distintos (r1, r2) para los cuales 0 <r1 ≤ r2 ≤ N. +Podemos verificar que L (10) = 30 y L (100) = 3442. + +Encuentra L (100 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler295() debe devolver 4884650818. + testString: 'assert.strictEqual(euler295(), 4884650818, "euler295() should return 4884650818.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler295() { + // Good luck! + return true; +} + +euler295(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.spanish.md new file mode 100644 index 0000000000..2efc95be19 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4941000cf542c50ffa7 +challengeType: 5 +title: 'Problem 296: Angular Bisector and Tangent' +--- + +## Description +
+Dado es un triángulo de lado entero ABC con BC ≤ AC ≤ AB.k es la bisectriz angular del ángulo ACB.m es la tangente en C al círculo circunscrito de ABC.n es una línea paralela de m a B. +La intersección de n y k se llama E. + + + +¿Cuántos triángulos ABC con un perímetro que no exceda de 100 000 existen de modo que BE tenga una longitud integral? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler296() debe devolver 1137208419. + testString: 'assert.strictEqual(euler296(), 1137208419, "euler296() should return 1137208419.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler296() { + // Good luck! + return true; +} + +euler296(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.spanish.md new file mode 100644 index 0000000000..b9d48eff49 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4951000cf542c50ffa8 +challengeType: 5 +title: 'Problem 297: Zeckendorf Representation' +--- + +## Description +
+Cada nuevo término en la secuencia de Fibonacci se genera al agregar los dos términos anteriores. +A partir de 1 y 2, los primeros 10 términos serán: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. + +Cada entero positivo puede escribirse de forma única como una suma de términos no consecutivos de La secuencia de Fibonacci. Por ejemplo, 100 = 3 + 8 + 89. +Tal suma se llama la representación de Zeckendorf del número. + +Para cualquier entero n> 0, sea z (n) el número de términos en la representación de Zeckendorf de n. +Así, z (5) = 1, z (14) = 2, z (100) = 3, etc. +También, para 0 0 +Encuentra ∑ z (n) para 0 0
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler297() debe devolver 2252639041804718000. + testString: 'assert.strictEqual(euler297(), 2252639041804718000, "euler297() should return 2252639041804718000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler297() { + // Good luck! + return true; +} + +euler297(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-298-selective-amnesia.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-298-selective-amnesia.spanish.md new file mode 100644 index 0000000000..6d68c36f45 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-298-selective-amnesia.spanish.md @@ -0,0 +1,130 @@ +--- +id: 5 +localeTitle: 5900f4971000cf542c50ffa9 +challengeType: 5 +title: 'Problem 298: Selective Amnesia' +--- + +## Description +
+Larry y Robin juegan un juego de memoria que incluye una secuencia de números aleatorios entre 1 y 10, ambos incluidos, que se repiten uno por uno. Cada jugador puede recordar hasta 5 números anteriores. Cuando el número al que se llama está en la memoria de un jugador, ese jugador recibe un punto. Si no es así, el jugador agrega el número llamado a su memoria, eliminando otro número si su memoria está llena. + +Ambos jugadores comienzan con recuerdos vacíos. Ambos jugadores siempre agregan nuevos números perdidos a su memoria, pero utilizan una estrategia diferente para decidir qué número eliminar: +La estrategia de Larry es eliminar el número que no se ha llamado en el tiempo más largo. +La estrategia de Robin es eliminar el número que ha estado en la memoria por más tiempo. + +Ejemplo juego: Girar +CalledNumber +Larry'smemory +Larry'sscore +Robin'smemory +Robin'sscore +1 +1 +1 +0 +1 +0 +2 +2 +1,2 +0 +1,2 +0 +3 +4 +1,2,4 +0 +1,2,4 +0 +4 +6 +1,2,4,6 +0 +1,2,4,6 +0 +5 +1 +1,2,4,6 +1 +1,2,4,6 +1 +6 +8 +1,2,4,6,8 +1 +1,2,4,6,8 +1 +7 +10 +1,4,6,8,10 +1 +2,4,6,8,10 +1 +8 +2 +1,2,6,8,10 +1 +2,4,6,8 , 10 +2 +9 +4 +1,2,4,8,10 +1 +2,4,6,8,10 +3 +10 +1 +1,2,4,8,10 +2 +1 , 4,6,8,10 +3 + + +Denotando la puntuación de Larry por L y la puntuación de Robin por R, ¿cuál es el valor esperado de | LR | después de 50 vueltas? Da tu respuesta redondeada a ocho decimales usando el formato x.xxxxxxxx. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler298() debe devolver 1.76882294. + testString: 'assert.strictEqual(euler298(), 1.76882294, "euler298() should return 1.76882294.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler298() { + // Good luck! + return true; +} + +euler298(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-299-three-similar-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-299-three-similar-triangles.spanish.md new file mode 100644 index 0000000000..c07250be3b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-299-three-similar-triangles.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4971000cf542c50ffaa +challengeType: 5 +title: 'Problem 299: Three similar triangles' +--- + +## Description +
+Se seleccionan cuatro puntos con coordenadas enteras: A (a, 0), B (b, 0), C (0, c) y D (0, d), +con 0 <a <b y 0 <c <d . +punto P, también con coordenadas enteras, se elige en la línea AC para que los tres triángulos ABP, CDP y BDP sean todos similares. + +Es fácil probar que los tres triángulos pueden ser similares, solo si a = c. + +Entonces, dado que a = c, estamos buscando tripletes (a, b, d) de manera que al menos un punto P (con coordenadas enteras) exista en AC, haciendo que los tres triángulos ABP, CDP y BDP sean todos similares. + +Por ejemplo, si (a, b, d) = (2,3,4), se puede verificar fácilmente que el punto P (1,1) satisface la condición anterior. +Tenga en cuenta que los tripletes (2,3,4) y (2,4,3) se consideran distintos, aunque el punto P (1,1) es común para ambos. + +Si b + d <100, hay 92 tripletes distintos (a, b, d) de manera que el punto P existe. +Si b + d <100 000, hay 320471 tripletes distintos (a, b, d) de manera que el punto P existe. +Si b + d <100 000 000, ¿cuántos tripletes distintos (a, b, d) hay de tal manera que exista el punto P? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler299() debe devolver 549936643. + testString: 'assert.strictEqual(euler299(), 549936643, "euler299() should return 549936643.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler299() { + // Good luck! + return true; +} + +euler299(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-3-largest-prime-factor.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-3-largest-prime-factor.spanish.md new file mode 100644 index 0000000000..8bfd456ae1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-3-largest-prime-factor.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f36f1000cf542c50fe82 +challengeType: 5 +title: 'Problem 3: Largest prime factor' +--- + +## Description +
+Los factores primos de 13195 son 5, 7, 13 y 29. +¿Cuál es el factor primo más grande de un number dado? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: largestPrimeFactor(2) debe devolver 2. + testString: 'assert.strictEqual(largestPrimeFactor(2), 2, "largestPrimeFactor(2) should return 2.");' + - text: largestPrimeFactor(3) debe devolver 3. + testString: 'assert.strictEqual(largestPrimeFactor(3), 3, "largestPrimeFactor(3) should return 3.");' + - text: largestPrimeFactor(5) debe devolver 5. + testString: 'assert.strictEqual(largestPrimeFactor(5), 5, "largestPrimeFactor(5) should return 5.");' + - text: largestPrimeFactor(7) debe devolver 7. + testString: 'assert.strictEqual(largestPrimeFactor(7), 7, "largestPrimeFactor(7) should return 7.");' + - text: largestPrimeFactor(13195) debe devolver 29. + testString: 'assert.strictEqual(largestPrimeFactor(13195), 29, "largestPrimeFactor(13195) should return 29.");' + - text: largestPrimeFactor(600851475143) debe devolver 6857. + testString: 'assert.strictEqual(largestPrimeFactor(600851475143), 6857, "largestPrimeFactor(600851475143) should return 6857.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function largestPrimeFactor(number) { + // Good luck! + return true; +} + +largestPrimeFactor(13195); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const largestPrimeFactor = (number)=>{ + let largestFactor = number; + for(let i = 2;i diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-30-digit-n-powers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-30-digit-n-powers.spanish.md new file mode 100644 index 0000000000..57a4a1822f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-30-digit-n-powers.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f38a1000cf542c50fe9d +challengeType: 5 +title: 'Problem 30: Digit n powers' +--- + +## Description +
+Sorprendentemente, solo hay tres números que se pueden escribir como la suma de las cuartas potencias de sus dígitos: +1634 = 1 4 + 6 4 + 3 4 + 4 4 +8208 = 8 4 + 2 4 + 0 4 + 8 4 +9474 = 9 4 + 4 4 + 7 4 + 4 4 +Como 1 = 1 4 no es una suma que no está incluida. +La suma de estos números es 1634 + 8208 + 9474 = 19316. +Encuentre la suma de todos los números que se pueden escribir como la suma de n potencias de sus dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: digitnPowers(2) debe devolver 0. + testString: 'assert(digitnPowers(2) == 0, "digitnPowers(2) should return 0.");' + - text: digitnPowers(3) debe devolver 1301. + testString: 'assert(digitnPowers(3) == 1301, "digitnPowers(3) should return 1301.");' + - text: digitnPowers(4) debe devolver 19316. + testString: 'assert(digitnPowers(4) == 19316, "digitnPowers(4) should return 19316.");' + - text: digitnPowers(5) debe devolver 443839. + testString: 'assert(digitnPowers(5) == 443839, "digitnPowers(5) should return 443839.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function digitnPowers(n) { + // Good luck! + return n; +} + +digitnPowers(5); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-300-protein-folding.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-300-protein-folding.spanish.md new file mode 100644 index 0000000000..f7b4630328 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-300-protein-folding.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f49a1000cf542c50ffac +challengeType: 5 +title: 'Problem 300: Protein folding' +--- + +## Description +
+En una forma muy simplificada, podemos considerar las proteínas como cadenas que consisten en elementos hidrófobos (H) y polares (P), por ejemplo, HHPPHHHPHPHPH. +Para este problema, la orientación de una proteína es importante; Por ejemplo, HPP se considera distinto de PPH. Por lo tanto, hay 2n proteínas distintas que consisten en n elementos. + +Cuando uno encuentra estas cadenas en la naturaleza, siempre se pliegan de tal manera que el número de puntos de contacto de HH sea lo más grande posible, ya que esto es energéticamente ventajoso. +Como resultado, los elementos H tienden a acumularse en la parte interior, con los elementos P en el exterior. +Las proteínas naturales están plegadas en tres dimensiones, por supuesto, pero solo consideraremos el plegamiento de proteínas en dos dimensiones. + +La siguiente figura muestra dos formas posibles de plegar nuestro ejemplo de proteína (los puntos de contacto HH se muestran con puntos rojos). + + + +El plegado de la izquierda tiene solo seis puntos de contacto HH, por lo que nunca ocurriría de forma natural. +Por otro lado, el plegado a la derecha tiene nueve puntos de contacto HH, que es óptimo para esta cadena. + +Suponiendo que los elementos H y P tienen la misma probabilidad de ocurrir en cualquier posición a lo largo de la cadena, el número promedio de puntos de contacto HH en un plegamiento óptimo de una cadena de proteína aleatoria de longitud 8 resulta ser 850/28 = 3.3203125. + +¿Cuál es el número promedio de puntos de contacto HH en un plegamiento óptimo de una cadena de proteínas aleatoria de longitud 15? +Da tu respuesta utilizando tantos decimales como sea necesario para obtener un resultado exacto. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler300() debe devolver 8.0540771484375. + testString: 'assert.strictEqual(euler300(), 8.0540771484375, "euler300() should return 8.0540771484375.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler300() { + // Good luck! + return true; +} + +euler300(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-301-nim.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-301-nim.spanish.md new file mode 100644 index 0000000000..9783e3714d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-301-nim.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4991000cf542c50ffab +challengeType: 5 +title: 'Problem 301: Nim' +--- + +## Description +
+Nim es un juego que se juega con montones de piedras, donde dos jugadores lo toman a su vez para eliminar cualquier cantidad de piedras de cualquier montón hasta que no queden piedras. + +Consideraremos la versión de juego normal de tres pilas de Nim, que funciona de la siguiente manera: +- Al comienzo del juego hay tres montones de piedras. +- En su turno, el jugador elimina cualquier número positivo de piedras de un solo montón. +- El primer jugador incapaz de moverse (porque no quedan piedras) pierde. + +Si (n1, n2, n3) indica una posición Nim que consiste en montones de tamaño n1, n2 y n3, entonces hay una función simple X (n1, n2, n3) - que puede buscar o intentar deducir por sí mismo - eso devuelve: +cero si, con una estrategia perfecta, el jugador que está a punto de moverse eventualmente perderá; o +no cero si, con una estrategia perfecta, el jugador que está a punto de moverse eventualmente ganará. Por ejemplo X (1,2,3) = 0 porque, no importa lo que haga el jugador actual, su oponente puede responder con un movimiento que deja dos montones de igual tamaño, en cuyo punto cada movimiento del jugador actual puede ser reflejado por su oponente hasta que no queden piedras; por lo que el jugador actual pierde. Para ilustrar: +- el jugador actual se mueve a (1,2,1) +- el oponente se mueve a (1,0,1) +- el jugador actual se mueve a (0,0,1) +- el oponente se mueve a (0,0) , 0), y así gana. + +¿Para cuántos enteros positivos n ≤ 230 hace X (n, 2n, 3n) = 0? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler301() debe devolver 2178309. + testString: 'assert.strictEqual(euler301(), 2178309, "euler301() should return 2178309.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler301() { + // Good luck! + return true; +} + +euler301(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.spanish.md new file mode 100644 index 0000000000..7e34d35333 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-302-strong-achilles-numbers.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f49b1000cf542c50ffad +challengeType: 5 +title: 'Problem 302: Strong Achilles Numbers' +--- + +## Description +
+Un entero positivo n es poderoso si p2 es un divisor de n para cada factor primo p en n. + + +Un entero positivo n es una potencia perfecta si n puede expresarse como una potencia de otro entero positivo. + + +Un entero positivo n es un número de Aquiles si n es poderoso pero no es un poder perfecto. Por ejemplo, 864 y 1800 son números de Aquiles: 864 = 25 · 33 y 1800 = 23 · 32 · 52. + + +Llamaremos a un entero positivo S un número de Aquiles fuerte si tanto S como φ (S) son números de Aquiles.1 +Por ejemplo, 864 es un número de Aquiles fuerte: φ (864) = 288 = 25 · 32. Sin embargo, 1800 no es un número de Aquiles fuerte porque: φ (1800) = 480 = 25 · 31 · 51. + +Hay 7 números de Aquiles fuertes por debajo de 104 y 656 por debajo de 108. + + +¿Cuántos números de Aquiles fuertes hay por debajo de 1018? + + +1 φ denota la función totient de Euler. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler302() debe devolver 1170060. + testString: 'assert.strictEqual(euler302(), 1170060, "euler302() should return 1170060.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler302() { + // Good luck! + return true; +} + +euler302(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.spanish.md new file mode 100644 index 0000000000..02f0941d42 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-303-multiples-with-small-digits.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f49b1000cf542c50ffae +challengeType: 5 +title: 'Problem 303: Multiples with small digits' +--- + +## Description +
+Para un entero positivo n, defina f (n) como el mínimo positivo múltiplo de n que, escrito en base 10, usa solo dígitos ≤ 2. +Por lo tanto, f (2) = 2, f (3) = 12, f ( 7) = 21, f (42) = 210, f (89) = 1121222. +también,. + +Buscar. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler303() debe devolver 1111981904675169. + testString: 'assert.strictEqual(euler303(), 1111981904675169, "euler303() should return 1111981904675169.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler303() { + // Good luck! + return true; +} + +euler303(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-304-primonacci.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-304-primonacci.spanish.md new file mode 100644 index 0000000000..ae5831ad7d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-304-primonacci.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f49d1000cf542c50ffaf +challengeType: 5 +title: 'Problem 304: Primonacci' +--- + +## Description +
+Para cualquier entero positivo n, la función next_prime (n) devuelve el p primo más pequeño tal que p> n. + + +La secuencia a (n) se define por: +a (1) = next_prime (1014) y a (n) = next_prime (a (n-1)) para n> 1. + + +La secuencia de fibonacci f (n) se define por: +f (0) = 0, f (1) = 1 y f (n) = f (n-1) + f (n-2) para n> 1. + + +La secuencia b (n) se define como f (a (n)). + + +Encuentra ∑b (n) para 1≤n≤100 000. +Da tu respuesta mod 1234567891011. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler304() debe devolver 283988410192. + testString: 'assert.strictEqual(euler304(), 283988410192, "euler304() should return 283988410192.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler304() { + // Good luck! + return true; +} + +euler304(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-305-reflexive-position.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-305-reflexive-position.spanish.md new file mode 100644 index 0000000000..4cf1278de6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-305-reflexive-position.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f49d1000cf542c50ffb0 +challengeType: 5 +title: 'Problem 305: Reflexive Position' +--- + +## Description +
+Llamemos a S la cadena (infinita) que se forma al concatenar los enteros positivos consecutivos (comenzando desde 1) escritos en la base 10. +Por lo tanto, S = 1234567891011121314151617181920212223242 ... + + +Es fácil ver que cualquier número se mostrará un número infinito de veces en S. + + +Llamemos a f (n) la posición de inicio de la enésima aparición de n en S. +Por ejemplo, f (1) = 1, f (5) = 81, f ( 12) = 271 yf (7780) = 111111365. + + +Encuentra ∑f (3k) para 1≤k≤13. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler305() debe devolver 18174995535140. + testString: 'assert.strictEqual(euler305(), 18174995535140, "euler305() should return 18174995535140.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler305() { + // Good luck! + return true; +} + +euler305(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-306-paper-strip-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-306-paper-strip-game.spanish.md new file mode 100644 index 0000000000..393c3e627f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-306-paper-strip-game.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f49f1000cf542c50ffb1 +challengeType: 5 +title: 'Problem 306: Paper-strip Game' +--- + +## Description +
+El siguiente juego es un ejemplo clásico de Combinatorial Game Theory: + +Dos jugadores comienzan con una tira de n cuadrados blancos y toman turnos alternativos. +En cada turno, un jugador elige dos cuadrados blancos contiguos y los pinta de negro. +El primer jugador que no puede hacer un movimiento pierde. + +Si n = 1, no hay movimientos válidos, por lo que el primer jugador pierde automáticamente. +Si n = 2, solo hay un movimiento válido, después del cual el segundo jugador pierde. +Si n = 3, hay dos movimientos válidos, pero ambos dejan una situación en la que el segundo jugador pierde. +Si n = 4, hay tres movimientos válidos para el primer jugador; Ella puede ganar el juego pintando los dos cuadrados del medio. +Si n = 5, hay cuatro movimientos válidos para el primer jugador (se muestra a continuación en rojo); pero no importa lo que haga, el segundo jugador (azul) gana. + + + +Entonces, para 1 ≤ n ≤ 5, hay 3 valores de n para los cuales el primer jugador puede forzar una victoria. +De manera similar, para 1 ≤ n ≤ 50, hay 40 valores de n para los cuales el primer jugador puede forzar una victoria. + +Para 1 ≤ n ≤ 1 000 000, ¿cuántos valores de n hay para los cuales el primer jugador puede forzar una victoria? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler306() debe devolver 852938. + testString: 'assert.strictEqual(euler306(), 852938, "euler306() should return 852938.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler306() { + // Good luck! + return true; +} + +euler306(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-307-chip-defects.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-307-chip-defects.spanish.md new file mode 100644 index 0000000000..d16114f29d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-307-chip-defects.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4a01000cf542c50ffb2 +challengeType: 5 +title: 'Problem 307: Chip Defects' +--- + +## Description +
+k defectos se distribuyen aleatoriamente entre n chips de circuitos integrados producidos por una fábrica (cualquier número de defectos se puede encontrar en un chip y cada defecto es independiente de los otros defectos). + + +Sea p (k, n) la probabilidad de que haya un chip con al menos 3 defectos. +Por ejemplo, p (3,7) ≈ 0.0204081633. + + +Encuentre p (20 000, 1 000 000) y dé su respuesta redondeada a 10 lugares decimales en la forma 0.abcdefghij +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler307() debe devolver 0.7311720251. + testString: 'assert.strictEqual(euler307(), 0.7311720251, "euler307() should return 0.7311720251.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler307() { + // Good luck! + return true; +} + +euler307(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.spanish.md new file mode 100644 index 0000000000..de7ae4a679 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.spanish.md @@ -0,0 +1,94 @@ +--- +id: 5 +localeTitle: 5900f4a11000cf542c50ffb3 +challengeType: 5 +title: 'Problem 308: An amazing Prime-generating Automaton' +--- + +## Description +
+Un programa escrito en el lenguaje de programación Fractran consiste en una lista de fracciones. + +El estado interno de la máquina virtual de Fractran es un entero positivo, que inicialmente se establece en un valor semilla. Cada iteración de un programa Fractran multiplica el número entero de estado por la primera fracción en la lista que lo dejará como un número entero. + +Por ejemplo, uno de los programas de Fractran que John Horton Conway escribió para la generación principal consiste en las siguientes 14 fracciones: 1791 +, +7885 +, +1951 +, +2338 +, +2933 +, +7729 +, +9523 +, +7719 +, +117 +, +1113 +, +1311 +, +152 +, +17 +, +551 +. +Comenzando con el entero de la semilla 2, las iteraciones sucesivas del programa producen la secuencia: +15, 825, 725, 1925, 2275, 425, ..., 68, 4, 30, ..., 136, 8, 60, ..., 544, 32, 240, ... + +Las potencias de 2 que aparecen en esta secuencia son 22, 23, 25, ... +Se puede mostrar que todas las potencias de 2 en esta secuencia tienen primos ¡Los exponentes y que todos los primos aparecen como exponentes de potencias de 2, en el orden correcto! + +Si alguien usa el programa Fractran anterior para resolver el Problema 7 del Proyecto Euler (encuentra el primer número 10001), ¿cuántas iteraciones se necesitarían hasta que el programa produzca el primer número 210001? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler308() debe devolver 1539669807660924. + testString: 'assert.strictEqual(euler308(), 1539669807660924, "euler308() should return 1539669807660924.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler308() { + // Good luck! + return true; +} + +euler308(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-309-integer-ladders.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-309-integer-ladders.spanish.md new file mode 100644 index 0000000000..2f56ee8619 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-309-integer-ladders.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4a11000cf542c50ffb4 +challengeType: 5 +title: 'Problem 309: Integer Ladders' +--- + +## Description +
+En el problema clásico de "Escaleras que se cruzan", se nos da la longitud xey de dos escaleras que descansan en las paredes opuestas de una calle estrecha y nivelada. También se nos da la altura h sobre la calle donde se cruzan las dos escaleras y se nos pide que encontremos el ancho de la calle (w). + + + +En este caso, solo nos interesan las instancias en las que las cuatro variables son enteros positivos. +Por ejemplo, si x = 70, y = 119 y h = 30, podemos calcular que w = 56. + +De hecho, para valores enteros x, y, h y 0 <x <y <200, solo hay cinco tripletes (x, y, h) que producen soluciones enteras para w: +(70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) y (119 , 175, 40). + +Para los valores enteros x, y, h y 0 <x <y <1 000 000, ¿cuántos tripletes (x, y, h) producen soluciones enteras para w? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler309() debe devolver 210139. + testString: 'assert.strictEqual(euler309(), 210139, "euler309() should return 210139.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler309() { + // Good luck! + return true; +} + +euler309(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-31-coin-sums.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-31-coin-sums.spanish.md new file mode 100644 index 0000000000..1183aca57a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-31-coin-sums.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f38b1000cf542c50fe9e +challengeType: 5 +title: 'Problem 31: Coin sums' +--- + +## Description +
+En Inglaterra, la moneda se compone de libras, £ y peniques, p, y hay ocho monedas en circulación general: +1p, 2p, 5p, 10p, 20p, 50p, £ 1 (100p) y £ 2 (200p ). +Es posible hacer £ 2 de la siguiente manera: +1 × £ 1 + 1 × 50p + 2 × 20p + 1 × 5p + 1 × 2p + 3 × 1p +¿De cuántas maneras diferentes se pueden hacer £ (n) utilizando cualquier cantidad de monedas? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: coinSums(50) debe devolver 451. + testString: 'assert(coinSums(50) == 451, "coinSums(50) should return 451.");' + - text: coinSums(100) debe devolver 4563. + testString: 'assert(coinSums(100) == 4563, "coinSums(100) should return 4563.");' + - text: coinSums(150) debe devolver 21873. + testString: 'assert(coinSums(150) == 21873, "coinSums(150) should return 21873.");' + - text: coinSums(200) debe devolver 73682. + testString: 'assert(coinSums(200) == 73682, "coinSums(200) should return 73682.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function coinSums(n) { + // Good luck! + return n; +} + +coinSums(200); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const coinSums = (n) => { + const getWays = (n, m=8, c=[1, 2, 5, 10, 20, 50, 100, 200]) => { + if (n === 0) return 1; + if (m === 0 || n < 0) return 0; + return getWays(n - c[m - 1], m, c) + getWays(n, m - 1, c); + }; + return getWays(n); +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-310-nim-square.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-310-nim-square.spanish.md new file mode 100644 index 0000000000..8427a19544 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-310-nim-square.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4a21000cf542c50ffb5 +challengeType: 5 +title: 'Problem 310: Nim Square' +--- + +## Description +
+Alice y Bob juegan el juego Nim Square. +Nim Square es como el juego normal de tres pilas de Nim, pero los jugadores solo pueden eliminar un número cuadrado de piedras de una pila. +El número de piedras en los tres montones está representado por el triple ordenado (a, b, c). +Si 0≤a≤b≤c≤29, entonces el número de posiciones perdedoras para el siguiente jugador es 1160. + + +Encuentra el número de posiciones perdedoras para el siguiente jugador si 0≤a≤b≤c≤100 000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler310() debe devolver 2586528661783. + testString: 'assert.strictEqual(euler310(), 2586528661783, "euler310() should return 2586528661783.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler310() { + // Good luck! + return true; +} + +euler310(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.spanish.md new file mode 100644 index 0000000000..96080b332e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-311-biclinic-integral-quadrilaterals.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4a31000cf542c50ffb6 +challengeType: 5 +title: 'Problem 311: Biclinic Integral Quadrilaterals' +--- + +## Description +
+ABCD es un cuadrilátero convexo de lados enteros con 1 ≤ AB <BC <CD <AD. +BD tiene longitud entera. O es el punto medio de BD. AO tiene longitud entera. +Llamaremos a ABCD cuadrilátero integral biclínico si AO = CO ≤ BO = DO. + +Por ejemplo, el siguiente cuadrilátero es un cuadrilátero integral biclínico: +AB = 19, BC = 29, CD = 37, AD = 43, BD = 48 y AO = CO = 23. + + + + +Sea B (N ) sea el número de cuadriláteros integrales biclínicos distintos ABCD que satisfacen AB2 + BC2 + CD2 + AD2 ≤ N. +Podemos verificar que B (10 000) = 49 y B (1 000 000) = 38239. + + +Encuentre B ( 10 000 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler311() debe devolver 2466018557. + testString: 'assert.strictEqual(euler311(), 2466018557, "euler311() should return 2466018557.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler311() { + // Good luck! + return true; +} + +euler311(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.spanish.md new file mode 100644 index 0000000000..2517e4e44d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-312-cyclic-paths-on-sierpiski-graphs.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4a51000cf542c50ffb7 +challengeType: 5 +title: 'Problem 312: Cyclic paths on Sierpiński graphs' +--- + +## Description +
+- Un gráfico de Sierpiński de orden-1 (S1) es un triángulo equilátero. +: Sn + 1 se obtiene de Sn al colocar tres copias de Sn para que cada par de copias tenga una esquina común. + + + + +Sea C (n) el número de ciclos que pasan exactamente una vez a través de todos los vértices de Sn. +Por ejemplo, C (3) = 8 porque se pueden dibujar ocho de estos ciclos en S3, como se muestra a continuación: + + + + +También se puede verificar que: +C (1) = C (2) = 1 +C (5) = 71328803586048 +C (10 000) mod 108 = 37652224 +C (10 000) mod 138 = 617720485 + +Encuentre C (C (C (10 000))) mod 138. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler312() debe devolver 324681947. + testString: 'assert.strictEqual(euler312(), 324681947, "euler312() should return 324681947.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler312() { + // Good luck! + return true; +} + +euler312(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-313-sliding-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-313-sliding-game.spanish.md new file mode 100644 index 0000000000..70b2ae8e61 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-313-sliding-game.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4a61000cf542c50ffb8 +challengeType: 5 +title: 'Problem 313: Sliding game' +--- + +## Description +
+En un juego deslizante, un contador puede deslizarse horizontal o verticalmente en un espacio vacío. El objetivo del juego es mover el contador rojo de la esquina superior izquierda de una cuadrícula a la esquina inferior derecha; El espacio siempre comienza en la esquina inferior derecha. Por ejemplo, la siguiente secuencia de imágenes muestra cómo se puede completar el juego en cinco movimientos en una cuadrícula de 2 por 2. + + + +Sea S (m, n) el número mínimo de movimientos para completar el juego en una cuadrícula de m por n. Por ejemplo, se puede verificar que S (5,4) = 25. + + + +Hay exactamente 5482 cuadrículas para las cuales S (m, n) = p2, donde p <100 es primo. + +¿Cuántas cuadrículas hace S (m, n) = p2, donde p <106 es primo? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler313() debe devolver 2057774861813004. + testString: 'assert.strictEqual(euler313(), 2057774861813004, "euler313() should return 2057774861813004.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler313() { + // Good luck! + return true; +} + +euler313(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.spanish.md new file mode 100644 index 0000000000..a0aa634245 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-314-the-mouse-on-the-moon.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f4a71000cf542c50ffb9 +challengeType: 5 +title: 'Problem 314: The Mouse on the Moon' +--- + +## Description +
+Se ha abierto la luna, y la tierra se puede obtener gratis, pero hay una captura. Tienes que construir un muro alrededor de la tierra que cuidas, y construir un muro en la luna es costoso. A cada país se le ha asignado un área de 500 m por 500 m, pero solo poseerá esa área en la que se encierran. Se colocaron 251001 postes en una cuadrícula rectangular con un espacio de 1 metro. El muro debe ser una serie cerrada de líneas rectas, cada línea que se extiende de una publicación a otra. + + +Los países más grandes, por supuesto, han construido un muro de 2000 m que abarca toda el área de 250 000 m2. El Ducado de Grand Fenwick tiene un presupuesto más ajustado y le ha pedido a usted (su Programador Real) que calcule qué forma obtendría la mejor relación máxima de área cerrada / pared. + + +Has hecho algunos cálculos preliminares en una hoja de papel. +Para una pared de 2000 metros que encierra el área de 250 000 m2, la relación +área cerrada / longitud de pared es de 125. +Aunque no está permitido, pero para tener una idea si es mejor: si coloca un círculo dentro del área cuadrada tocando los cuatro lados, el área será igual a π * 2502 m2 y el perímetro será π * 500 m, por lo que la relación de área encerrada / pared también será 125. + + +Sin embargo, si se corta del área Cuadrados cuatro triángulos con lados 75 m, 75 my 75√2 ​​m, el área total se convierte en 238750 m2 y el perímetro se convierte en 1400 + 300√2 m. Por lo tanto, esto da una relación de área cerrada / pared de 130.87, que es significativamente mejor. + + + +Encuentre la relación máxima de área encerrada / longitud de pared. +Dé su respuesta redondeada a 8 lugares detrás del punto decimal en el formulario abc.defghijk. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler314() debe devolver 132.52756426. + testString: 'assert.strictEqual(euler314(), 132.52756426, "euler314() should return 132.52756426.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler314() { + // Good luck! + return true; +} + +euler314(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-315-digital-root-clocks.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-315-digital-root-clocks.spanish.md new file mode 100644 index 0000000000..1122f312f0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-315-digital-root-clocks.spanish.md @@ -0,0 +1,102 @@ +--- +id: 5 +localeTitle: 5900f4a71000cf542c50ffba +challengeType: 5 +title: 'Problem 315: Digital root clocks' +--- + +## Description +
+Sam y Max se les pide que transformen dos relojes digitales en dos relojes de "raíz digital". +Un reloj de raíz digital es un reloj digital que calcula las raíces digitales paso a paso. + +Cuando un reloj recibe un número, lo mostrará y luego iniciará el cálculo, mostrando todos los valores intermedios hasta que llegue al resultado. +Por ejemplo, si el reloj se alimenta con el número 137, mostrará: "137" → "11" → "2" y luego se apagará, esperando el próximo número. + +Cada número digital consta de algunos segmentos luminosos: tres horizontales (superior, central, inferior) y cuatro verticales (superior izquierda, superior derecha, inferior izquierda, inferior derecha). +número "1" está hecho de vertical arriba a la derecha y abajo a la derecha, el número "4" está formado por medio horizontal y vertical arriba a la izquierda, arriba a la derecha y abajo a la derecha. El número "8" los enciende a todos. + +Los relojes consumen energía solo cuando los segmentos están activados / desactivados. +Activar un "2" costará 5 transiciones, mientras que un "7" costará solo 4 transiciones. + +Sam y Max construyeron dos relojes diferentes. + +El reloj de Sam se alimenta, por ejemplo, el número 137: el reloj muestra "137", luego el panel se apaga, luego el siguiente número ("11") se enciende, luego el panel se apaga de nuevo y finalmente el último número ( "2") se enciende y, después de algún tiempo, se apaga. +Para el ejemplo, con el número 137, el reloj de Sam requiere: "137" +: +(2 + 5 + 4) × 2 = 22 transiciones ("137" encendido / apagado). +"11" +: +(2 + 2) × 2 = 8 transiciones ("11" encendido / apagado). +"2" +: +(5) × 2 = 10 transiciones ("2" encendido / apagado). + +Para un total de 40 transiciones. + +El reloj de Max funciona de manera diferente. En lugar de apagar todo el panel, es lo suficientemente inteligente como para apagar solo aquellos segmentos que no serán necesarios para el siguiente número. +Para el número 137, el reloj de Max requiere: "137" +: +2 + 5 + 4 = 11 transiciones ("137" activado) +7 transiciones (para desactivar los segmentos que no son necesarios para el número "11"). +"11" +: +0 transiciones (el número "11" ya está activado correctamente) +3 transiciones (para desactivar el primer "1" y la parte inferior del segundo "1"; +la parte superior es común con Número 2"). +"2" +: +4 transiciones (para activar los segmentos restantes para obtener un "2") +5 transiciones (para desactivar el número "2"). + +Para un total de 30 transiciones. + +Por supuesto, el reloj de Max consume menos energía que el de Sam. +Los dos relojes se alimentan de todos los números primos entre A = 107 y B = 2 × 107. +Encuentra la diferencia entre el número total de transiciones que necesita el reloj de Sam y la que necesita Max para una. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler315() debe devolver 13625242. + testString: 'assert.strictEqual(euler315(), 13625242, "euler315() should return 13625242.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler315() { + // Good luck! + return true; +} + +euler315(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-316-numbers-in-decimal-expansions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-316-numbers-in-decimal-expansions.spanish.md new file mode 100644 index 0000000000..148015b77a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-316-numbers-in-decimal-expansions.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4a81000cf542c50ffbb +challengeType: 5 +title: 'Problem 316: Numbers in decimal expansions' +--- + +## Description +
+Sea p = p1 p2 p3 ... sea una secuencia infinita de dígitos aleatorios, seleccionados de {0,1,2,3,4,5,6,7,8,9} con igual probabilidad. +Se puede ver que p corresponde al número real 0.p1 p2 p3 .... +También se puede ver que elegir un número real aleatorio del intervalo [0,1) es equivalente a elegir una secuencia infinita de aleatorios dígitos seleccionados de {0,1,2,3,4,5,6,7,8,9} con igual probabilidad. + +Para cualquier entero positivo n con d dígitos decimales, sea k el índice más pequeño tal que pk, pk + 1, ... pk + d-1 son los dígitos decimales de n, en el mismo orden. +Además, sea g (n) el valor esperado de k; se puede demostrar que g (n) es siempre finito y, curiosamente, siempre es un número entero. + +Por ejemplo, si n = 535, entonces +para p = 31415926535897 ...., obtenemos k = 9 +para p = 355287143650049560000490848764084685354 ..., obtenemos k = 36 +etc. y encontramos que g (535) = 1008. + +Dado que, encuentre + +Nota: representa la función de piso. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler316() debe devolver 542934735751917760. + testString: 'assert.strictEqual(euler316(), 542934735751917760, "euler316() should return 542934735751917760.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler316() { + // Good luck! + return true; +} + +euler316(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-317-firecracker.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-317-firecracker.spanish.md new file mode 100644 index 0000000000..872938e184 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-317-firecracker.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4aa1000cf542c50ffbc +challengeType: 5 +title: 'Problem 317: Firecracker' +--- + +## Description +
+Un petardo explota a una altura de 100 m sobre el nivel del suelo. Se rompe en una gran cantidad de fragmentos muy pequeños, que se mueven en todas las direcciones; Todos ellos tienen la misma velocidad inicial de 20 m / s. + + +Suponemos que los fragmentos se mueven sin resistencia del aire, en un campo gravitacional uniforme con g = 9.81 m / s2. + + +Encuentre el volumen (en m3) de la región a través de la cual se mueven los fragmentos antes de llegar al suelo. +Da tu respuesta redondeada a cuatro lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler317() debe devolver 1856532.8455. + testString: 'assert.strictEqual(euler317(), 1856532.8455, "euler317() should return 1856532.8455.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler317() { + // Good luck! + return true; +} + +euler317(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-319-bounded-sequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-319-bounded-sequences.spanish.md new file mode 100644 index 0000000000..c69d86ec41 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-319-bounded-sequences.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4ab1000cf542c50ffbe +challengeType: 5 +title: 'Problem 319: Bounded Sequences' +--- + +## Description +
+Sean x1, x2, ..., xn una secuencia de longitud n tal que: +x1 = 2 +para todos 1 <i ≤ n: xi-1 <xi +para todos i y j con 1 ≤ i, j ≤ n: (xi) j <(xj + 1) i + +Solo hay cinco secuencias de este tipo de longitud 2, a saber: +{2,4}, {2,5}, {2,6}, {2, 7} y {2,8}. +Hay 293 tales secuencias de longitud 5; A continuación se dan tres ejemplos: +{2,5,11,25,55}, {2,6,14,36,88}, {2,8,22,64,181}. + + +Sea t (n) el número de tales secuencias de longitud n. +Te dan que t (10) = 86195 yt (20) = 5227991891. + + +Encuentra t (1010) y da tu respuesta módulo 109. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler319() debe devolver 268457129. + testString: 'assert.strictEqual(euler319(), 268457129, "euler319() should return 268457129.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler319() { + // Good luck! + return true; +} + +euler319(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-32-pandigital-products.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-32-pandigital-products.spanish.md new file mode 100644 index 0000000000..ec9eb9b258 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-32-pandigital-products.spanish.md @@ -0,0 +1,102 @@ +--- +id: 5 +localeTitle: 5900f38c1000cf542c50fe9f +challengeType: 5 +title: 'Problem 32: Pandigital products' +--- + +## Description +
+Diremos que un número de n dígitos es pandigital si hace uso de todos los dígitos 1 a n exactamente una vez; por ejemplo, el número de 5 dígitos, 15234, es de 1 a 5 pandigital. + +El producto 7254 es inusual, ya que la identidad, 39 × 186 = 7254, contiene multiplicando, multiplicador y el producto es de 1 a 9 de pandigital. + +Encuentre la suma de todos los productos cuyo multiplicando / multiplicador / identidad de producto se puede escribir de 1 a 9 pandigital. + +CONSEJO: algunos productos se pueden obtener de más de una manera, así que asegúrese de incluirlos solo una vez en su suma. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: pandigitalProducts() es una función. + testString: 'assert(typeof pandigitalProducts === "function", "pandigitalProducts() is a function.");' + - text: pandigitalProducts() debe devolver 45228. + testString: 'assert.strictEqual(pandigitalProducts(), 45228, "pandigitalProducts() should return 45228.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function pandigitalProducts() { + // Good luck! + return true; +} + +pandigitalProducts(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function pandigitalProducts() { + function is1to9Pandigital(...numbers) { + const digitStr = concatenateNums(...numbers); + // check if length is 9 + if (digitStr.length !== 9) { + return false; + } + // check if pandigital + for (let i = digitStr.length; i > 0; i--) { + if (digitStr.indexOf(i.toString()) === -1) { + return false; + } + } + return true; + } + function concatenateNums(...numbers) { + let digitStr = "; + for (let i = 0; i < numbers.length; i++) { + digitStr += numbers[i].toString(); + } + return digitStr; + } + + const pandigitalNums = []; + let sum = 0; + for (let mult1 = 2; mult1 < 9876; mult1++) { + let mult2 = 123; + while (concatenateNums(mult1, mult2, mult1 * mult2).length < 10) { + if (is1to9Pandigital(mult1, mult2, mult1 * mult2) && !pandigitalNums.includes(mult1 * mult2)) { + pandigitalNums.push(mult1 * mult2); + sum += mult1 * mult2; + } + mult2++; + } + } + return sum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.spanish.md new file mode 100644 index 0000000000..d9b98c5742 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-320-factorials-divisible-by-a-huge-integer.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4ae1000cf542c50ffbf +challengeType: 5 +title: 'Problem 320: Factorials divisible by a huge integer' +--- + +## Description +
+Sea N (i) el entero más pequeño n tal que n! es divisible por (i!) 1234567890 + +Sea S (u) = ∑N (i) para 10 ≤ i ≤ u. + + +S (1000) = 614538266565663. + + +Encuentra S (1 000 000) mod 1018. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler320() debe devolver 278157919195482660. + testString: 'assert.strictEqual(euler320(), 278157919195482660, "euler320() should return 278157919195482660.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler320() { + // Good luck! + return true; +} + +euler320(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-321-swapping-counters.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-321-swapping-counters.spanish.md new file mode 100644 index 0000000000..832fd4c5a6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-321-swapping-counters.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4ae1000cf542c50ffc0 +challengeType: 5 +title: 'Problem 321: Swapping Counters' +--- + +## Description +
+Una fila horizontal compuesta por 2n + 1 cuadrados tiene n contadores rojos colocados en un extremo y n contadores azules en el otro extremo, separados por un solo cuadrado vacío en el centro. Por ejemplo, cuando n = 3. + + + +Un contador puede moverse de una casilla a la siguiente (deslizar) o puede saltar sobre otro contador (salto) siempre que la casilla junto a ese contador esté desocupada. + + + +Sea M (n) el número mínimo de movimientos / acciones para invertir completamente las posiciones de los contadores de colores; es decir, mueva todos los contadores rojos a la derecha y todos los contadores azules a la izquierda. +Se puede verificar M (3) = 15, que también es un número de triángulo. + +Si creamos una secuencia basada en los valores de n para los que M (n) es un número de triángulo, los primeros cinco términos serían: +1, 3, 10, 22 y 63, y su suma sería 99. + +Encuentra la suma de los primeros cuarenta términos de esta secuencia. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler321() debe devolver 2470433131948040. + testString: 'assert.strictEqual(euler321(), 2470433131948040, "euler321() should return 2470433131948040.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler321() { + // Good luck! + return true; +} + +euler321(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.spanish.md new file mode 100644 index 0000000000..3a3eec25ce --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-322-binomial-coefficients-divisible-by-10.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4af1000cf542c50ffc1 +challengeType: 5 +title: 'Problem 322: Binomial coefficients divisible by 10' +--- + +## Description +
+Sea T (m, n) el número de coeficientes binomiales iCn que son divisibles por 10 para n ≤ i <m (i, myn son enteros positivos). +Te dan que T (109, 107-10) = 989697000. + + +Encuentra T (1018, 1012-10). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler322() debe devolver 999998760323314000. + testString: 'assert.strictEqual(euler322(), 999998760323314000, "euler322() should return 999998760323314000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler322() { + // Good luck! + return true; +} + +euler322(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.spanish.md new file mode 100644 index 0000000000..8ece4ec52a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-323-bitwise-or-operations-on-random-integers.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4b01000cf542c50ffc2 +challengeType: 5 +title: 'Problem 323: Bitwise-OR operations on random integers' +--- + +## Description +
+Sean y0, y1, y2, ... una secuencia de enteros de 32 bits sin signo aleatorios +(es decir, 0 ≤ yi <232, cada valor es igualmente probable). +Para la secuencia xi se da la siguiente recursión: x0 = 0 y +xi = xi-1 | yi-1, para i> 0. (| es el operador OR a nivel de bits) +Se puede ver que eventualmente habrá un índice N tal que xi = 232 -1 (un patrón de bits de todos) para todos i ≥ N. + +Encuentre el valor esperado de N. +Dé su respuesta redondeada a 10 dígitos después del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler323() debe devolver 6.3551758451. + testString: 'assert.strictEqual(euler323(), 6.3551758451, "euler323() should return 6.3551758451.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler323() { + // Good luck! + return true; +} + +euler323(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-324-building-a-tower.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-324-building-a-tower.spanish.md new file mode 100644 index 0000000000..eda4ea40b9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-324-building-a-tower.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f4b11000cf542c50ffc3 +challengeType: 5 +title: 'Problem 324: Building a tower' +--- + +## Description +
+Sea f (n) la cantidad de formas en que se puede llenar una torre de 3 × 3 × n con bloques de 2 × 1 × 1. Puedes girar los bloques de la forma que quieras; sin embargo, las rotaciones, reflexiones, etc. de la torre en sí se cuentan como distintas. +Por ejemplo (con q = 100000007): f (2) = 229, f (4) = 117805, f (10) mod q = 96149360, f (103) mod q = 24806056, f (106) mod q = 30808124 + +Encuentra f (1010000) mod 100000007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler324() debe devolver 96972774. + testString: 'assert.strictEqual(euler324(), 96972774, "euler324() should return 96972774.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler324() { + // Good luck! + return true; +} + +euler324(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-325-stone-game-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-325-stone-game-ii.spanish.md new file mode 100644 index 0000000000..6b0bb6bfec --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-325-stone-game-ii.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f4b11000cf542c50ffc4 +challengeType: 5 +title: 'Problem 325: Stone Game II' +--- + +## Description +
+Un juego se juega con dos pilas de piedras y dos jugadores. En su turno, un jugador quita varias piedras de la pila más grande. El número de piedras que retira debe ser un múltiplo positivo del número de piedras en la pila más pequeña. + + + +Por ejemplo, deje que el par ordenado (6,14) describa una configuración con 6 piedras en la pila más pequeña y 14 piedras en la pila más grande, luego el primer jugador puede quitar 6 o 12 piedras de la pila más grande. + + + +El jugador que toma todas las piedras de una pila gana el juego. + + + +Una configuración ganadora es aquella en la que el primer jugador puede forzar una victoria. Por ejemplo, (1,5), (2,6) y (3,12) son configuraciones ganadoras porque el primer jugador puede eliminar inmediatamente todas las piedras en la segunda pila. + + + +Una configuración perdida es aquella en la que el segundo jugador puede forzar una victoria, sin importar lo que haga el primer jugador. Por ejemplo, (2,3) y (3,4) están perdiendo configuraciones: cualquier movimiento legal deja una configuración ganadora para el segundo jugador. + + + +Defina S (N) como la suma de (xi + yi) para todas las configuraciones perdedoras (xi, yi), 0 <xi <yi ≤ N. Podemos verificar que S (10) = 211 y S (104 ) = 230312207313. + + + +Encuentra S (1016) mod 710. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler325() debe devolver 54672965. + testString: 'assert.strictEqual(euler325(), 54672965, "euler325() should return 54672965.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler325() { + // Good luck! + return true; +} + +euler325(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-326-modulo-summations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-326-modulo-summations.spanish.md new file mode 100644 index 0000000000..e0ba0060d5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-326-modulo-summations.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4b21000cf542c50ffc5 +challengeType: 5 +title: 'Problem 326: Modulo Summations' +--- + +## Description +
+Sea una secuencia recursivamente definida por:. + + +Así que los primeros 10 elementos de una son: 1,1,0,3,0,3,5,4,1,9. + +Sea f (N, M) el número de pares (p, q) tal que: + + +Se puede ver que f (10,10) = 4 con los pares (3,3), (5, 5), (7,9) y (9,10). + + +También se le da que f (104,103) = 97158. + +Encuentra f (1012,106). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler326() debe devolver 1966666166408794400. + testString: 'assert.strictEqual(euler326(), 1966666166408794400, "euler326() should return 1966666166408794400.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler326() { + // Good luck! + return true; +} + +euler326(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-327-rooms-of-doom.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-327-rooms-of-doom.spanish.md new file mode 100644 index 0000000000..8640a3ba26 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-327-rooms-of-doom.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f4b31000cf542c50ffc6 +challengeType: 5 +title: 'Problem 327: Rooms of Doom' +--- + +## Description +
+Una serie de tres habitaciones están conectadas entre sí por puertas automáticas. + + + +Cada puerta es operada por una tarjeta de seguridad. Una vez que ingresa a una habitación, la puerta se cierra automáticamente y esa tarjeta de seguridad no se puede usar nuevamente. Al comienzo, una máquina entregará un número ilimitado de tarjetas, pero cada sala (incluida la sala de inicio) contiene escáneres y si detectan que tiene más de tres tarjetas de seguridad o si detectan una tarjeta de seguridad desatendida en el piso, entonces Todas las puertas quedarán cerradas permanentemente. Sin embargo, cada habitación contiene una caja donde puede guardar de forma segura cualquier número de tarjetas de seguridad para usarlas en una etapa posterior. + +Si simplemente tratara de viajar a través de las habitaciones una a la vez, al ingresar a la habitación 3, ¡habría usado las tres tarjetas y quedaría atrapado en esa habitación para siempre! + +Sin embargo, si hace uso de las cajas de almacenamiento, entonces es posible escapar. Por ejemplo, puede ingresar a la sala 1 usando su primera tarjeta, colocar una en la caja de almacenamiento y usar su tercera tarjeta para salir de la habitación de regreso al inicio. Luego, después de recoger tres tarjetas más de la máquina dispensadora, puede usar una para ingresar a la sala 1 y recoger la tarjeta que colocó en la caja hace un momento. Ahora tienes tres cartas de nuevo y podrás viajar a través de las tres puertas restantes. Este método le permite viajar a través de las tres habitaciones utilizando seis tarjetas de seguridad en total. + +Es posible viajar a través de seis habitaciones con un total de 123 tarjetas de seguridad mientras se lleva un máximo de 3 tarjetas. + +Sea C el número máximo de tarjetas que se pueden llevar en cualquier momento. +Sea R el número de habitaciones por las que viajar. +Deje que M (C, R) sea el número mínimo de tarjetas requeridas por la máquina dispensadora para viajar a través de las salas R, con un máximo de tarjetas C en cualquier momento. + +Por ejemplo, M (3,6) = 123 y M (4,6) = 23.Y, ΣM (C, 6) = 146 para 3 ≤ C ≤ 4. + + +Se le da que ΣM (C , 10) = 10382 para 3 ≤ C ≤ 10. + +Encuentre ΣM (C, 30) para 3 ≤ C ≤ 40. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler327() debe devolver 34315549139516. + testString: 'assert.strictEqual(euler327(), 34315549139516, "euler327() should return 34315549139516.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler327() { + // Good luck! + return true; +} + +euler327(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-328-lowest-cost-search.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-328-lowest-cost-search.spanish.md new file mode 100644 index 0000000000..0ca3180c1e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-328-lowest-cost-search.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f4b41000cf542c50ffc7 +challengeType: 5 +title: 'Problem 328: Lowest-cost Search' +--- + +## Description +
+Estamos tratando de encontrar un número oculto seleccionado del conjunto de enteros {1, 2, ..., n} haciendo preguntas. +Cada número (pregunta) que hacemos, tiene un costo igual al número solicitado y obtenemos una de las tres posibles respuestas: "Su conjetura es menor que el número oculto", o +"¡Sí, eso es todo!" O +" Tu conjetura es mayor que el número oculto ". +Dado el valor de n, una estrategia óptima minimiza el costo total (es decir, la suma de todas las preguntas formuladas) para el peor de los casos. Ej. + +Si n = 3, lo mejor que podemos hacer es, obviamente, pedir el número "2". La respuesta nos llevará inmediatamente a encontrar el número oculto (a un costo total = 2). + +Si n = 8, podríamos decidir utilizar una estrategia de "búsqueda binaria": nuestra primera pregunta sería "4" y si el número oculto es mayor que 4 necesitaremos una o dos preguntas adicionales. +Deje que nuestra segunda pregunta sea "6". Si el número oculto aún es mayor que 6, necesitaremos una tercera pregunta para discriminar entre 7 y 8. +Por lo tanto, nuestra tercera pregunta será "7" y el costo total para este peor escenario será 4+ 6 + 7 = 17. + +Podemos mejorar considerablemente el costo en el peor de los casos para n = 8, al preguntar "5" como nuestra primera pregunta. +Si nos dicen que el número oculto es mayor que 5, nuestra segunda pregunta será "7", entonces sabremos con certeza cuál es el número oculto (para un costo total de 5 + 7 = 12). +Si nos dicen que el número oculto es menor que 5, nuestra segunda pregunta será "3" y si el número oculto es menor que 3, nuestra tercera pregunta será "1", lo que da un costo total de 5 + 3 + 1 = 9. +Desde 12> 9, el costo más desfavorable para esta estrategia es 12. Eso es mejor que lo que hemos logrado anteriormente con la estrategia de "búsqueda binaria"; También es mejor o igual que cualquier otra estrategia. +Entonces, de hecho, acabamos de describir una estrategia óptima para n = 8. + +Sea C (n) el costo más desfavorable alcanzado por una estrategia óptima para n, como se describe anteriormente. +Así, C (1) = 0, C (2) = 1, C (3) = 2 y C (8) = 12. +De manera similar, C (100) = 400 y C (n) = 17575. + +Buscar C (n). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler328() debe devolver 260511850222. + testString: 'assert.strictEqual(euler328(), 260511850222, "euler328() should return 260511850222.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler328() { + // Good luck! + return true; +} + +euler328(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-329-prime-frog.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-329-prime-frog.spanish.md new file mode 100644 index 0000000000..6ca3625a6e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-329-prime-frog.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f4b51000cf542c50ffc8 +challengeType: 5 +title: 'Problem 329: Prime Frog' +--- + +## Description +
+Susan tiene una gran rana. +Su rana está saltando alrededor de 500 cuadrados numerados del 1 al 500. +Solo puede saltar un cuadrado a la izquierda o a la derecha, con la misma probabilidad, y no puede saltar fuera del rango [1; 500]. (Si aterriza en cualquier extremo, salta automáticamente al único cuadrado disponible en el siguiente movimiento.) + + +Cuando está en un cuadrado con un número primo, croa "P" (PRIME) con probabilidad 2/3 o 'N '(NO PRIME) con probabilidad 1/3 justo antes de saltar a la siguiente casilla. +Cuando está en un cuadrado con un número que no es primo, grazna "P" con probabilidad 1/3 o "N" con probabilidad 2/3 justo antes de saltar al siguiente cuadrado. + + +Dado que la posición de inicio de la rana es aleatoria con la misma probabilidad para cada casilla, y dado que ella escucha sus primeros 15 graznidos, ¿cuál es la probabilidad de que escuche la secuencia PPPPNNPPPNPPNPN? + +Da tu respuesta como una fracción p / q en forma reducida. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler329() debe devolver 199740353/29386561536000. + testString: 'assert.strictEqual(euler329(), 199740353 / 29386561536000, "euler329() should return 199740353 / 29386561536000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler329() { + // Good luck! + return true; +} + +euler329(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.spanish.md new file mode 100644 index 0000000000..b960e398da --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.spanish.md @@ -0,0 +1,113 @@ +--- +id: 5 +localeTitle: 5900f38d1000cf542c50fea0 +challengeType: 5 +title: 'Problem 33: Digit cancelling fractions' +--- + +## Description +
+La fracción 49/98 es una fracción curioso, como un matemático sin experiencia en el intento de simplificar puede creer erróneamente que 49/98 = 4/8, que es correcto, se obtiene mediante la cancelación de los 9s. +Consideraremos fracciones como, 30/50 = 3/5, para ser ejemplos triviales. +Hay exactamente cuatro ejemplos no triviales de este tipo de fracción, menos de uno en valor, y que contienen dos dígitos en el numerador y el denominador. +Si el producto de estas cuatro fracciones se da en sus términos comunes más bajos, encuentre el valor del denominador. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: digitCancellingFractions() debe devolver 100. + testString: 'assert.strictEqual(digitCancellingFractions(), 100, "digitCancellingFractions() should return 100.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function digitCancellingFractions() { + // Good luck! + return true; +} + +digitCancellingFractions(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function digitCancellingFractions() { + function isCurious(numerator, denominator) { + const fraction = numerator / denominator; + const numString = numerator.toString(); + const denString = denominator.toString(); + + if (numString[1] === '0' && denString[1] === '0') { + // trivial + return false; + } + for (let i = 0; i < 2; i++) { + for (let j = 0; j < 2; j++) { + if (numString[i] === denString[j]) { + const newNum = parseInt(numString[1 - i], 10); + const newDen = parseInt(denString[1 - j], 10); + if (newNum / newDen === fraction) { + return true; + } + } + } + } + return false; + } + function findLargestDivisor(a, b) { + let gcd = a > b ? b : a; + while (gcd > 1) { + if (a % gcd === 0 && b % gcd === 0) { + return gcd; + } + gcd--; + } + return gcd; + } + + function simplifyFraction(numerator, denominator) { + const divisor = findLargestDivisor(numerator, denominator); + return [numerator / divisor, denominator / divisor]; + } + + let multipleNumerator = 1; + let multipleDenominator = 1; + + for (let denominator = 11; denominator < 100; denominator++) { + for (let numerator = 10; numerator < denominator; numerator++) { + if (isCurious(numerator, denominator)) { + multipleNumerator *= numerator; + multipleDenominator *= denominator; + } + } + } + + return simplifyFraction(multipleNumerator, multipleDenominator)[1]; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-330-eulers-number.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-330-eulers-number.spanish.md new file mode 100644 index 0000000000..d72c7694a0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-330-eulers-number.spanish.md @@ -0,0 +1,96 @@ +--- +id: 5 +localeTitle: 5900f4b71000cf542c50ffc9 +challengeType: 5 +title: 'Problem 330: Euler"s Number' +--- + +## Description +
+Una secuencia infinita de números reales a (n) se define para todos los enteros n de la siguiente manera: + + +Por ejemplo, a (0) = +11! ++ +12! ++ +13! ++ ... = e - 1 +a (1) = +e - 11! ++ +12! ++ +13! ++ ... = 2e - 3 +a (2) = +2e - 31! ++ +e - 12! ++ +13! ++ ... = +72 +e - 6 + +con e = 2.7182818 ... siendo la constante de Euler. + + +Se puede mostrar que a (n) tiene la forma + +A (n) e + B (n) n! +para los enteros A (n) y B (n). + +Por ejemplo, un (10) = + +328161643 e - 65269448610! +. + +Encuentra A (109) + B (109) y da tu respuesta mod 77 777 777. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler330() debe devolver 15955822. + testString: 'assert.strictEqual(euler330(), 15955822, "euler330() should return 15955822.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler330() { + // Good luck! + return true; +} + +euler330(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-331-cross-flips.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-331-cross-flips.spanish.md new file mode 100644 index 0000000000..4372870604 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-331-cross-flips.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4b71000cf542c50ffca +challengeType: 5 +title: 'Problem 331: Cross flips' +--- + +## Description +
+discos de +N × N se colocan en un tablero de juego cuadrado. Cada disco tiene un lado negro y un lado blanco. + +En cada turno, puede elegir un disco y voltear todos los discos en la misma fila y la misma columna que este disco: por lo tanto, se voltean 2 × N-1 discos. El juego termina cuando todos los discos muestran su lado blanco. El siguiente ejemplo muestra un juego en un tablero de 5 × 5. + + + +Se puede probar que 3 es el número mínimo de turnos para terminar este juego. + +El disco inferior izquierdo de la placa N × N tiene coordenadas (0,0); +el disco inferior derecho tiene coordenadas (N-1,0) y el disco superior izquierdo tiene coordenadas (0, N-1). + +Deje que CN sea la siguiente configuración de una placa con discos N × N: +Un disco en (x, y) satisfactorio, muestra su lado negro; De lo contrario, muestra su lado blanco. C5 se muestra arriba. + +Deje que T (N) sea el número mínimo de turnos para terminar un juego comenzando desde la configuración CN o 0 si la configuración CN no tiene solución. +Hemos demostrado que T (5) = 3. También se le da que T (10) = 29 y T (1 000) = 395253. + +Buscar. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler331() debe devolver 467178235146843500. + testString: 'assert.strictEqual(euler331(), 467178235146843500, "euler331() should return 467178235146843500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler331() { + // Good luck! + return true; +} + +euler331(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-332-spherical-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-332-spherical-triangles.spanish.md new file mode 100644 index 0000000000..7435585b35 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-332-spherical-triangles.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4b91000cf542c50ffcb +challengeType: 5 +title: 'Problem 332: Spherical triangles' +--- + +## Description +
+Un triángulo esférico es una figura formada en la superficie de una esfera por tres grandes arcos circulares que se intersecan en pares en tres vértices. + + + + +Sea C (r) la esfera con el centro (0,0,0) y el radio r. +Sea Z (r) el conjunto de puntos en la superficie de C (r) con coordenadas enteras. +Sea T (r) el conjunto de triángulos esféricos con vértices en Z (r). +Los triángulos esféricos degenerados, formados por tres puntos en el mismo gran arco, no se incluyen en T (r). +Sea A (r) el área del triángulo esférico más pequeño en T (r). + +Por ejemplo, A (14) es 3.294040 redondeado a seis decimales. + +Encuentra A (r). Da tu respuesta redondeada a seis decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler332() debe devolver 2717.751525. + testString: 'assert.strictEqual(euler332(), 2717.751525, "euler332() should return 2717.751525.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler332() { + // Good luck! + return true; +} + +euler332(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-333-special-partitions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-333-special-partitions.spanish.md new file mode 100644 index 0000000000..40d0b9fdf5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-333-special-partitions.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4b91000cf542c50ffcc +challengeType: 5 +title: 'Problem 333: Special partitions' +--- + +## Description +
+Todos los enteros positivos se pueden dividir de tal manera que cada término de la partición se pueda expresar como 2ix3j, donde i, j ≥ 0. + +Consideremos solo aquellas particiones en las que ninguno de los términos puede dividir ninguno de otros terminos. +Por ejemplo, la partición de 17 = 2 + 6 + 9 = (21x30 + 21x31 + 20x32) no sería válida ya que 2 puede dividir 6. Tampoco la partición 17 = 16 + 1 = (24x30 + 20x30) ya que 1 puede divida 16. La única partición válida de 17 sería 8 + 9 = (23x30 + 20x32). + +Muchos enteros tienen más de una partición válida, siendo el primero 11 las dos particiones siguientes. +11 = 2 + 9 = (21x30 + 20x32) +11 = 8 + 3 = (23x30 + 20x31) + +Definamos P (n) como el número de particiones válidas de n. Por ejemplo, P (11) = 2. + +Consideremos solo los enteros primos q que tendrían una sola partición válida como P (17). + +La suma de los primos q <100, de manera que P (q) = 1 es igual a 233. + +Halla la suma de los primos q <1000000, de manera que P (q) = 1. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler333() debe devolver 3053105. + testString: 'assert.strictEqual(euler333(), 3053105, "euler333() should return 3053105.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler333() { + // Good luck! + return true; +} + +euler333(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-334-spilling-the-beans.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-334-spilling-the-beans.spanish.md new file mode 100644 index 0000000000..d431cf42b1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-334-spilling-the-beans.spanish.md @@ -0,0 +1,151 @@ +--- +id: 5 +localeTitle: 5900f4ba1000cf542c50ffcd +challengeType: 5 +title: 'Problem 334: Spilling the beans' +--- + +## Description +
+En el cielo de Platón, existe un número infinito de tazones en línea recta. +Cada tazón contiene algunos o ninguno de un número finito de frijoles. +Un niño juega un juego, que permite solo un tipo de movimiento: quitar dos frijoles de cualquier tazón y colocar uno en cada uno de los dos tazones adyacentes. El juego termina cuando cada tazón contiene uno o ninguno de los frijoles. + +Por ejemplo, considere dos tazones adyacentes que contienen 2 y 3 frijoles respectivamente, todos los otros tazones están vacíos. Los siguientes ocho movimientos terminarán el juego: + + + +Tienes las siguientes secuencias: +t0 = 123456. + + +ti = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +es par + + + +ti-12 + + + +926252, + + +si ti-1 es impar + + + + + +donde ⌊x⌋ es la función de piso + + + + +y es el operador de XOR a nivel de bits. + + +bi = (ti mod 211) + 1. + +Los dos primeros términos de la última secuencia son b1 = 289 y b2 = 145. +Si comenzamos con frijoles b1 y b2 en dos tazones adyacentes, 3419100 movimientos serían Necesario para terminar el juego. + +Considere ahora 1500 tazones adyacentes que contienen b1, b2, ..., frijoles b1500 respectivamente, todos los otros tazones están vacíos. Encuentra cuántos movimientos se necesitan antes de que termine el juego. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler334() debe devolver 150320021261690850. + testString: 'assert.strictEqual(euler334(), 150320021261690850, "euler334() should return 150320021261690850.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler334() { + // Good luck! + return true; +} + +euler334(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-335-gathering-the-beans.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-335-gathering-the-beans.spanish.md new file mode 100644 index 0000000000..caf7df5203 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-335-gathering-the-beans.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4bd1000cf542c50ffce +challengeType: 5 +title: 'Problem 335: Gathering the beans' +--- + +## Description +
+Cuando Peter se siente aburrido, coloca unos cuencos, que contienen un frijol cada uno, en un círculo. Después de esto, toma todos los frijoles de un tazón determinado y los deja caer uno por uno en los tazones en el sentido de las agujas del reloj. Repite esto, comenzando desde el tazón en el que soltó el último grano, hasta que la situación inicial vuelve a aparecer. Por ejemplo, con 5 tazones, actúa de la siguiente manera: + + + +Entonces, con 5 tazones, Peter 15 se mueve para volver a la situación inicial. + +Deje que M (x) represente el número de movimientos necesarios para volver a la situación inicial, comenzando con x tazones. Por lo tanto, M (5) = 15. También se puede verificar que M (100) = 10920. + +Encuentre M (2k + 1). Da tu respuesta módulo 79. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler335() debe devolver 5032316. + testString: 'assert.strictEqual(euler335(), 5032316, "euler335() should return 5032316.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler335() { + // Good luck! + return true; +} + +euler335(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-336-maximix-arrangements.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-336-maximix-arrangements.spanish.md new file mode 100644 index 0000000000..b6aad119af --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-336-maximix-arrangements.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4bd1000cf542c50ffcf +challengeType: 5 +title: 'Problem 336: Maximix Arrangements' +--- + +## Description +
+Se utiliza un tren para transportar cuatro vagones en el pedido: ABCD. Sin embargo, a veces, cuando el tren llega para recoger los vagones, no están en el orden correcto. +Para reorganizar los carros, todos ellos están en derivación en un gran plato giratorio giratorio. Una vez que los vagones se desacoplan en un punto específico, el tren se desplaza de la plataforma giratoria y tira de los vagones que todavía están unidos. Los carros restantes se giran 180 grados. Todos los carros se vuelven a unir y este proceso se repite tantas veces como sea necesario para obtener el menor número de usos de la plataforma giratoria. +Algunas disposiciones, como ADCB, se pueden resolver fácilmente: los carros se separan entre A y D, y después de rotar DCB se ha logrado el orden correcto. + +Sin embargo, Simple Simon, el conductor del tren, no es conocido por su eficiencia, por lo que siempre resuelve el problema colocando inicialmente el carro A en el lugar correcto, luego el carro B, y así sucesivamente. + +Usando cuatro carros, los peores arreglos posibles para Simon, que llamaremos arreglos Maximix, son DACB y DBAC; Cada uno de ellos requirió cinco rotaciones (aunque, utilizando el enfoque más eficiente, podrían resolverse usando solo tres rotaciones). El proceso que utiliza para DACB se muestra a continuación. + + + + +Se puede verificar que hay 24 arreglos de maximix para seis carros, de los cuales el décimo arreglo leixográfico de maximix es DFAECB. + +Encuentre el arreglo de maximix lexicográfico 2011 para once carros. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler336() debe devolver CAGBIHEFJDK. + testString: 'assert.strictEqual(euler336(), CAGBIHEFJDK, "euler336() should return CAGBIHEFJDK.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler336() { + // Good luck! + return true; +} + +euler336(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-337-totient-stairstep-sequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-337-totient-stairstep-sequences.spanish.md new file mode 100644 index 0000000000..6e10044267 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-337-totient-stairstep-sequences.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4be1000cf542c50ffd0 +challengeType: 5 +title: 'Problem 337: Totient Stairstep Sequences' +--- + +## Description +
+Sea {a1, a2, ..., an} una secuencia entera de longitud n tal que: +a1 = 6 +para todos 1 ≤ i <n: φ (ai) <φ (ai + 1) <ai < ai + 11 +Sea S (N) el número de tales secuencias con un ≤ N. +Por ejemplo, S (10) = 4: {6}, {6, 8}, {6, 8, 9} y { 6, 10}. +Podemos verificar que S (100) = 482073668 y S (10 000) mod 108 = 73808307. + +Encuentre S (20 000 000) mod 108. + +1 φ denota la función total de Euler. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler337() debe devolver 85068035. + testString: 'assert.strictEqual(euler337(), 85068035, "euler337() should return 85068035.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler337() { + // Good luck! + return true; +} + +euler337(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-338-cutting-rectangular-grid-paper.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-338-cutting-rectangular-grid-paper.spanish.md new file mode 100644 index 0000000000..df5b415960 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-338-cutting-rectangular-grid-paper.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f4be1000cf542c50ffd1 +challengeType: 5 +title: 'Problem 338: Cutting Rectangular Grid Paper' +--- + +## Description +
+Se proporciona una hoja rectangular de papel cuadriculado con dimensiones enteras w × h. El espaciado de la cuadrícula es 1. +Cuando cortamos la hoja a lo largo de las líneas de la cuadrícula en dos partes y reorganizamos esas piezas sin superposición, podemos hacer nuevos rectángulos con diferentes dimensiones. +Por ejemplo, a partir de una hoja con dimensiones 9 × 4, podemos hacer rectángulos con dimensiones 18 × 2, 12 × 3 y 6 × 6 cortando y reorganizando como se muestra a continuación: + + + + +Del mismo modo, desde una hoja con dimensiones 9 × 8, podemos hacer rectángulos con dimensiones 18 × 4 y 12 × 6. + +Para un par w y h, sea F (w, h) el número de rectángulos distintos que pueden formarse a partir de una hoja con dimensiones w × h. +Por ejemplo, F (2,1) = 0, F (2,2) = 1, F (9,4) = 3 y F (9,8) = 2. +Tenga en cuenta que los rectángulos congruentes con el inicial son sin contar en F (w, h). +Tenga en cuenta también que los rectángulos con dimensiones w × h y dimensiones h × w no se consideran distintos. + +Para un entero N, sea G (N) la suma de F (w, h) para todos los pares w y h que satisfacen 0 <h ≤ w ≤ N. +Podemos verificar que G (10) = 55, G (103) = 971745 y G (105) = 9992617687. + +Encuentre G (1012). Da tu respuesta módulo 108. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler338() debe devolver 15614292. + testString: 'assert.strictEqual(euler338(), 15614292, "euler338() should return 15614292.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler338() { + // Good luck! + return true; +} + +euler338(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-339-peredur-fab-efrawg.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-339-peredur-fab-efrawg.spanish.md new file mode 100644 index 0000000000..6fac17083d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-339-peredur-fab-efrawg.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4c01000cf542c50ffd2 +challengeType: 5 +title: 'Problem 339: Peredur fab Efrawg' +--- + +## Description +
+"Y se dirigió hacia un valle, a través del cual corría un río; y las orillas del valle estaban boscosas, y a cada lado del río había praderas a nivel. Y a un lado del río vio un rebaño de ovejas blancas, y en el otro, un rebaño de ovejas negras. Y cuando una de las ovejas blancas sangraba, una de las ovejas negras cruzaba y se volvía blanca, y cuando una de las ovejas negras sangraba, una de las ovejas blancas cruzaba y se convertía negro. "en.wikisource.org + + + +Inicialmente, cada rebaño consiste en n ovejas. Cada oveja (sin importar el color) tiene la misma probabilidad de ser la próxima oveja a la paliza. Después de que una oveja haya desangrado y una oveja del otro rebaño haya cruzado, Peredur puede eliminar varias ovejas blancas para maximizar el número final esperado de ovejas negras. Sea E (n) el número final esperado de ovejas negras si Peredur usa una estrategia óptima. + + + +Se da que E (5) = 6.871346 redondeado a 6 lugares detrás del punto decimal. +Encuentra E (10 000) y da tu respuesta redondeada a 6 lugares detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler339() debe devolver 19823.542204. + testString: 'assert.strictEqual(euler339(), 19823.542204, "euler339() should return 19823.542204.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler339() { + // Good luck! + return true; +} + +euler339(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-34-digit-factorials.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-34-digit-factorials.spanish.md new file mode 100644 index 0000000000..6577fba12b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-34-digit-factorials.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f38e1000cf542c50fea1 +challengeType: 5 +title: 'Problem 34: Digit factorials' +--- + +## Description +
+145 es un número curioso, como 1! + 4! + 5! = 1 + 24 + 120 = 145. +Encuentra los números y la suma de los números que son iguales a la suma del factorial de sus dígitos. +Nota: como 1! = 1 y 2! = 2 no son sumas que no están incluidas. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' digitFactorial() debe devolver {suma: 40730, números: [145, 40585]}.' + testString: 'assert.deepEqual(digitFactorial(), { sum: 40730, numbers: [145, 40585] }, "digitFactorial() should return { sum: 40730, numbers: [145, 40585] }.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function digitFactorial() { + // Good luck! + var sum = 0; + var numbers = []; + return { sum, numbers }; +} + +digitFactorial(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-340-crazy-function.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-340-crazy-function.spanish.md new file mode 100644 index 0000000000..4b30daf76e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-340-crazy-function.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4c21000cf542c50ffd4 +challengeType: 5 +title: 'Problem 340: Crazy Function' +--- + +## Description +
+Para los enteros fijos a, b, c, defina la función loca F (n) de la siguiente manera: +F (n) = n - c para todos n> b +F (n) = F (a + F (a + F) (a + F (a + n)))) para todos n ≤ b. + + +También, defina S (a, b, c) =. + + +Por ejemplo, si a = 50, b = 2000 y c = 40, entonces F (0) = 3240 y F (2000) = 2040. +Además, S (50, 2000, 40) = 5204240. + + +Encuentra los últimos 9 dígitos de S (217, 721, 127). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler340() debe devolver 291504964. + testString: 'assert.strictEqual(euler340(), 291504964, "euler340() should return 291504964.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler340() { + // Good luck! + return true; +} + +euler340(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.spanish.md new file mode 100644 index 0000000000..6c0e7d4cd1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4c11000cf542c50ffd3 +challengeType: 5 +title: 'Problem 341: Golomb"s self-describing sequence' +--- + +## Description +
+La secuencia autodescriptiva de Golomb {G (n)} es la única secuencia no decreciente de números naturales, por lo que n aparece exactamente G (n) veces en la secuencia. Los valores de G (n) para los primeros n son + + +n123456789101112131415… G (n) 122334445556666… + +Se le da que G (103) = 86, G (106) = 6137. +También se le da eso ΣG (n3) = 153506976 para 1 ≤ n <103. + +Encuentre ΣG (n3) para 1 ≤ n <106. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler341() debe devolver 56098610614277016. + testString: 'assert.strictEqual(euler341(), 56098610614277016, "euler341() should return 56098610614277016.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler341() { + // Good luck! + return true; +} + +euler341(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-342-the-totient-of-a-square-is-a-cube.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-342-the-totient-of-a-square-is-a-cube.spanish.md new file mode 100644 index 0000000000..9958988d0d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-342-the-totient-of-a-square-is-a-cube.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f4c31000cf542c50ffd5 +challengeType: 5 +title: 'Problem 342: The totient of a square is a cube' +--- + +## Description +
+Considera el número 50. +502 = 2500 = 22 × 54, entonces φ (2500) = 2 × 4 × 53 = 8 × 53 = 23 × 53. 1 +Entonces 2500 es un cuadrado y φ (2500) es un cubo . + + +Encuentra la suma de todos los números n, 1 <n <1010 de manera que (n2) sea un cubo. + + +1 φ denota la función totient de Euler. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler342() debe devolver 5943040885644. + testString: 'assert.strictEqual(euler342(), 5943040885644, "euler342() should return 5943040885644.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler342() { + // Good luck! + return true; +} + +euler342(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-343-fractional-sequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-343-fractional-sequences.spanish.md new file mode 100644 index 0000000000..f26f24c52c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-343-fractional-sequences.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f4c41000cf542c50ffd6 +challengeType: 5 +title: 'Problem 343: Fractional Sequences' +--- + +## Description +
+Para cualquier entero k positivo, una secuencia finita ai de fracciones xi / yi se define por: +a1 = 1 / k y +ai = (xi-1 + 1) / (yi-1-1) reducido a los términos más bajos para i> 1. +Cuando ai alcanza algún entero n, la secuencia se detiene. (Es decir, cuando yi = 1.) +Defina f (k) = n. +Por ejemplo, para k = 20: + + + +1/20 → 2/19 → 3/18 = 1/6 → 2/5 → 3/4 → 4/3 → 5/2 → 6/1 = 6 + + + +Entonces f (20) = 6. + + + +También f (1) = 1, f (2) = 2, f (3) = 1 y Σf (k3) = 118937 para 1 ≤ k ≤ 100 + + + +Encuentra Σf (k3) para 1 ≤ k ≤ 2 × 106. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler343() debe devolver 269533451410884200. + testString: 'assert.strictEqual(euler343(), 269533451410884200, "euler343() should return 269533451410884200.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler343() { + // Good luck! + return true; +} + +euler343(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-344-silver-dollar-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-344-silver-dollar-game.spanish.md new file mode 100644 index 0000000000..2126c228e0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-344-silver-dollar-game.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f4c51000cf542c50ffd7 +challengeType: 5 +title: 'Problem 344: Silver dollar game' +--- + +## Description +
+Una variante del juego del dólar de plata de NG de Bruijn se puede describir de la siguiente manera: + +En una tira de cuadrados se colocan varias monedas, como máximo una moneda por cuadrado. Sólo una moneda, llamada el dólar de plata, tiene algún valor. Dos jugadores se turnan para hacer movimientos. En cada turno, un jugador debe hacer un movimiento regular o especial. + +Un movimiento regular consiste en seleccionar una moneda y moverla una o más casillas a la izquierda. La moneda no puede salir de la tira o saltar sobre o sobre otra moneda. + +Alternativamente, el jugador puede elegir hacer el movimiento especial de embolsar la moneda más a la izquierda en lugar de hacer un movimiento regular. Si no es posible realizar movimientos regulares, el jugador se ve obligado a embolsar la moneda más a la izquierda. + +El ganador es el jugador que se lleva el dólar de plata. + + + + + +Una configuración ganadora es un arreglo de monedas en la tira donde el primer jugador puede forzar una victoria sin importar lo que haga el segundo jugador. + +Sea W (n, c) el número de configuraciones ganadoras para una franja de n cuadrados, c monedas sin valor y un dólar de plata. + +Se le da que W (10,2) = 324 y W (100,10) = 1514704946113500. + +Encuentre W (1 000 000, 100) módulo la semiprima 1000 036 000 099 (= 1 000 003 · 1 000 033). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler344() debe devolver 65579304332. + testString: 'assert.strictEqual(euler344(), 65579304332, "euler344() should return 65579304332.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler344() { + // Good luck! + return true; +} + +euler344(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-345-matrix-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-345-matrix-sum.spanish.md new file mode 100644 index 0000000000..fd2e265656 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-345-matrix-sum.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f4c81000cf542c50ffda +challengeType: 5 +title: 'Problem 345: Matrix Sum' +--- + +## Description +
+Definimos la suma matricial de una matriz como la suma máxima de elementos matriciales, siendo cada elemento el único en su fila y columna. Por ejemplo, la suma matricial de la siguiente matriz es igual a 3315 (= 863 + 383 + 343 + 959 + 767): + + +7 53 183 439 863 +497 383 563 79 973 +287 63 343 169 583 +627 343 773 959 943767 473 103 699 303 + + +Encuentra la suma de la matriz de: + +7 53 183 439 863 497 383 563 79 973 287 63 343 169 583 +627 343 773 959 943 767 473 103 699 303 957 703 583 639 913 +447 283 463 29 23 487 463 993 119 883 327 493 423 159 743 +217 623 3 399 853 407 103 983 89 463 290 516 212 462 350 +960 376 682 962 300 780 486 502 912 800 250 346 172 812 350 +870 456 192 162 593 473 915 45 989 873 823 965 425 329 803 +973 965 905 919 133 673 665 235 509 613 673 815 165 992 326 +322 148 972 962 286 255 941 541 265 323 925 281 601 95 973 +445 721 11 525 473 65 511 164 138 672 18 428 154 448 848 +414 456 310 312 798 104 566 520 302 248 694 976 430 392 198 +184 829 373 181 631 101 969 613 840 740 778 458 284 760 390 +821 461 843 513 17 901 711 993 293 157 274 94 192 156 574 +34 124 4 878 450 47 6 712 914 838 669 875 299 823 329 699 +815 559 813 459 522 788 168 586 966 232 308 833 251 631 107 +813 883 451 509 615 77 281 613 459 205 380 274 ​​302 35 805 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler345() debe devolver 13938. + testString: 'assert.strictEqual(euler345(), 13938, "euler345() should return 13938.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler345() { + // Good luck! + return true; +} + +euler345(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-346-strong-repunits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-346-strong-repunits.spanish.md new file mode 100644 index 0000000000..b8572339a5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-346-strong-repunits.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4c71000cf542c50ffd8 +challengeType: 5 +title: 'Problem 346: Strong Repunits' +--- + +## Description +
+El número 7 es especial, porque 7 es 111 escrito en la base 2 y 11 escrito en la base 6 (es decir, 710 = 116 = 1112). En otras palabras, 7 es una repunidad en al menos dos bases b> 1. + + +Llamaremos a un entero positivo con esta propiedad una repunidad fuerte. Se puede verificar que hay 8 repeticiones fuertes por debajo de 50: {1,7,13,15,21,31,40,43}. Además, la suma de todas las repunidades fuertes por debajo de 1000 es igual a 15864. + +Halla la suma de todas las repunidades fuertes por debajo de 1012. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler346() debe devolver 336108797689259260. + testString: 'assert.strictEqual(euler346(), 336108797689259260, "euler346() should return 336108797689259260.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler346() { + // Good luck! + return true; +} + +euler346(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-347-largest-integer-divisible-by-two-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-347-largest-integer-divisible-by-two-primes.spanish.md new file mode 100644 index 0000000000..1e20a4b747 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-347-largest-integer-divisible-by-two-primes.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f4c81000cf542c50ffd9 +challengeType: 5 +title: 'Problem 347: Largest integer divisible by two primes' +--- + +## Description +
+El entero más grande ≤ 100 que solo es divisible por los números primos 2 y 3 es 96, ya que 96 = 32 * 3 = 25 * 3. +Para dos primos distintos p y q, deje que M (p, q, N) sea el mayor entero positivo ≤N solo divisible +tanto por p como q y M (p, q, N) = 0 si tal entero positivo no lo hace existe. + + +Ej. M (2,3,100) = 96. +M (3,5,100) = 75 y no 90 porque 90 es divisible por 2, 3 y 5. +También M (2,73,100) = 0 porque no existe un entero positivo ≤ 100 que sea divisible por 2 y 73. + + +Sea S (N) la suma de todos los M distintos (p, q, N). +S (100) = 2262. + + +Encuentra S (10 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler347() debe devolver 11109800204052. + testString: 'assert.strictEqual(euler347(), 11109800204052, "euler347() should return 11109800204052.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler347() { + // Good luck! + return true; +} + +euler347(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.spanish.md new file mode 100644 index 0000000000..2bb796d831 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-348-sum-of-a-square-and-a-cube.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4c81000cf542c50ffdb +challengeType: 5 +title: 'Problem 348: Sum of a square and a cube' +--- + +## Description +
+Muchos números se pueden expresar como la suma de un cuadrado y un cubo. Algunos de ellos en más de una forma. + +Considere los números palindrómicos que pueden expresarse como la suma de un cuadrado y un cubo, ambos mayores que 1, de exactamente 4 formas diferentes. +Por ejemplo, 5229225 es un número palindrómico y puede expresarse de exactamente 4 formas diferentes: +22852 + 203 +22232 + 663 +18102 + 1253 +11972 + 1563 + +Halla la suma de los cinco números palindrómicos más pequeños. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler348() debe devolver 1004195061. + testString: 'assert.strictEqual(euler348(), 1004195061, "euler348() should return 1004195061.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler348() { + // Good luck! + return true; +} + +euler348(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-349-langtons-ant.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-349-langtons-ant.spanish.md new file mode 100644 index 0000000000..7c663fc8f9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-349-langtons-ant.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4ca1000cf542c50ffdc +challengeType: 5 +title: 'Problem 349: Langton"s ant' +--- + +## Description +
+Una hormiga se mueve en una cuadrícula regular de cuadrados de color blanco o negro. +La hormiga siempre está orientada en una de las direcciones cardinales (izquierda, derecha, arriba o abajo) y se mueve de un cuadrado a otro adyacente de acuerdo con las siguientes reglas: +- si está en un cuadrado negro, cambia el color del cuadrado a blanco, gira 90 grados en el sentido contrario a las agujas del reloj y avanza un cuadrado. +: si está en un cuadrado blanco, cambia el color del cuadrado a negro, gira 90 grados en el sentido de las agujas del reloj y avanza un cuadrado. + +Comenzando con una cuadrícula que es completamente blanca, ¿cuántos cuadrados son negros después de 1018 movimientos de la hormiga? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler349() debe devolver 115384615384614940. + testString: 'assert.strictEqual(euler349(), 115384615384614940, "euler349() should return 115384615384614940.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler349() { + // Good luck! + return true; +} + +euler349(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-35-circular-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-35-circular-primes.spanish.md new file mode 100644 index 0000000000..3f32eca63f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-35-circular-primes.spanish.md @@ -0,0 +1,100 @@ +--- +id: 5 +localeTitle: 5900f38f1000cf542c50fea2 +challengeType: 5 +title: 'Problem 35: Circular primes' +--- + +## Description +
+El número, 197, se llama primo circular porque todas las rotaciones de los dígitos: 197, 971 y 719, son primos. +Hay trece de tales primos por debajo de 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79 y 97. +¿Cuántos primos circulares hay debajo de n, mientras que 100 <= n <= 1000000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: circularPrimes(100) debe devolver 13. + testString: 'assert(circularPrimes(100) == 13, "circularPrimes(100) should return 13.");' + - text: circularPrimes(100000) debe devolver 43. + testString: 'assert(circularPrimes(100000) == 43, "circularPrimes(100000) should return 43.");' + - text: circularPrimes(250000) debe devolver 45. + testString: 'assert(circularPrimes(250000) == 45, "circularPrimes(250000) should return 45.");' + - text: circularPrimes(500000) debe devolver 49. + testString: 'assert(circularPrimes(500000) == 49, "circularPrimes(500000) should return 49.");' + - text: circularPrimes(750000) debe devolver 49. + testString: 'assert(circularPrimes(750000) == 49, "circularPrimes(750000) should return 49.");' + - text: circularPrimes(1000000) debe devolver 55. + testString: 'assert(circularPrimes(1000000) == 55, "circularPrimes(1000000) should return 55.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function circularPrimes(n) { + // Good luck! + return n; +} + +circularPrimes(1000000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const circularPrimes = (n) => { + const primeCheck = (num) => { + if (num === 1) { + return false; + } + for (let i = 2; i <= Math.floor(Math.sqrt(num)); i++) { + if (num % i === 0) { + return false; + } + } + return true; + }; + let count = 1; + for (let i = 1; i < n; i += 2) { + if (primeCheck(i)) { + let flag = true; + let circularNum = i.toString(); + for (let j = 1; j < i.toString().length; j++) { + circularNum = circularNum.substring(1) + circularNum.substring(0, 1); + if (primeCheck(Number(circularNum)) === false) { + flag = false; + break; + } + } + if (flag) { + count++; + } + } + } + return count; +}; +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-350-constraining-the-least-greatest-and-the-greatest-least.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-350-constraining-the-least-greatest-and-the-greatest-least.spanish.md new file mode 100644 index 0000000000..c25191cbc0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-350-constraining-the-least-greatest-and-the-greatest-least.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4cb1000cf542c50ffdd +challengeType: 5 +title: 'Problem 350: Constraining the least greatest and the greatest least' +--- + +## Description +
+Una lista de tamaño n es una secuencia de n números naturales. Los ejemplos son (2,4,6), (2,6,4), (10,6,15,6) y (11). + +El mayor divisor común, o gcd, de una lista es el número natural más grande que divide todas las entradas de la lista. Ejemplos: gcd (2,6,4) = 2, gcd (10,6,15,6) = 1 y gcd (11) = 11. + +El mínimo común múltiplo, o mcm, de una lista es el más pequeño natural Número divisible por cada entrada de la lista. Ejemplos: mcm (2,6,4) = 12, mcm (10,6,15,6) = 30 y mcm (11) = 11. + +Sea f (G, L, N) el número de listas de tamaño N con gcd ≥ G y lcm ≤ L. Por ejemplo: + +f (10, 100, 1) = 91. +f (10, 100, 2) = 327. +f (10, 100, 3) = 1135 . +f (10, 100, 1000) mod 1014 = 3286053. + +Encuentre f (106, 1012, 1018) mod 1014. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler350() debe devolver 84664213. + testString: 'assert.strictEqual(euler350(), 84664213, "euler350() should return 84664213.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler350() { + // Good luck! + return true; +} + +euler350(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-351-hexagonal-orchards.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-351-hexagonal-orchards.spanish.md new file mode 100644 index 0000000000..f9a6476bf4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-351-hexagonal-orchards.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4cb1000cf542c50ffde +challengeType: 5 +title: 'Problem 351: Hexagonal orchards' +--- + +## Description +
+Un huerto hexagonal de orden n es una celosía triangular formada por puntos dentro de un hexágono regular con lado n. El siguiente es un ejemplo de un huerto hexagonal de orden 5: + + + + + + +Destacados en verde son los puntos que están ocultos desde el centro por un punto más cercano a él. Se puede ver que para un huerto hexagonal de orden 5, se ocultan 30 puntos del centro. + + + +Sea H (n) el número de puntos ocultos desde el centro en un huerto hexagonal de orden n. + + + +H (5) = 30. H (10) = 138. H (1 000) = 1177848. + + + +Encuentre H (100 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler351() debe devolver 11762187201804552. + testString: 'assert.strictEqual(euler351(), 11762187201804552, "euler351() should return 11762187201804552.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler351() { + // Good luck! + return true; +} + +euler351(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-352-blood-tests.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-352-blood-tests.spanish.md new file mode 100644 index 0000000000..ea78b89a91 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-352-blood-tests.spanish.md @@ -0,0 +1,93 @@ +--- +id: 5 +localeTitle: 5900f4cd1000cf542c50ffdf +challengeType: 5 +title: 'Problem 352: Blood tests' +--- + +## Description +
+Cada una de las 25 ovejas en un rebaño debe ser examinada para detectar un virus raro, que se sabe que afecta al 2% de la población de ovejas. +Existe una prueba de PCR precisa y extremadamente sensible para las muestras de sangre, que produce un resultado positivo / negativo claro, pero requiere mucho tiempo y es costoso. + + + +Debido al alto costo, el veterinario a cargo sugiere que en lugar de realizar 25 pruebas separadas, se puede usar el siguiente procedimiento: +Las ovejas se dividen en 5 grupos de 5 ovejas en cada grupo. +Para cada grupo, las 5 muestras se mezclan y se realiza una única prueba. Entonces, +Si el resultado es negativo, todas las ovejas de ese grupo se consideran libres de virus. +Si el resultado es positivo, se realizarán 5 pruebas adicionales (una prueba por separado para cada animal) para determinar la (s) persona (s) afectada (s). + +Dado que la probabilidad de infección para un animal específico es solo de 0.02, la primera prueba (en las muestras agrupadas) para cada grupo será: +Negativo (y no se necesitan más pruebas) con una probabilidad de 0.985 = 0.9039207968. +Positivo (se necesitan 5 pruebas adicionales) con probabilidad 1 - 0.9039207968 = 0.0960792032. + +Por lo tanto, el número esperado de pruebas para cada grupo es 1 + 0.0960792032 × 5 = 1.480396016. +En consecuencia, los 5 grupos pueden evaluarse utilizando un promedio de solo 1.480396016 × 5 = 7.40198008 pruebas, lo que representa un gran ahorro de más del 70%. + + + +A pesar de que el esquema que acabamos de describir parece ser muy eficiente, aún puede mejorarse considerablemente (siempre suponiendo que la prueba sea lo suficientemente sensible y que no haya efectos adversos causados ​​por la mezcla de diferentes muestras). Por ejemplo: +Podemos comenzar realizando una prueba en una mezcla de las 25 muestras. Se puede verificar que en aproximadamente el 60,35% de los casos esta prueba será negativa, por lo que no se necesitarán más pruebas. Solo se requerirán pruebas adicionales para el 39,65% restante de los casos. +Si sabemos que al menos un animal en un grupo de 5 está infectado y las primeras 4 pruebas individuales resultan negativas, no hay necesidad de realizar una prueba en el quinto animal (sabemos que debe estar infectado). +Podemos probar un número diferente de grupos / número diferente de animales en cada grupo, ajustando esos números en cada nivel para que el número total esperado de pruebas se minimice. + +Para simplificar el amplio rango de posibilidades, hay una restricción que ponemos al diseñar el esquema de prueba más rentable: cada vez que comencemos con una muestra mixta, todas las ovejas que contribuyen a esa muestra deben ser examinadas completamente (es decir, un veredicto). de infectados / sin virus se debe alcanzar para todos ellos) antes de comenzar a examinar cualquier otro animal. + +Para el ejemplo actual, resulta que el esquema de prueba más rentable (lo llamaremos la estrategia óptima) requiere un promedio de solo 4.155452 pruebas. + + + +Utilizando la estrategia óptima, permita que T (s, p) represente el número promedio de pruebas necesarias para detectar un rebaño de ovejas en busca de un virus con probabilidad p de estar presente en cualquier individuo. +Así, redondeado a seis lugares decimales, T (25, 0.02) = 4.155452 y T (25, 0.10) = 12.702124. + + + +Encuentre ΣT (10000, p) para p = 0.01, 0.02, 0.03, ... 0.50. +Da tu respuesta redondeada a seis lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler352() debe devolver 378563.260589. + testString: 'assert.strictEqual(euler352(), 378563.260589, "euler352() should return 378563.260589.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler352() { + // Good luck! + return true; +} + +euler352(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-353-risky-moon.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-353-risky-moon.spanish.md new file mode 100644 index 0000000000..7b0fc02418 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-353-risky-moon.spanish.md @@ -0,0 +1,84 @@ +--- +id: 5 +localeTitle: 5900f4cd1000cf542c50ffe0 +challengeType: 5 +title: 'Problem 353: Risky moon' +--- + +## Description +
+Una luna podría ser descrita por la esfera C (r) con centro (0,0,0) y radio r. + + + +Hay estaciones en la luna en los puntos de la superficie de C (r) con coordenadas enteras. La estación en (0,0, r) se llama estación del Polo Norte, la estación en (0,0, -r) se llama estación del Polo Sur. + + + +Todas las estaciones están conectadas entre sí a través de la carretera más corta en el gran arco a través de las estaciones. Un viaje entre dos estaciones es arriesgado. Si d es la longitud del camino entre dos estaciones, (d / (π r)) 2 es una medida del riesgo del viaje (llamémoslo riesgo del camino). Si el viaje incluye más de dos estaciones, el riesgo del viaje es la suma de los riesgos de las carreteras usadas. + + + +Un viaje directo desde la estación del Polo Norte a la estación del Polo Sur tiene la longitud de πr y riesgo 1. El viaje desde la estación del Polo Norte a la estación del Polo Sur a través de (0, r, 0) tiene la misma longitud, pero un riesgo menor: (½πr / (πr)) 2+ (½πr / (πr)) 2 = 0.5. + + + +El riesgo mínimo de un viaje desde la estación del Polo Norte a la estación del Polo Sur en C (r) es M (r). + + + +Se le da que M (7) = 0.1784943998 redondeado a 10 dígitos detrás del punto decimal. + + + +Encuentra ∑M (2n-1) para 1≤n≤15. + + + +Dé su respuesta redondeada a 10 dígitos detrás del punto decimal en la forma a.bcdefghijk. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler353() debe devolver 1.2759860331. + testString: 'assert.strictEqual(euler353(), 1.2759860331, "euler353() should return 1.2759860331.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler353() { + // Good luck! + return true; +} + +euler353(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-354-distances-in-a-bees-honeycomb.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-354-distances-in-a-bees-honeycomb.spanish.md new file mode 100644 index 0000000000..aad52eb960 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-354-distances-in-a-bees-honeycomb.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f4cf1000cf542c50ffe1 +challengeType: 5 +title: 'Problem 354: Distances in a bee"s honeycomb' +--- + +## Description +
+Considere un panal de abejas en donde cada celda es un hexágono regular perfecto con una longitud de lado 1. + + + + + + +Una celda en particular está ocupada por la abeja reina. +Para un número real positivo L, que B (L) cuente las celdas con la distancia L desde la celda de la abeja reina (todas las distancias se miden de centro a centro); puede suponer que el panal es lo suficientemente grande como para adaptarse a cualquier distancia que deseemos considerar. +Por ejemplo, B (√3) = 6, B (√21) = 12 y B (111 111 111) = 54. + +Halla el número de L ≤ 5 · 1011 tal que B (L) = 450. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler354() debe devolver 58065134. + testString: 'assert.strictEqual(euler354(), 58065134, "euler354() should return 58065134.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler354() { + // Good luck! + return true; +} + +euler354(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-355-maximal-coprime-subset.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-355-maximal-coprime-subset.spanish.md new file mode 100644 index 0000000000..2bfc1454c4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-355-maximal-coprime-subset.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4d01000cf542c50ffe2 +challengeType: 5 +title: 'Problem 355: Maximal coprime subset' +--- + +## Description +
+Defina Co (n) como la suma máxima posible de un conjunto de elementos de cebado primordial de {1, 2, ..., n}. Por ejemplo, Co (10) es 30 y alcanza ese máximo en el subconjunto {1, 5, 7, 8, 9}. + + + +Se le da que Co (30) = 193 y Co (100) = 1356. + + +Encuentre Co (200000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler355() debe devolver 1726545007. + testString: 'assert.strictEqual(euler355(), 1726545007, "euler355() should return 1726545007.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler355() { + // Good luck! + return true; +} + +euler355(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.spanish.md new file mode 100644 index 0000000000..65b3752422 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4d01000cf542c50ffe3 +challengeType: 5 +title: 'Problem 356: Largest roots of cubic polynomials' +--- + +## Description +
+Sea la raíz real más grande de un polinomio g (x) = x3 - 2n · x2 + n. +Por ejemplo, a2 = 3.86619826 ... + + +Encuentra los últimos ocho dígitos de. + + +Nota: representa la función de piso. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler356() debe devolver 28010159. + testString: 'assert.strictEqual(euler356(), 28010159, "euler356() should return 28010159.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler356() { + // Good luck! + return true; +} + +euler356(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-357-prime-generating-integers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-357-prime-generating-integers.spanish.md new file mode 100644 index 0000000000..af595ea022 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-357-prime-generating-integers.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4d11000cf542c50ffe4 +challengeType: 5 +title: 'Problem 357: Prime generating integers' +--- + +## Description +
+Considera los divisores de 30: 1,2,3,5,6,10,15,30. +Se puede ver que para cada divisor d de 30, d + 30 / d es primo. + + +Encuentre la suma de todos los enteros positivos n que no excedan de 100 000 000, de modo que +para cada divisor d de n, d + n / d es primo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler357() debe devolver 1739023853137. + testString: 'assert.strictEqual(euler357(), 1739023853137, "euler357() should return 1739023853137.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler357() { + // Good luck! + return true; +} + +euler357(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-358-cyclic-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-358-cyclic-numbers.spanish.md new file mode 100644 index 0000000000..d3179546fa --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-358-cyclic-numbers.spanish.md @@ -0,0 +1,84 @@ +--- +id: 5 +localeTitle: 5900f4d21000cf542c50ffe5 +challengeType: 5 +title: 'Problem 358: Cyclic numbers' +--- + +## Description +
+Un número cíclico con n dígitos tiene una propiedad muy interesante: +Cuando se multiplica por 1, 2, 3, 4, ... n, todos los productos tienen exactamente los mismos dígitos, en el mismo orden, pero girados en una ¡Moda circular! + + + +El número cíclico más pequeño es el número de 6 dígitos 142857: +142 857 × 1 = 142 857 +142 857 × 2 = 285 714 +142 857 × 3 = 428 571 +142 857 × 4 = 571 428 +142 857 × 5 = 714 285 +142 857 × 6 = 857 142 + + + +El siguiente número cíclico es 0588235294117647 con 16 dígitos: +0588235294117647 × 1 = 0588235294117647 +0588235294117647 × 2 = 1176470588235294 +0588235294117647 × 3 = 1764705882352941 +... +0588235294117647 × 16 = 9411764705882352 + + + +Nota que Para los números cíclicos, los ceros iniciales son importantes. + + + +Solo hay un número cíclico para el cual, los once dígitos más a la izquierda son 00000000137 y los cinco dígitos más a la derecha son 56789 (es decir, tiene la forma 00000000137 ... 56789 con un número desconocido de dígitos en el centro). Encuentra la suma de todos sus dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler358() debe devolver 3284144505. + testString: 'assert.strictEqual(euler358(), 3284144505, "euler358() should return 3284144505.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler358() { + // Good luck! + return true; +} + +euler358(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-359-hilberts-new-hotel.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-359-hilberts-new-hotel.spanish.md new file mode 100644 index 0000000000..c29786149b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-359-hilberts-new-hotel.spanish.md @@ -0,0 +1,85 @@ +--- +id: 5 +localeTitle: 5900f4d31000cf542c50ffe6 +challengeType: 5 +title: 'Problem 359: Hilbert"s New Hotel' +--- + +## Description +
+Un número infinito de personas (numeradas 1, 2, 3, etc.) están alineadas para obtener una habitación en el hotel infinito más nuevo de Hilbert. El hotel contiene un número infinito de pisos (numerados 1, 2, 3, etc.), y cada piso contiene un número infinito de habitaciones (numerados 1, 2, 3, etc.). + + + +Inicialmente el hotel está vacío. Hilbert declara una regla sobre cómo se le asigna una habitación a la nª persona: la persona n obtiene la primera habitación desocupada en el piso con el número más bajo que cumpla con cualquiera de las siguientes condiciones: +el piso está vacío +el piso no está vacío, y si la última persona que tomó una habitación en ese piso es la persona m, luego m + n es un cuadrado perfecto + +persona 1 recibe la habitación 1 en el piso 1 ya que el piso 1 está vacío. +persona 2 no recibe la habitación 2 en el piso 1 ya que 1 + 2 = 3 no es un cuadrado perfecto. +persona 2 obtiene el cuarto 1 en el piso 2 ya que el piso 2 está vacío. +persona 3 obtiene la habitación 2 en el piso 1 ya que 1 + 3 = 4 es un cuadrado perfecto. + + + +Finalmente, cada persona en la fila recibe una habitación en el hotel. + + + +Defina P (f, r) como n si la persona n ocupa la habitación r en el piso f, y 0 si ninguna persona ocupa la habitación. Aquí hay algunos ejemplos: +P (1, 1) = 1 +P (1, 2) = 3 +P (2, 1) = 2 +P (10, 20) = 440 +P (25, 75) = 4863 +P (99, 100) = 19454 + + + +Encuentra la suma de todos los P (f, r) para todos los positivos f y r tales que f × r = 71328803586048 y da los últimos 8 dígitos como respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler359() debe devolver 40632119. + testString: 'assert.strictEqual(euler359(), 40632119, "euler359() should return 40632119.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler359() { + // Good luck! + return true; +} + +euler359(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-36-double-base-palindromes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-36-double-base-palindromes.spanish.md new file mode 100644 index 0000000000..e84054edb7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-36-double-base-palindromes.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3901000cf542c50fea3 +challengeType: 5 +title: 'Problem 36: Double-base palindromes' +--- + +## Description +
+El número decimal, 585 = 10010010012 (binario), es palindrómico en ambas bases. +Encuentre la suma de todos los números, menos que n, mientras que 1000 <= n <= 1000000, que son palíndromos en la base 10 y en la base 2. +(Tenga en cuenta que el número palindrómico, en cualquiera de las bases, puede no incluir ceros a la izquierda. ) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: doubleBasePalindromes(1000) debe devolver 1772. + testString: 'assert(doubleBasePalindromes(1000) == 1772, "doubleBasePalindromes(1000) should return 1772.");' + - text: doubleBasePalindromes(50000) debe devolver 105795. + testString: 'assert(doubleBasePalindromes(50000) == 105795, "doubleBasePalindromes(50000) should return 105795.");' + - text: doubleBasePalindromes(500000) debe devolver 286602. + testString: 'assert(doubleBasePalindromes(500000) == 286602, "doubleBasePalindromes(500000) should return 286602.");' + - text: doubleBasePalindromes(1000000) debe devolver 872187. + testString: 'assert(doubleBasePalindromes(1000000) == 872187, "doubleBasePalindromes(1000000) should return 872187.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function doubleBasePalindromes(n) { + // Good luck! + return n; +} + +doubleBasePalindromes(1000000); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-360-scary-sphere.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-360-scary-sphere.spanish.md new file mode 100644 index 0000000000..27d4f47358 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-360-scary-sphere.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f4d41000cf542c50ffe7 +challengeType: 5 +title: 'Problem 360: Scary Sphere' +--- + +## Description +
+Dados dos puntos (x1, y1, z1) y (x2, y2, z2) en el espacio tridimensional, la distancia de Manhattan entre esos puntos se define como | x1-x2 | + | y1-y2 | + | z1-z2 | . + + +Sea C (r) una esfera con radio r y centro en el origen O (0,0,0). +Sea I (r) el conjunto de todos los puntos con coordenadas enteras en la superficie de C (r). +Sea S (r) la suma de las distancias de Manhattan de todos los elementos de I (r) al origen O. + + +Por ejemplo, S (45) = 34518. + + +Encuentra S (1010). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler360() debe devolver 878825614395267100. + testString: 'assert.strictEqual(euler360(), 878825614395267100, "euler360() should return 878825614395267100.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler360() { + // Good luck! + return true; +} + +euler360(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-361-subsequence-of-thue-morse-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-361-subsequence-of-thue-morse-sequence.spanish.md new file mode 100644 index 0000000000..524a66c740 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-361-subsequence-of-thue-morse-sequence.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f4d51000cf542c50ffe8 +challengeType: 5 +title: 'Problem 361: Subsequence of Thue-Morse sequence' +--- + +## Description +
+La secuencia de Thue-Morse {Tn} es una secuencia binaria que satisface: +T0 = ​​0 +T2n = Tn +T2n + 1 = 1 - Tn + +Los primeros términos de {Tn} se indican a continuación: +01101001100101101001011001101001. .. + + + +Definimos {An} como la secuencia ordenada de enteros de manera que la expresión binaria de cada elemento aparezca como una subsecuencia en {Tn}. +Por ejemplo, el número decimal 18 se expresa como 10010 en binario. 10010 aparece en {Tn} (T8 a T12), por lo que 18 es un elemento de {An}. +El número decimal 14 se expresa como 1110 en binario. 1110 nunca aparece en {Tn}, por lo que 14 no es un elemento de {An}. + + + +Los primeros términos de An son los siguientes: +n0123456789101112… An012345691011121318… + + + +También podemos verificar que A100 = 3251 y A1000 = 80852364498. + + + +Encuentre los últimos 9 dígitos de. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler361() debe devolver 178476944. + testString: 'assert.strictEqual(euler361(), 178476944, "euler361() should return 178476944.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler361() { + // Good luck! + return true; +} + +euler361(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-362-squarefree-factors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-362-squarefree-factors.spanish.md new file mode 100644 index 0000000000..e71a714821 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-362-squarefree-factors.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4d61000cf542c50ffe9 +challengeType: 5 +title: 'Problem 362: Squarefree factors' +--- + +## Description +
+Considere el número 54. +54 se puede factorizar de 7 formas distintas en uno o más factores mayores que 1: +54, 2 × 27, 3 × 18, 6 × 9, 3 × 3 × 6, 2 × 3 × 9 y 2 × 3 × 3 × 3. +Si requerimos que todos los factores estén libres de cuadrados, solo quedan dos formas: 3 × 3 × 6 y 2 × 3 × 3 × 3. + + +Llamemos a Fsf (n) el número de maneras en que n se pueden factorizar en uno o más factores de squarefree mayores que 1, entonces +Fsf (54) = 2. + + +Sea S (n) sea ∑Fsf (k) para k = 2 a n. + + +S (100) = 193. + + +Encuentra S (10 000 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler362() debe devolver 457895958010. + testString: 'assert.strictEqual(euler362(), 457895958010, "euler362() should return 457895958010.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler362() { + // Good luck! + return true; +} + +euler362(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-363-bzier-curves.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-363-bzier-curves.spanish.md new file mode 100644 index 0000000000..535976e7e3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-363-bzier-curves.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f4d91000cf542c50ffeb +challengeType: 5 +title: 'Problem 363: Bézier Curves' +--- + +## Description +
+Una curva de Bézier cúbica se define por cuatro puntos: P0, P1, P2 y P3. + + + +La curva se construye de la siguiente manera: +En los segmentos P0P1, P1P2 y P2P3, los puntos Q0, Q1 y Q2 se dibujan de manera tal que +P0Q0 / P0P1 = P1Q1 / P1P2 = P2Q2 / P2P3 = t (t en [0 , 1]). +En los segmentos Q0Q1 y Q1Q2, los puntos R0 y R1 se dibujan de manera que +Q0R0 / Q0Q1 = Q1R1 / Q1Q2 = t para el mismo valor de t. +En el segmento R0R1, el punto B se dibuja de manera tal que R0B / R0R1 = t para el mismo valor de t. +La curva de Bézier definida por los puntos P0, P1, P2, P3 es el lugar de B cuando Q0 toma todas las posiciones posibles en el segmento P0P1. +(Tenga en cuenta que para todos los puntos, el valor de t es el mismo). + +En esta dirección web (externa) encontrará un applet que le permite arrastrar los puntos P0, P1, P2 y P3 para ver qué hace el Bézier La curva (curva verde) definida por esos puntos es similar. También puede arrastrar el punto Q0 a lo largo del segmento P0P1. + +De la construcción está claro que la curva de Bézier será tangente a los segmentos P0P1 en P0 y P2P3 en P3. + +Se utiliza una curva de Bézier cúbica con P0 = (1,0), P1 = (1, v), P2 = (v, 1) y P3 = (0,1) para aproximar un cuarto de círculo. +El valor v> 0 se elige de tal manera que el área encerrada por las líneas OP0, OP3 y la curva sea igual a π / 4 (el área del cuarto de círculo). + +¿Por cuánto porcentaje la longitud de la curva difiere de la longitud del cuarto de círculo? +Es decir, si L es la longitud de la curva, calcule 100 × L - π / 2π / 2. Dé su respuesta redondeada a 10 dígitos detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler363() debe devolver 0.0000372091. + testString: 'assert.strictEqual(euler363(), 0.0000372091, "euler363() should return 0.0000372091.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler363() { + // Good luck! + return true; +} + +euler363(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-364-comfortable-distance.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-364-comfortable-distance.spanish.md new file mode 100644 index 0000000000..14ada48478 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-364-comfortable-distance.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4d91000cf542c50ffea +challengeType: 5 +title: 'Problem 364: Comfortable distance' +--- + +## Description +
+Hay N asientos en una fila. N personas vienen una detrás de la otra para llenar los asientos de acuerdo con las siguientes reglas: +Si hay algún asiento cuyos asientos adyacentes no estén ocupados, tome ese asiento. +Si no hay tal asiento y hay algún asiento para el que solo esté ocupado un asiento adyacente, tome ese asiento. +De lo contrario, tome uno de los asientos disponibles restantes. + +Sea T (N) la cantidad de posibilidades que N asientos están ocupados por N personas con las reglas dadas. La siguiente figura muestra T (4) = 8. + + + + + +Podemos verificar que T (10) = 61632 y T (1 000) mod 100 000 007 = 47255094. +Encontrar T (1 000 000) mod 100 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler364() debe devolver 44855254. + testString: 'assert.strictEqual(euler364(), 44855254, "euler364() should return 44855254.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler364() { + // Good luck! + return true; +} + +euler364(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.spanish.md new file mode 100644 index 0000000000..261c0abf3e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4da1000cf542c50ffec +challengeType: 5 +title: 'Problem 365: A huge binomial coefficient' +--- + +## Description +
+El coeficiente binomial C (1018,109) es un número con más de 9 mil millones (9 × 109) dígitos. + + +Sea M (n, k, m) el coeficiente binomial C (n, k) módulo m. + + +Calcule ∑M (1018,109, p * q * r) para 1000 0
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler365() debe devolver 162619462356610300. + testString: 'assert.strictEqual(euler365(), 162619462356610300, "euler365() should return 162619462356610300.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler365() { + // Good luck! + return true; +} + +euler365(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-366-stone-game-iii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-366-stone-game-iii.spanish.md new file mode 100644 index 0000000000..20d7b13c34 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-366-stone-game-iii.spanish.md @@ -0,0 +1,79 @@ +--- +id: 5 +localeTitle: 5900f4da1000cf542c50ffed +challengeType: 5 +title: 'Problem 366: Stone Game III' +--- + +## Description +
+Dos jugadores, Anton y Bernhard, están jugando el siguiente juego. +Hay una pila de n piedras. +El primer jugador puede eliminar cualquier número positivo de piedras, pero no toda la pila. +A partir de entonces, cada jugador puede retirar como máximo el doble del número de piedras a su oponente tomó en la jugada anterior. +El jugador que quita la última piedra gana. + + +Ej. N = 5 +Si el primer jugador toma algo más de una piedra, el siguiente jugador podrá tomar todas las piedras restantes. +Si el primer jugador toma una piedra, dejando cuatro, su oponente también tomará una piedra, dejando tres piedras. +El primer jugador no puede tomar los tres porque puede tomar como máximo 2x1 = 2 piedras. Así que digamos que toma también una piedra, dejando 2. El segundo jugador puede tomar las dos piedras restantes y gana. +So 5 es una posición perdedora para el primer jugador. +Para algunas posiciones ganadoras hay más de un movimiento posible para el primer jugador. +Por ejemplo, cuando n = 17 el primer jugador puede quitar una o cuatro piedras. + + +Sea M (n) el número máximo de piedras que el primer jugador puede tomar de una posición ganadora en su primer turno y M (n) = 0 para cualquier otra posición. + + +∑M (n) para n≤100 es 728. + + +Encuentra ∑M (n) para n≤1018. +Da tu respuesta módulo 108. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler366() debe devolver 88351299. + testString: 'assert.strictEqual(euler366(), 88351299, "euler366() should return 88351299.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler366() { + // Good luck! + return true; +} + +euler366(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-367-bozo-sort.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-367-bozo-sort.spanish.md new file mode 100644 index 0000000000..8ff836bee5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-367-bozo-sort.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4db1000cf542c50ffee +challengeType: 5 +title: 'Problem 367: Bozo sort' +--- + +## Description +
+clasificación de Bozo, que no debe confundirse con la ordenación de bogo un poco menos eficiente, consiste en verificar si la secuencia de entrada está ordenada y, si no se está intercambiando, dos elementos al azar. Esto se repite hasta que finalmente se ordena la secuencia. + + +Si consideramos todas las permutaciones de los primeros 4 números naturales como entrada, el valor esperado del número de swaps, promediado en todos los 4! Secuencias de entrada es 24.75. +La secuencia ya ordenada toma 0 pasos. + + +En este problema consideramos la siguiente variante en bozo sort. +Si la secuencia no está en orden, seleccionamos tres elementos al azar y barajamos estos tres elementos al azar. +Todas las 3! = 6 permutaciones de esos tres elementos son igualmente probables. +La secuencia ya ordenada tomará 0 pasos. +Si consideramos todas las permutaciones de los primeros 4 números naturales como entrada, el valor esperado del número de shuffles, promediado en todos los 4! Secuencias de entrada es 27.5. +Considerar como secuencias de entrada las permutaciones de los primeros 11 números naturales. +Promediado sobre los 11! secuencias de entrada, ¿cuál es el número esperado de aleaciones que realizará este algoritmo de clasificación? + + +Da tu respuesta redondeada al entero más cercano. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler367() debe devolver 48271207. + testString: 'assert.strictEqual(euler367(), 48271207, "euler367() should return 48271207.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler367() { + // Good luck! + return true; +} + +euler367(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-368-a-kempner-like-series.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-368-a-kempner-like-series.spanish.md new file mode 100644 index 0000000000..9fb95fef81 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-368-a-kempner-like-series.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4dd1000cf542c50ffef +challengeType: 5 +title: 'Problem 368: A Kempner-like series' +--- + +## Description +
+Se sabe que la serie armónica $ 1 + \ dfrac {1} {2} + \ dfrac {1} {3} + \ dfrac {1} {4} + ... $ es divergente. + +Sin embargo, si omitimos de esta serie cada término donde el denominador tiene un 9, la serie converge notablemente en aproximadamente 22.9206766193. +Esta serie de armónicos modificada se llama la serie de Kempner. + +Consideremos ahora otra serie armónica modificada omitiendo de la serie armónica cada término donde el denominador tenga 3 o más dígitos consecutivos iguales. +Se puede verificar que de los primeros 1200 términos de la serie de armónicos, solo se omitirán 20 términos. +Estos 20 términos omitidos son: +$ \ dfrac {1} {111}, \ dfrac {1} {222}, \ dfrac {1} {333}, \ dfrac {1} {444}, \ dfrac {1 } {555}, \ dfrac {1} {666}, \ dfrac {1} {777}, \ dfrac {1} {888}, \ dfrac {1} {999}, \ dfrac {1} {1000}, \ dfrac {1} {1110}, \\\ \ dfrac {1} {1111}, \ dfrac {1} {1112}, \ dfrac {1} {1113}, \ dfrac {1} {1114}, \ dfrac {1} {1115}, \ dfrac {1} {1116}, \ dfrac {1} {1117}, \ dfrac {1} {1118}, \ dfrac {1} {1119} $ + +Esta serie converge como bien. + +Encuentra el valor al que la serie converge. +Da tu respuesta redondeada a 10 dígitos detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler368() debe devolver 253.6135092068. + testString: 'assert.strictEqual(euler368(), 253.6135092068, "euler368() should return 253.6135092068.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler368() { + // Good luck! + return true; +} + +euler368(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-369-badugi.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-369-badugi.spanish.md new file mode 100644 index 0000000000..12766ea703 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-369-badugi.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f4de1000cf542c50fff0 +challengeType: 5 +title: 'Problem 369: Badugi' +--- + +## Description +
+En una baraja de naipes estándar de 52 cartas, un juego de 4 cartas es un Badugi si contiene 4 cartas sin pares y sin dos cartas del mismo palo. + +Sea f (n) el número de formas de elegir n tarjetas con un subconjunto de 4 tarjetas que sea un Badugi. Por ejemplo, hay 2598960 formas de elegir cinco cartas de un mazo de 52 cartas estándar, de las cuales 514800 contienen un subconjunto de 4 cartas que es un Badugi, por lo que f (5) = 514800. + +Encuentra ∑f (n) para 4 ≤ n ≤ 13. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler369() debe devolver 862400558448. + testString: 'assert.strictEqual(euler369(), 862400558448, "euler369() should return 862400558448.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler369() { + // Good luck! + return true; +} + +euler369(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-37-truncatable-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-37-truncatable-primes.spanish.md new file mode 100644 index 0000000000..1a68929d70 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-37-truncatable-primes.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3911000cf542c50fea4 +challengeType: 5 +title: 'Problem 37: Truncatable primes' +--- + +## Description +
+El número 3797 tiene una propiedad interesante. Al ser primo, es posible eliminar continuamente dígitos de izquierda a derecha y permanecer primo en cada etapa: 3797, 797, 97 y 7. Del mismo modo, podemos trabajar de derecha a izquierda: 3797, 379, 37 y 3. +Encuentre la suma de los únicos n primarios n (8 <= n <= 11) que se pueden truncar de izquierda a derecha y de derecha a izquierda. +NOTA: 2, 3, 5 y 7 no se consideran primos que se pueden cortar. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: truncatablePrimes(8) debe devolver 1986. + testString: 'assert(truncatablePrimes(8) == 1986, "truncatablePrimes(8) should return 1986.");' + - text: truncatablePrimes(9) debe devolver 5123. + testString: 'assert(truncatablePrimes(9) == 5123, "truncatablePrimes(9) should return 5123.");' + - text: truncatablePrimes(10) debe devolver 8920. + testString: 'assert(truncatablePrimes(10) == 8920, "truncatablePrimes(10) should return 8920.");' + - text: truncatablePrimes(11) debe devolver 748317. + testString: 'assert(truncatablePrimes(11) == 748317, "truncatablePrimes(11) should return 748317.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function truncatablePrimes(n) { + // Good luck! + return n; +} + +truncatablePrimes(11); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-370-geometric-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-370-geometric-triangles.spanish.md new file mode 100644 index 0000000000..0ec1623078 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-370-geometric-triangles.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4de1000cf542c50fff1 +challengeType: 5 +title: 'Problem 370: Geometric triangles' +--- + +## Description +
+Definamos un triángulo geométrico como un triángulo de lados enteros con lados a ≤ b ≤ c, de modo que sus lados formen una progresión geométrica, es decir, b2 = a · c. + +Un ejemplo de tal triángulo geométrico es el triángulo con lados a = 144, b = 156 y c = 169. + +Hay 861805 triángulos geométricos con perímetro ≤ 106. + +¿Cuántos triángulos geométricos existen con el perímetro ≤ 2.5 · 1013? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler370() debe devolver 41791929448408. + testString: 'assert.strictEqual(euler370(), 41791929448408, "euler370() should return 41791929448408.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler370() { + // Good luck! + return true; +} + +euler370(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-371-licence-plates.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-371-licence-plates.spanish.md new file mode 100644 index 0000000000..f766d519a3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-371-licence-plates.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f4e01000cf542c50fff2 +challengeType: 5 +title: 'Problem 371: Licence plates' +--- + +## Description +
+Las placas de Oregon constan de tres letras seguidas por un número de tres dígitos (cada dígito puede ser de [0..9]). +Mientras conduce al trabajo, Seth juega el siguiente juego: +Siempre que el número de dos placas de matrícula visto en su viaje se suma a 1000, eso es una victoria. + + +Por ejemplo, MIC-012 y HAN-988 son una victoria y RYU-500 y SET-500 también. (Siempre y cuando los vea en el mismo viaje). + + +Encuentra el número esperado de platos que necesita ver para ganar. +Da tu respuesta redondeada a 8 lugares decimales detrás del punto decimal. + + +Nota: Suponemos que cada placa de matrícula vista es igualmente probable que tenga un número de tres dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler371() debe devolver 40.66368097. + testString: 'assert.strictEqual(euler371(), 40.66368097, "euler371() should return 40.66368097.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler371() { + // Good luck! + return true; +} + +euler371(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-372-pencils-of-rays.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-372-pencils-of-rays.spanish.md new file mode 100644 index 0000000000..6c46b03114 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-372-pencils-of-rays.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f4e11000cf542c50fff3 +challengeType: 5 +title: 'Problem 372: Pencils of rays' +--- + +## Description +
+Sea R (M, N) el número de puntos de la red (x, y) que satisfacen M 0 Podemos verificar que R (0, 100) = 3019 y R (100, 10000) = 29750422. +Encuentre R (2 · 106, 109). + + + +Nota: representa la función de piso. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler372() debe devolver 301450082318807040. + testString: 'assert.strictEqual(euler372(), 301450082318807040, "euler372() should return 301450082318807040.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler372() { + // Good luck! + return true; +} + +euler372(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-373-circumscribed-circles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-373-circumscribed-circles.spanish.md new file mode 100644 index 0000000000..9a93a34e8d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-373-circumscribed-circles.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4e11000cf542c50fff4 +challengeType: 5 +title: 'Problem 373: Circumscribed Circles' +--- + +## Description +
+Cada triángulo tiene un círculo circunscrito que atraviesa los tres vértices. +Considere todos los triángulos de lados enteros para los cuales el radio del círculo circunscrito también es integral. + + +Sea S (n) la suma de los radios de los círculos circunscritos de todos esos triángulos para los cuales el radio no exceda de n. + +S (100) = 4950 y S (1200) = 1653605. + + +Encuentra S (107). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler373() debe devolver 727227472448913. + testString: 'assert.strictEqual(euler373(), 727227472448913, "euler373() should return 727227472448913.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler373() { + // Good luck! + return true; +} + +euler373(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-374-maximum-integer-partition-product.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-374-maximum-integer-partition-product.spanish.md new file mode 100644 index 0000000000..a7ff714051 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-374-maximum-integer-partition-product.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f4e51000cf542c50fff6 +challengeType: 5 +title: 'Problem 374: Maximum Integer Partition Product' +--- + +## Description +
+Una partición entera de un número n es una forma de escribir n como una suma de enteros positivos. + +particiones que difieren solo en el orden de sus sumandos se consideran iguales. +Una partición de n en partes distintas es una partición de n en la que cada parte ocurre como máximo una vez. + +Las particiones de 5 en partes distintas son: +5, 4 + 1 y 3 + 2. + +Sea f (n) el producto máximo de las partes de cualquier partición de n en partes distintas y sea m (n) el número de elementos de cualquier partición de n con ese producto. + +Entonces f (5) = 6 y m (5) = 2. + +Para n = 10, la partición con el producto más grande es 10 = 2 + 3 + 5, lo que da f (10) = 30 y m (10) = 3. +Y su producto, f (10) · m (10) = 30 · 3 = 90 + +Se puede verificar que +∑f (n) · m (n) para 1 ≤ n ≤ 100 = 1683550844462. + +Buscar ∑f (n) · m (n) para 1 ≤ n ≤ 1014. +Da tu respuesta módulo 982451653, el 50 millones de primos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler374() debe devolver 334420941. + testString: 'assert.strictEqual(euler374(), 334420941, "euler374() should return 334420941.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler374() { + // Good luck! + return true; +} + +euler374(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-375-minimum-of-subsequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-375-minimum-of-subsequences.spanish.md new file mode 100644 index 0000000000..f75461c2f5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-375-minimum-of-subsequences.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f4e41000cf542c50fff5 +challengeType: 5 +title: 'Problem 375: Minimum of subsequences' +--- + +## Description +
+Sea Sn una secuencia entera producida con el siguiente generador de números pseudoaleatorios: +S0 += +290797 +Sn + 1 += +Sn2 mod 50515093 + + + +Sea A (i, j) el mínimo de los números Si, Si + 1, ..., Sj para i ≤ j. +Sea M (N) = ΣA (i, j) para 1 ≤ i ≤ j ≤ N. +Podemos verificar que M (10) = 432256955 y M (10 000) = 3264567774119. + + +Encuentre M (2 000) 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler375() debe devolver 7435327983715286000. + testString: 'assert.strictEqual(euler375(), 7435327983715286000, "euler375() should return 7435327983715286000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler375() { + // Good luck! + return true; +} + +euler375(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-377-sum-of-digits-experience-13.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-377-sum-of-digits-experience-13.spanish.md new file mode 100644 index 0000000000..f47a5d7613 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-377-sum-of-digits-experience-13.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4e51000cf542c50fff8 +challengeType: 5 +title: 'Problem 377: Sum of digits, experience 13' +--- + +## Description +
+Hay 16 enteros positivos que no tienen cero en sus dígitos y que tienen una suma digital igual a 5, a saber: +5, 14, 23, 32, 41, 113, 122, 131, 212, 221, 311, 1112, 1121, 1211, 2111 y 11111. +Su suma es 17891. + + +Sea f (n) la suma de todos los enteros positivos que no tienen cero en sus dígitos y tienen una suma digital igual a n. + + +Buscar $ \ displaystyle \ sum_ {i = 1} ^ {17} f (13 ^ i) $. +Da los últimos 9 dígitos como tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler377() debe devolver 732385277. + testString: 'assert.strictEqual(euler377(), 732385277, "euler377() should return 732385277.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler377() { + // Good luck! + return true; +} + +euler377(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-378-triangle-triples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-378-triangle-triples.spanish.md new file mode 100644 index 0000000000..34473ce4f3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-378-triangle-triples.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4e61000cf542c50fff9 +challengeType: 5 +title: 'Problem 378: Triangle Triples' +--- + +## Description +
+Sea T (n) el número del triángulo n, así que T (n) = + + +n (n + 1) 2 + +. + + +Sea dT (n) el número de divisores de T (n). +Por ejemplo: +T (7) = 28 y dT (7) = 6. + + +Sea Tr (n) el número de triples (i, j, k) de manera que 1 ≤ i <j <k ≤ n y dT (i)> dT (j)> dT (k). +Tr (20) = 14, Tr (100) = 5772 y Tr (1000) = 11174776. + + +Encuentra Tr (60 000 000). +Da los últimos 18 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler378() debe devolver 147534623725724700. + testString: 'assert.strictEqual(euler378(), 147534623725724700, "euler378() should return 147534623725724700.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler378() { + // Good luck! + return true; +} + +euler378(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-379-least-common-multiple-count.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-379-least-common-multiple-count.spanish.md new file mode 100644 index 0000000000..b0499e22f4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-379-least-common-multiple-count.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4e81000cf542c50fffa +challengeType: 5 +title: 'Problem 379: Least common multiple count' +--- + +## Description +
+Sea f (n) el número de parejas (x, y) con x e y enteros positivos, x ≤ y y el mínimo común múltiplo de x e y igual a n. + + +Sea g la función sumatoria de f, es decir: +g (n) = ∑ f (i) para 1 ≤ i ≤ n. + + +Te dan que g (106) = 37429395. + + +Encuentra g (1012). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler379() debe devolver 132314136838185. + testString: 'assert.strictEqual(euler379(), 132314136838185, "euler379() should return 132314136838185.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler379() { + // Good luck! + return true; +} + +euler379(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-38-pandigital-multiples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-38-pandigital-multiples.spanish.md new file mode 100644 index 0000000000..51295ca13d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-38-pandigital-multiples.spanish.md @@ -0,0 +1,101 @@ +--- +id: 5 +localeTitle: 5900f3931000cf542c50fea5 +challengeType: 5 +title: 'Problem 38: Pandigital multiples' +--- + +## Description +
+Tome el número 192 y multiplíquelo por cada uno de 1, 2 y 3: +192 × 1 = 192 +192 × 2 = 384 +192 × 3 = 576 +Al concatenar cada producto obtenemos el pandigital de 1 a 9, 192384576 Llamaremos a 192384576 el producto concatenado de 192 y (1, 2, 3). +Lo mismo se puede lograr comenzando con 9 y multiplicando por 1, 2, 3, 4 y 5, dando el pandigital, 918273645, que es el producto concatenado de 9 y (1, 2, 3, 4, 5). +¿Cuál es el número pandigital de 9 dígitos más grande que se puede formar como producto concatenado de un número entero con (1, 2, ..., n ) donde n > 1? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: pandigitalMultiples() debe devolver 932718654. + testString: 'assert.strictEqual(pandigitalMultiples(), 932718654, "pandigitalMultiples() should return 932718654.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function pandigitalMultiples() { + // Good luck! + return true; +} + +pandigitalMultiples(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function pandigitalMultiples() { + + function get9DigitConcatenatedProduct(num) { + // returns false if concatenated product is not 9 digits + let concatenatedProduct = num.toString(); + for (let i = 2; concatenatedProduct.length < 9; i++) { + concatenatedProduct += num * i; + } + return concatenatedProduct.length === 9 ? concatenatedProduct : false; + } + + function is1to9Pandigital(num) { + const numStr = num.toString(); + + // check if length is not 9 + if (numStr.length !== 9) { + return false; + } + + // check if pandigital + for (let i = 9; i > 0; i--) { + if (numStr.indexOf(i.toString()) === -1) { + return false; + } + } + return true; + } + + let largestNum = 0; + for (let i = 9999; i >= 9000; i--) { + const concatenatedProduct = get9DigitConcatenatedProduct(i); + if (is1to9Pandigital(concatenatedProduct) && concatenatedProduct > largestNum) { + largestNum = parseInt(concatenatedProduct); + break; + } + } + return largestNum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-380-amazing-mazes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-380-amazing-mazes.spanish.md new file mode 100644 index 0000000000..64b2022cef --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-380-amazing-mazes.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f4e81000cf542c50fffb +challengeType: 5 +title: 'Problem 380: Amazing Mazes!' +--- + +## Description +
+Un laberinto de m × n es una cuadrícula rectangular de m × n con muros colocados entre celdas de la cuadrícula, de modo que exista exactamente un camino desde el cuadrado superior izquierdo a cualquier otro cuadrado. Los siguientes son ejemplos de un laberinto de 9 × 12 y un laberinto de 15 × 20: + + + + +Sea C (m, n) el número de laberintos de m × n distintos. Los laberintos que pueden formarse por rotación y reflexión desde otro laberinto se consideran distintos. + + +Se puede verificar que C (1,1) = 1, C (2,2) = 4, C (3,4) = 2415 y C (9,12) = 2.5720e46 (en notación científica redondeada a 5 dígitos significativos). +Encuentre C (100,500) y escriba su respuesta en notación científica redondeada a 5 dígitos significativos. + + +Al dar su respuesta, use una e minúscula para separar la mantisa y el exponente. +Por ejemplo, si la respuesta es 1234567891011, entonces el formato de respuesta sería 1.2346e12. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler380() debe devolver el infinito. + testString: 'assert.strictEqual(euler380(), Infinity, "euler380() should return Infinity.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler380() { + // Good luck! + return true; +} + +euler380(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-382-generating-polygons.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-382-generating-polygons.spanish.md new file mode 100644 index 0000000000..c2c5fdcc1d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-382-generating-polygons.spanish.md @@ -0,0 +1,79 @@ +--- +id: 5 +localeTitle: 5900f4eb1000cf542c50fffd +challengeType: 5 +title: 'Problem 382: Generating polygons' +--- + +## Description +
+Un polígono es una forma plana que consiste en segmentos de línea recta que se unen para formar una cadena o circuito cerrado. Un polígono consta de al menos tres lados y no se intersecta por sí mismo. + + + +Se dice que un conjunto S de números positivos genera un polígono P si: no hay dos lados de P que tengan la misma longitud, +la longitud de cada lado de P está en S, y +S no tiene otro valor. + +Por ejemplo: +El conjunto {3, 4, 5} genera un polígono con los lados 3, 4 y 5 (un triángulo). +El conjunto {6, 9, 11, 24} genera un polígono con los lados 6, 9, 11 y 24 (un cuadrilátero). +Los conjuntos {1, 2, 3} y {2, 3, 4, 9} no generan ningún polígono. + + +Considere la secuencia s, que se define a continuación: s1 = 1, s2 = 2, s3 = 3 +sn = sn-1 + sn-3 para n> 3. + +Sea Un conjunto {s1, s2, ..., sn}. Por ejemplo, U10 = {1, 2, 3, 4, 6, 9, 13, 19, 28, 41}. +Sea f (n) el número de subconjuntos de Un que generan al menos un polígono. +Por ejemplo, f (5) = 7, f (10) = 501 y f (25) = 18635853. + + + +Encuentre los últimos 9 dígitos de f (1018). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler382() debe devolver 697003956. + testString: 'assert.strictEqual(euler382(), 697003956, "euler382() should return 697003956.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler382() { + // Good luck! + return true; +} + +euler382(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-383-divisibility-comparison-between-factorials.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-383-divisibility-comparison-between-factorials.spanish.md new file mode 100644 index 0000000000..fb95bec468 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-383-divisibility-comparison-between-factorials.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4ed1000cf542c50ffff +challengeType: 5 +title: 'Problem 383: Divisibility comparison between factorials' +--- + +## Description +
+Sea f5 (n) el entero más grande x para el que 5x divide n. +Por ejemplo, f5 (625000) = 7. + + + +Sea T5 (n) el número de enteros i que satisfacen f5 ((2 · i-1)!) <2 · f5 (i!) Y 1 ≤ i ≤ n. +Se puede verificar que T5 (103) = 68 y T5 (109) = 2408210. + + + +Encuentre T5 (1018). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler383() debe devolver 22173624649806. + testString: 'assert.strictEqual(euler383(), 22173624649806, "euler383() should return 22173624649806.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler383() { + // Good luck! + return true; +} + +euler383(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-384-rudin-shapiro-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-384-rudin-shapiro-sequence.spanish.md new file mode 100644 index 0000000000..fbdee37a68 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-384-rudin-shapiro-sequence.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f4ed1000cf542c50fffe +challengeType: 5 +title: 'Problem 384: Rudin-Shapiro sequence' +--- + +## Description +
+Defina la secuencia a (n) como el número de pares adyacentes en la expansión binaria de n (posiblemente superpuesta). +Por ejemplo: a (5) = a (1012) = 0, a (6) = a (1102) = 1, a (7) = a (1112) = 2 + +Defina la secuencia b (n) = (- 1) a (n). +Esta secuencia se llama la secuencia de Rudin-Shapiro. +Considera también la secuencia sumatoria de b (n):. + +El primer par de valores de estas secuencias son: +n 0 1 2 3 4 5 6 7 +a (n) 0 0 0 1 0 0 1 2 +b (n) 1 1 1 -1 1 1 -1 1 +s (n) 1 2 3 2 3 4 3 4 + +La secuencia s (n) tiene la propiedad notable de que todos los elementos son positivos y que cada entero positivo k se produce exactamente k veces. + +Defina g (t, c), con 1 ≤ c ≤ t, como el índice en s (n) para el que t aparece por c'th vez en s (n). +Por ejemplo: g (3,3) = 6, g (4,2) = 7 y g (54321,12345) = 1220847710. + +Sea F (n) la secuencia de fibonacci definida por: +F (0) = F (1) = 1 y +F (n) = F (n-1) + F (n-2) para n> 1. + +Defina GF (t) = g (F (t), F (t-1)). + +Encuentra ΣGF (t) para 2≤t≤45. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler384() debe devolver 3354706415856333000. + testString: 'assert.strictEqual(euler384(), 3354706415856333000, "euler384() should return 3354706415856333000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler384() { + // Good luck! + return true; +} + +euler384(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-385-ellipses-inside-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-385-ellipses-inside-triangles.spanish.md new file mode 100644 index 0000000000..aaa2e670e4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-385-ellipses-inside-triangles.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f4ee1000cf542c510000 +challengeType: 5 +title: 'Problem 385: Ellipses inside triangles' +--- + +## Description +
+Para cualquier triángulo T en el plano, se puede mostrar que hay una elipse única con el área más grande que está completamente dentro de T. + + + +Para una n dada, considere los triángulos T de manera que: +- los vértices de T tienen coordenadas enteras con valor absoluto ≤ n, y +: los focos1 de la elipse de área más grande dentro de T son (√13,0) y (-√13,0). +Sea A (n) la suma de las áreas de todos estos triángulos. + + +Por ejemplo, si n = 8, hay dos triángulos de este tipo. Sus vértices son (-4, -3), (- 4,3), (8,0) y (4,3), (4, -3), (- 8,0), y el área de cada triángulo es 36. Por lo tanto, A (8) = 36 + 36 = 72. + + +Se puede verificar que A (10) = 252, A (100) = 34632 y A (1000) = 3529008. + + +Encuentre A ( 1 000 000 000). + + + +1Los focos (plural de enfoque) de una elipse son dos puntos A y B, de manera que para cada punto P en el límite de la elipse, AP + PB es constante. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler385() debe devolver 3776957309612154000. + testString: 'assert.strictEqual(euler385(), 3776957309612154000, "euler385() should return 3776957309612154000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler385() { + // Good luck! + return true; +} + +euler385(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-386-maximum-length-of-an-antichain.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-386-maximum-length-of-an-antichain.spanish.md new file mode 100644 index 0000000000..b18a13404b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-386-maximum-length-of-an-antichain.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f4ef1000cf542c510001 +challengeType: 5 +title: 'Problem 386: Maximum length of an antichain' +--- + +## Description +
+Sea n un entero y S (n) el conjunto de factores de n. + +Un subconjunto A de S (n) se denomina anticadena de S (n) si A contiene solo un elemento o si ninguno de los elementos de A divide alguno de los otros elementos de A. + +Por ejemplo: S (30) ) = {1, 2, 3, 5, 6, 10, 15, 30} +{2, 5, 6} no es un antichain de S (30). +{2, 3, 5} es un anticadeno de S (30). + +Sea N (n) la longitud máxima de un anticadeno de S (n). + +Encuentra ΣN (n) para 1 ≤ n ≤ 108 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler386() debe devolver 528755790. + testString: 'assert.strictEqual(euler386(), 528755790, "euler386() should return 528755790.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler386() { + // Good luck! + return true; +} + +euler386(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-387-harshad-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-387-harshad-numbers.spanish.md new file mode 100644 index 0000000000..0c89b4e728 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-387-harshad-numbers.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4f11000cf542c510003 +challengeType: 5 +title: 'Problem 387: Harshad Numbers' +--- + +## Description +
+Un número Harshad o Niven es un número que es divisible por la suma de sus dígitos. +201 es un número de Harshad porque es divisible por 3 (la suma de sus dígitos). +Cuando truncamos el último dígito de 201, obtenemos 20, que es un número de Harshad. +Cuando truncamos el último dígito de 20, obtenemos 2, que también es un número de Harshad. +Llamemos a un número de Harshad que, al truncar recursivamente el último dígito, siempre da como resultado que un número de Harshad sea un número de Harshad correcto truncable. + +También: +201/3 = 67, que es primo. +Llamemos a un número de Harshad que, cuando se divide por la suma de sus dígitos, da como resultado un número primo de Harshad fuerte. + +Ahora toma el número 2011 que es primo. +Cuando truncamos el último dígito, obtenemos 201, un número de Harshad fuerte que también se puede truncar. +Llamemos a estos primos fuertes, primos de Harshad truncables a la derecha. + +Se da por hecho que la suma de los números primos de Harshad fuertes y truncables a la derecha menores que 10000 es 90619. + +Halla la suma de los números primos de Harshad fuertes y truncables a la derecha que son menores de 1014. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler387() debe devolver 696067597313468. + testString: 'assert.strictEqual(euler387(), 696067597313468, "euler387() should return 696067597313468.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler387() { + // Good luck! + return true; +} + +euler387(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-388-distinct-lines.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-388-distinct-lines.spanish.md new file mode 100644 index 0000000000..569f45a0ac --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-388-distinct-lines.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4f11000cf542c510002 +challengeType: 5 +title: 'Problem 388: Distinct Lines' +--- + +## Description +
+Considere todos los puntos de la red (a, b, c) con 0 ≤ a, b, c ≤ N. + + +Desde el origen O (0,0,0), todas las líneas se dibujan en los otros puntos de la red. +Sea D (N) el número de líneas distintas. + + +Se le da que D (1 000 000) = 831909254469114121. + +Encuentre D (1010). Da como respuesta los primeros nueve dígitos seguidos de los últimos nueve dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler388() debe devolver 831907372805130000. + testString: 'assert.strictEqual(euler388(), 831907372805130000, "euler388() should return 831907372805130000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler388() { + // Good luck! + return true; +} + +euler388(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-389-platonic-dice.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-389-platonic-dice.spanish.md new file mode 100644 index 0000000000..c0ba433890 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-389-platonic-dice.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f4f21000cf542c510004 +challengeType: 5 +title: 'Problem 389: Platonic Dice' +--- + +## Description +
+Se lanza un dado de 4 caras sin sesgo y su valor, T, se anota. Se lanzan dados de 6 caras sin sesgo y se suman sus puntuaciones. Se anota la suma de C. Se lanzan dados imparciales de 8 lados y se suman sus puntuaciones. Se anota la suma, O. Se lanzan dados imparciales de 12 lados y se suman sus puntuaciones. Se anota la suma, D. Se lanzan dados imparciales de 20 lados y se suman sus puntuaciones. La suma, yo, se anota. +Encuentra la varianza de I y da tu respuesta redondeada a 4 lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler389() debe devolver 2406376.3623. + testString: 'assert.strictEqual(euler389(), 2406376.3623, "euler389() should return 2406376.3623.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler389() { + // Good luck! + return true; +} + +euler389(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-39-integer-right-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-39-integer-right-triangles.spanish.md new file mode 100644 index 0000000000..a9d47a6ece --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-39-integer-right-triangles.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3931000cf542c50fea6 +challengeType: 5 +title: 'Problem 39: Integer right triangles' +--- + +## Description +
+Si p es el perímetro de un triángulo rectángulo con lados de longitud integral, {a, b, c}, hay exactamente tres soluciones para p = 120. +{20,48,52}, {24,45,51} , {30,40,50} +Para qué valor de p ≤ n, se maximiza el número de soluciones? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: intRightTriangles(500) debe devolver 420. + testString: 'assert(intRightTriangles(500) == 420, "intRightTriangles(500) should return 420.");' + - text: intRightTriangles(800) debe devolver 420. + testString: 'assert(intRightTriangles(800) == 420, "intRightTriangles(800) should return 420.");' + - text: intRightTriangles(900) debe devolver 840. + testString: 'assert(intRightTriangles(900) == 840, "intRightTriangles(900) should return 840.");' + - text: intRightTriangles(1000) debe devolver 840. + testString: 'assert(intRightTriangles(1000) == 840, "intRightTriangles(1000) should return 840.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function intRightTriangles(n) { + // Good luck! + return n; +} + +intRightTriangles(1000); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-390-triangles-with-non-rational-sides-and-integral-area.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-390-triangles-with-non-rational-sides-and-integral-area.spanish.md new file mode 100644 index 0000000000..40c06cd5f4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-390-triangles-with-non-rational-sides-and-integral-area.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4f21000cf542c510005 +challengeType: 5 +title: 'Problem 390: Triangles with non rational sides and integral area' +--- + +## Description +
+Considera el triángulo con lados √5, √65 y √68. +Se puede mostrar que este triángulo tiene área 9. + +S (n) es la suma de las áreas de todos los triángulos con lados √ (1 + b2), √ (1 + c2) y √ (b2 + c2) ( para enteros positivos b y c) que tienen un área integral que no exceda de n. + +El triángulo de ejemplo tiene b = 2 y c = 8. + +S (106) = 18018206. + +Encuentra S (1010). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler390() debe devolver 2919133642971. + testString: 'assert.strictEqual(euler390(), 2919133642971, "euler390() should return 2919133642971.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler390() { + // Good luck! + return true; +} + +euler390(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-391-hopping-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-391-hopping-game.spanish.md new file mode 100644 index 0000000000..ef89c873ae --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-391-hopping-game.spanish.md @@ -0,0 +1,83 @@ +--- +id: 5 +localeTitle: 5900f4f31000cf542c510006 +challengeType: 5 +title: 'Problem 391: Hopping Game' +--- + +## Description +
+Sea sk el número de 1 al escribir los números de 0 a k en binario. +Por ejemplo, escribiendo 0 a 5 en binario, tenemos 0, 1, 10, 11, 100, 101. Hay siete 1, entonces s5 = 7. +La secuencia S = {sk: k ≥ 0} comienza {0 , 1, 2, 4, 5, 7, 9, 12, ...}. + + +Un juego es jugado por dos jugadores. Antes de que comience el juego, se elige un número n. Un contador c comienza en 0. En cada turno, el jugador elige un número de 1 a n (inclusive) y aumenta c en ese número. El valor resultante de c debe ser un miembro de S. Si no hay más movimientos válidos, el jugador pierde. + + + +Por ejemplo: +Sea n = 5. c comienza en 0. +jugador 1 elige 4, por lo que c se convierte en 0 + 4 = 4. +jugador 2 elige 5, entonces c se convierte en 4 + 5 = 9. +1 elige 3, por lo que c se convierte en 9 + 3 = 12. +etc. +Ten en cuenta que c siempre debe pertenecer a S, y cada jugador puede aumentar c en a lo sumo n. + + + +Deje que M (n) sea el número más alto que el primer jugador puede elegir en su primer turno para forzar una victoria, y M (n) = 0 si no hay tal movimiento. Por ejemplo, M (2) = 2, M (7) = 1 y M (20) = 4. + + + +Dado Σ (M (n)) 3 = 8150 para 1 ≤ n ≤ 20. + + + +Encuentre Σ (M (n)) 3 para 1 ≤ n ≤ 1000. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler391() debe devolver 61029882288. + testString: 'assert.strictEqual(euler391(), 61029882288, "euler391() should return 61029882288.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler391() { + // Good luck! + return true; +} + +euler391(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-392-enmeshed-unit-circle.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-392-enmeshed-unit-circle.spanish.md new file mode 100644 index 0000000000..e974e072ac --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-392-enmeshed-unit-circle.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4f41000cf542c510007 +challengeType: 5 +title: 'Problem 392: Enmeshed unit circle' +--- + +## Description +
+Una cuadrícula rectilínea es una cuadrícula ortogonal donde el espaciado entre las líneas de cuadrícula no tiene que ser equidistante. +Un ejemplo de dicha cuadrícula es el papel gráfico logarítmico. + + +Considere las cuadrículas rectilíneas en el sistema de coordenadas cartesianas con las siguientes propiedades: Las líneas de cuadrícula son paralelas a los ejes del sistema de coordenadas cartesianas. Existen N + 2 verticales y N + 2 horizontales. Por lo tanto, hay (N + 1) x (N + 1) celdas rectangulares. Las ecuaciones de las dos líneas verticales exteriores son x = -1 yx = 1.Las ecuaciones de las dos líneas horizontales exteriores son y = -1 e y = 1.Las celdas de la cuadrícula están coloreadas en rojo si se superponen con el círculo unitario, de lo contrario, en negro. Para este problema, nos gustaría que encuentre las posiciones de las N restantes líneas horizontales internas y N internas verticales para que el área ocupada por el rojo Se minimizan las células. + + +Por ejemplo, aquí hay una imagen de la solución para N = 10: + + + + +El área ocupada por las celdas rojas para N = 10 redondeada a 10 dígitos detrás del punto decimal es 3.3469640797. + + +Encuentra las posiciones para N = 400. +Da como respuesta el área ocupada por las celdas rojas redondeadas a 10 dígitos detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler392() debe devolver 3.1486734435. + testString: 'assert.strictEqual(euler392(), 3.1486734435, "euler392() should return 3.1486734435.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler392() { + // Good luck! + return true; +} + +euler392(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-393-migrating-ants.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-393-migrating-ants.spanish.md new file mode 100644 index 0000000000..d180ff78d1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-393-migrating-ants.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f4f61000cf542c510008 +challengeType: 5 +title: 'Problem 393: Migrating ants' +--- + +## Description +
+Una cuadrícula n × n de cuadrados contiene n2 hormigas, una hormiga por cuadrado. +Todas las hormigas deciden moverse simultáneamente a un cuadrado adyacente (generalmente 4 posibilidades, excepto las hormigas en el borde de la cuadrícula o en las esquinas). +Definimos f (n) como el número de formas en que esto puede suceder sin que ninguna hormiga termine en el mismo cuadrado y sin que dos hormigas crucen el mismo borde entre dos cuadrados. + + +Se le da que f (4) = 88. +Encuentre f (10). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler393() debe devolver 112398351350823100. + testString: 'assert.strictEqual(euler393(), 112398351350823100, "euler393() should return 112398351350823100.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler393() { + // Good luck! + return true; +} + +euler393(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-394-eating-pie.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-394-eating-pie.spanish.md new file mode 100644 index 0000000000..70ffca0540 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-394-eating-pie.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f4f71000cf542c510009 +challengeType: 5 +title: 'Problem 394: Eating pie' +--- + +## Description +
+Jeff come un pastel de una manera inusual. +El pastel es circular. Comienza con cortar un corte inicial en el pastel a lo largo de un radio. +Si bien queda al menos una fracción dada de la tarta F, realiza el siguiente procedimiento: +- Hace dos rebanadas desde el centro de la tarta a cualquier punto del borde restante de la tarta, cualquier punto en el borde de la tarta restante por igual probable. Esto dividirá el pastel restante en tres partes. +- Yendo en sentido contrario a las manecillas del reloj desde el corte inicial, toma las dos primeras piezas de pastel y se las come. +Cuando queda menos de una fracción F de pastel, no repite este procedimiento. En su lugar, se come todo el pastel restante. + + + + + + +Para x ≥ 1, sea E (x) el número esperado de veces que Jeff repita el procedimiento anterior con F = 1 / x. +Se puede verificar que E (1) = 1, E (2) ≈ 1.2676536759, y E (7.5) 2.1215732071. + + +Encuentre E (40) redondeado a 10 lugares decimales detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler394() debe devolver 3.2370342194. + testString: 'assert.strictEqual(euler394(), 3.2370342194, "euler394() should return 3.2370342194.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler394() { + // Good luck! + return true; +} + +euler394(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-395-pythagorean-tree.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-395-pythagorean-tree.spanish.md new file mode 100644 index 0000000000..06f881f1a6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-395-pythagorean-tree.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f4f71000cf542c51000a +challengeType: 5 +title: 'Problem 395: Pythagorean tree' +--- + +## Description +
+El árbol de Pitágoras es un fractal generado por el siguiente procedimiento: + + + +Comienza con una unidad cuadrada. Luego, llamando a uno de los lados su base (en la animación, el lado inferior es la base): +Coloque un triángulo rectángulo en el lado opuesto a la base, coincidiendo la hipotenusa con ese lado y los lados en un 3-4. -5 ratio. Tenga en cuenta que el lado más pequeño del triángulo debe estar en el lado "derecho" con respecto a la base (vea la animación). +Coloque un cuadrado en cada pata del triángulo rectángulo, con uno de sus lados que coincida con esa pata. +Repita este procedimiento para ambos cuadrados, considerando como sus bases los lados que tocan el triángulo. + +La figura resultante, después de un número infinito de iteraciones, es el árbol pitagórico. + + + + + +Se puede mostrar que existe al menos un rectángulo, cuyos lados son paralelos al cuadrado más grande del árbol de Pitágoras, que encierra el árbol de Pitágoras por completo. + + +Encuentre el área más pequeña posible para tal rectángulo delimitador, y dé su respuesta redondeada a 10 decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler395() debe devolver 28.2453753155. + testString: 'assert.strictEqual(euler395(), 28.2453753155, "euler395() should return 28.2453753155.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler395() { + // Good luck! + return true; +} + +euler395(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-396-weak-goodstein-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-396-weak-goodstein-sequence.spanish.md new file mode 100644 index 0000000000..72cc52cbb7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-396-weak-goodstein-sequence.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f4f81000cf542c51000b +challengeType: 5 +title: 'Problem 396: Weak Goodstein sequence' +--- + +## Description +
+Para cualquier entero positivo n, la enésima secuencia de Goodstein débil {g1, g2, g3, ...} se define como: +g1 = n +para k> 1, gk se obtiene escribiendo gk-1 en la base k, interpretando como una base k + 1, y restando 1. + +La secuencia termina cuando gk se convierte en 0. + + +Por ejemplo, la sexta secuencia de Goodstein débil es {6, 11, 17, 25, ...}: +g1 = 6. +g2 = 11 porque 6 = 1102, 1103 = 12, y 12 - 1 = 11. +g3 = 17 desde 11 = 1023, 1024 = 18, y 18 - 1 = 17. +g4 = 25 desde 17 = 1014, 1015 = 26 y 26 - 1 = 25. + +y así sucesivamente. + + +Se puede mostrar que cada secuencia de Goodstein débil termina. + + +Sea G (n) el número de elementos distintos de cero en la enésima secuencia de Goodstein débil. +Se puede verificar que G (2) = 3, G (4) = 21 y G (6) = 381. +También se puede verificar que ΣG (n) = 2517 para 1 ≤ n <8. + + +Encuentre los últimos 9 dígitos de ΣG (n) para 1 ≤ n <16. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler396() debe devolver 173214653. + testString: 'assert.strictEqual(euler396(), 173214653, "euler396() should return 173214653.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler396() { + // Good luck! + return true; +} + +euler396(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-397-triangle-on-parabola.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-397-triangle-on-parabola.spanish.md new file mode 100644 index 0000000000..a5696d40e7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-397-triangle-on-parabola.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f4f91000cf542c51000c +challengeType: 5 +title: 'Problem 397: Triangle on parabola' +--- + +## Description +
+En la parábola y = x2 / k, se eligen tres puntos A (a, a2 / k), B (b, b2 / k) y C (c, c2 / k). + + +Sea F (K, X) el número de los cuádruples enteros (k, a, b, c) de manera que al menos un ángulo del triángulo ABC sea de 45 grados, con 1 ≤ k ≤ K y -X ≤ a <b <c ≤ X. + + +Por ejemplo, F (1, 10) = 41 y F (10, 100) = 12492. +Encuentre F (106, 109). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler397() debe devolver 141630459461893730. + testString: 'assert.strictEqual(euler397(), 141630459461893730, "euler397() should return 141630459461893730.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler397() { + // Good luck! + return true; +} + +euler397(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-398-cutting-rope.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-398-cutting-rope.spanish.md new file mode 100644 index 0000000000..0c61bddd57 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-398-cutting-rope.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f4fa1000cf542c51000d +challengeType: 5 +title: 'Problem 398: Cutting rope' +--- + +## Description +
+Dentro de una cuerda de longitud n, se colocan n-1 puntos con una distancia de 1 entre sí y desde los puntos finales. Entre estos puntos, elegimos m-1 puntos al azar y cortamos la cuerda en estos puntos para crear m segmentos. + + +Sea E (n, m) la longitud esperada del segundo segmento más corto. +Por ejemplo, E (3, 2) = 2 y E (8, 3) = 16/7. +Tenga en cuenta que si varios segmentos tienen la misma longitud más corta, la longitud del segundo segmento más corto se define como la longitud más corta. + + +Encuentra E (107, 100). +Da tu respuesta redondeada a 5 lugares decimales detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler398() debe devolver 2010.59096. + testString: 'assert.strictEqual(euler398(), 2010.59096, "euler398() should return 2010.59096.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler398() { + // Good luck! + return true; +} + +euler398(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-399-squarefree-fibonacci-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-399-squarefree-fibonacci-numbers.spanish.md new file mode 100644 index 0000000000..67bbdecd63 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-399-squarefree-fibonacci-numbers.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f4fc1000cf542c51000e +challengeType: 5 +title: 'Problem 399: Squarefree Fibonacci Numbers' +--- + +## Description +
+Los primeros 15 números de fibonacci son: +1,1,2,3,5,8,13,21,34,55,89,144,233,377,610. +Se puede ver que 8 y 144 no son cuadrados libres: 8 es divisible por 4 y 144 es divisible por 4 y por 9. +Así que los primeros 13 números de fibonacci cuadrados libres son: +1,1,2,3,5,13 , 21,34,55,89,233,377 y 610. + + +El número de fibonacci número 200 número cuadrado es: +971183874599339129547649988289594072811608739584170445. +Los últimos dieciséis dígitos de este número son: 1608739584170445 y en Scientific Number este número puede ser comprado. + + +Encuentre el número de 000 000 000 de fibonacci sin cuadrados. +Indique en su respuesta los últimos dieciséis dígitos seguidos de una coma seguida del número en notación científica (redondeado a un dígito después del punto decimal). +Para el número 200 de squarefree, la respuesta habría sido: 1608739584170445,9.7e53 + + + +Nota: +Para este problema, suponga que para cada primo p, el primer número de fibonacci divisible por p no es divisible por p2 (esto es parte de la conjetura de Wall). Esto se ha verificado para números primos ≤ 3 · 1015, pero no se ha probado en general. + +Si sucede que la conjetura es falsa, no se garantiza que la respuesta aceptada a este problema sea el número de 100 000 000 de fibonacci sin cuadrar cuadrado, sino que representa solo un límite inferior para ese número. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' euler399() debe devolver 1508395636674243, 6.5e27330467.' + testString: 'assert.strictEqual(euler399(), 1508395636674243, 6.5e27330467, "euler399() should return 1508395636674243, 6.5e27330467.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler399() { + // Good luck! + return true; +} + +euler399(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-4-largest-palindrome-product.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-4-largest-palindrome-product.spanish.md new file mode 100644 index 0000000000..e255aff75b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-4-largest-palindrome-product.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f3701000cf542c50fe83 +challengeType: 5 +title: 'Problem 4: Largest palindrome product' +--- + +## Description +
+Un número palindrómico se lee igual en ambos sentidos. El palíndromo más grande hecho del producto de dos números de 2 dígitos es 9009 = 91 × 99. +Encuentre el palíndromo más grande hecho del producto de dos números de n dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: largestPalindromeProduct(2) debe devolver 9009. + testString: 'assert.strictEqual(largestPalindromeProduct(2), 9009, "largestPalindromeProduct(2) should return 9009.");' + - text: largestPalindromeProduct(3) debería devolver 906609. + testString: 'assert.strictEqual(largestPalindromeProduct(3), 906609, "largestPalindromeProduct(3) should return 906609.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function largestPalindromeProduct(n) { + // Good luck! + return true; +} + +largestPalindromeProduct(3); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const largestPalindromeProduct = (digit)=>{ + let start = 1; + let end = Number(`1e${digit}`) - 1; + let palindrome = []; + for(let i=start;i<=end;i++){ + for(let j=start;j<=end;j++){ + let product = i*j; + let palindromeRegex = /\b(\d)(\d?)(\d?).?\3\2\1\b/gi; + palindromeRegex.test(product) && palindrome.push(product); + } + } + return Math.max(...palindrome); +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-400-fibonacci-tree-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-400-fibonacci-tree-game.spanish.md new file mode 100644 index 0000000000..2b0dae7239 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-400-fibonacci-tree-game.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f4fe1000cf542c510010 +challengeType: 5 +title: 'Problem 400: Fibonacci tree game' +--- + +## Description +
+Un árbol de Fibonacci es un árbol binario recursivamente definido como: T (0) es el árbol vacío. +T (1) es el árbol binario con un solo nodo. +T (k) consiste en un nodo raíz que tiene T (k-1) y T (k-2) como hijos. + +En tal árbol, dos jugadores juegan un juego para llevar. En cada turno, un jugador selecciona un nodo y elimina ese nodo junto con el subárbol arraigado en ese nodo. +El jugador que está obligado a tomar el nodo raíz de todo el árbol pierde. + + +Estos son los movimientos ganadores del primer jugador en el primer turno para T (k) de k = 1 a k = 6. + + + + +Sea f (k) el número de movimientos ganadores del primer jugador (es decir, los movimientos para los cuales el segundo jugador no tiene una estrategia ganadora) en el primer turno del juego cuando este juego se juega en T (k ). + + + +Por ejemplo, f (5) = 1 y f (10) = 17. + + + +Encuentre f (10000). Da los últimos 18 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler400() debe devolver 438505383468410600. + testString: 'assert.strictEqual(euler400(), 438505383468410600, "euler400() should return 438505383468410600.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler400() { + // Good luck! + return true; +} + +euler400(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-401-sum-of-squares-of-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-401-sum-of-squares-of-divisors.spanish.md new file mode 100644 index 0000000000..ce4c4a855f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-401-sum-of-squares-of-divisors.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f4fd1000cf542c51000f +challengeType: 5 +title: 'Problem 401: Sum of squares of divisors' +--- + +## Description +
+Los divisores de 6 son 1,2,3 y 6. +La suma de los cuadrados de estos números es 1 + 4 + 9 + 36 = 50. + + +Sea sigma2 (n) la suma de los cuadrados de los divisores de n. +Así sigma2 (6) = 50. + +Deje que SIGMA2 represente la función sumatoria de sigma2, que es SIGMA2 (n) = ∑sigma2 (i) para i = 1 a n. +Los primeros 6 valores de SIGMA2 son: 1,6,16,37,63 y 113. + + +Encuentra SIGMA2 (1015) módulo 109. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler401() debe devolver 281632621. + testString: 'assert.strictEqual(euler401(), 281632621, "euler401() should return 281632621.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler401() { + // Good luck! + return true; +} + +euler401(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-402-integer-valued-polynomials.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-402-integer-valued-polynomials.spanish.md new file mode 100644 index 0000000000..4bb5d10ca0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-402-integer-valued-polynomials.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f4ff1000cf542c510011 +challengeType: 5 +title: 'Problem 402: Integer-valued polynomials' +--- + +## Description +
+Se puede mostrar que el polinomio n4 + 4n3 + 2n2 + 5n es un múltiplo de 6 para cada entero n. También se puede mostrar que 6 es el mayor entero que satisface esta propiedad. + + +Defina M (a, b, c) como el máximo m tal que n4 + an3 + bn2 + cn es un múltiplo de m para todos los enteros n. Por ejemplo, M (4, 2, 5) = 6. + + +También, defina S (N) como la suma de M (a, b, c) para todos 0 <a, b, c ≤ N. + + +Podemos verificar que S (10) = 1972 y S (10000) = 2024258331114. + + +Sea Fk la secuencia de Fibonacci: +F0 = 0, F1 = 1 y +Fk = Fk-1 + Fk-2 para k ≥ 2. + + +Encuentra los últimos 9 dígitos de Σ S (Fk) para 2 ≤ k ≤ 1234567890123. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler402() debe devolver 356019862. + testString: 'assert.strictEqual(euler402(), 356019862, "euler402() should return 356019862.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler402() { + // Good luck! + return true; +} + +euler402(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.spanish.md new file mode 100644 index 0000000000..12da1b4d1d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-403-lattice-points-enclosed-by-parabola-and-line.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f5001000cf542c510013 +challengeType: 5 +title: 'Problem 403: Lattice points enclosed by parabola and line' +--- + +## Description +
+Para los enteros ayb, definimos D (a, b) como el dominio encerrado por la parábola y = x2 y la línea y = a · x + b: D (a, b) = {(x, y) | x2 ≤ y ≤ a · x + b}. + + +L (a, b) se define como el número de puntos de red contenidos en D (a, b). +Por ejemplo, L (1, 2) = 8 y L (2, -1) = 1. + + +También definimos S (N) como la suma de L (a, b) para todos los pares (a, b) de modo que el área de D (a, b) sea un número racional y | a |, | b | ≤ N. +Podemos verificar que S (5) = 344 y S (100) = 26709528. + + +Encuentre S (1012). Da tu respuesta mod 108. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler403() debe devolver 18224771. + testString: 'assert.strictEqual(euler403(), 18224771, "euler403() should return 18224771.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler403() { + // Good luck! + return true; +} + +euler403(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-404-crisscross-ellipses.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-404-crisscross-ellipses.spanish.md new file mode 100644 index 0000000000..17d5037dcf --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-404-crisscross-ellipses.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f5001000cf542c510012 +challengeType: 5 +title: 'Problem 404: Crisscross Ellipses' +--- + +## Description +
+Ea es una elipse con una ecuación de la forma x2 + 4y2 = 4a2. +Ea 'es la imagen girada de Ea en θ grados hacia la izquierda alrededor del origen O (0, 0) para 0 ° <θ <90 °. + + + + + + +b es la distancia al origen de los dos puntos de intersección más cercanos al origen yc es la distancia de los otros dos puntos de intersección. +Llamamos a un triplete ordenado (a, b, c) un triplete elipsoidal canónico si a, b y c son números enteros positivos. +Por ejemplo, (209, 247, 286) es un triplete elipsoidal canónico. + + + +Sea C (N) el número de tripletes elipsoidales canónicos distintos (a, b, c) para a ≤ N. +Se puede verificar que C (103) = 7, C (104) = 106 y C (106) = 11845. + + + +Encuentra C (1017). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler404() debe devolver 1199215615081353. + testString: 'assert.strictEqual(euler404(), 1199215615081353, "euler404() should return 1199215615081353.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler404() { + // Good luck! + return true; +} + +euler404(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-405-a-rectangular-tiling.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-405-a-rectangular-tiling.spanish.md new file mode 100644 index 0000000000..8d646127b6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-405-a-rectangular-tiling.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f5021000cf542c510014 +challengeType: 5 +title: 'Problem 405: A rectangular tiling' +--- + +## Description +
+Queremos embaldosar un rectángulo cuya longitud es el doble de su ancho. +Sea T (0) el mosaico que consiste en un solo rectángulo. +Para n> 0, obtenga T (n) de T (n-1) reemplazando todos los mosaicos de la siguiente manera: + + + + + + +La siguiente animación muestra las inclinaciones T (n) para n desde 0 a 5: + + + + + + +Sea f (n) el número de puntos donde se encuentran cuatro mosaicos en T (n). +Por ejemplo, f (1) = 0, f (4) = 82 y f (109) mod 177 = 126897180. + + + +Encuentre f (10k) para k = 1018, dé su respuesta módulo 177. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler405() debe devolver 237696125. + testString: 'assert.strictEqual(euler405(), 237696125, "euler405() should return 237696125.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler405() { + // Good luck! + return true; +} + +euler405(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-407-idempotents.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-407-idempotents.spanish.md new file mode 100644 index 0000000000..b2737c6607 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-407-idempotents.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5041000cf542c510016 +challengeType: 5 +title: 'Problem 407: Idempotents' +--- + +## Description +
+Si calculamos a2 mod 6 para 0 ≤ a ≤ 5 obtenemos: 0,1,4,3,4,1. + + +El valor más grande de a tal que a2 ≡ a mod 6 es 4. +Llamemos a M (n) el valor más grande de a <n tal que a2 ≡ a (mod n). +Entonces M (6) = 4. + + +Encuentra ∑M (n) para 1 ≤ n ≤ 107. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler407() debe devolver 39782849136421. + testString: 'assert.strictEqual(euler407(), 39782849136421, "euler407() should return 39782849136421.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler407() { + // Good luck! + return true; +} + +euler407(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-408-admissible-paths-through-a-grid.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-408-admissible-paths-through-a-grid.spanish.md new file mode 100644 index 0000000000..b4f880deaf --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-408-admissible-paths-through-a-grid.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f5091000cf542c51001b +challengeType: 5 +title: 'Problem 408: Admissible paths through a grid' +--- + +## Description +
+Llamemos inadmisible un punto de celosía (x, y) si x, y y x + y son todos cuadrados positivos perfectos. +Por ejemplo, (9, 16) es inadmisible, mientras que (0, 4), (3, 1) y (9, 4) no lo son. + +Considere una ruta desde el punto (x1, y1) al punto (x2, y2) usando solo pasos de unidad hacia el norte o el este. +Llamemos admisible a tal trayectoria si ninguno de sus puntos intermedios es inadmisible. + +Sea P (n) el número de rutas admisibles de (0, 0) a (n, n). +Se puede verificar que P (5) = 252, P (16) = 596994440 y P (1000) mod 1 000 000 007 = 341920854. + +Encuentre P (10 000 000) mod 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler408() debe devolver 299742733. + testString: 'assert.strictEqual(euler408(), 299742733, "euler408() should return 299742733.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler408() { + // Good luck! + return true; +} + +euler408(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-409-nim-extreme.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-409-nim-extreme.spanish.md new file mode 100644 index 0000000000..d546e6b4bc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-409-nim-extreme.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f5061000cf542c510017 +challengeType: 5 +title: 'Problem 409: Nim Extreme' +--- + +## Description +
+Sea n un entero positivo. Considere las posiciones nim donde: Hay n pilas no vacías. +Cada pila tiene un tamaño inferior a 2n. +No hay dos pilas que tengan el mismo tamaño. +Sea W (n) el número de posiciones nim ganadoras que cumplan las +condiciones anteriores (una posición es ganadora si el primer jugador tiene una estrategia ganadora). Por ejemplo, W (1) = 1, W (2) = 6, W (3) = 168, W (5) = 19764360 y W (100) mod 1 000 000 007 = 384777056. + +Encuentre W (10 000) 000) mod 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler409() debe devolver 253223948. + testString: 'assert.strictEqual(euler409(), 253223948, "euler409() should return 253223948.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler409() { + // Good luck! + return true; +} + +euler409(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-41-pandigital-prime.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-41-pandigital-prime.spanish.md new file mode 100644 index 0000000000..f254a655ed --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-41-pandigital-prime.spanish.md @@ -0,0 +1,126 @@ +--- +id: 5 +localeTitle: 5900f3951000cf542c50fea8 +challengeType: 5 +title: 'Problem 41: Pandigital prime' +--- + +## Description +
+Diremos que un número de n dígitos es pandigital si utiliza todos los dígitos 1 a n exactamente una vez. Por ejemplo, 2143 es un pandigital de 4 dígitos y también es primo. +¿Cuál es el mayor n -Longitud primer Pandigital dígitos que existe? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: pandigitalPrime(4) debe devolver 4231. + testString: 'assert(pandigitalPrime(4) == 4231, "pandigitalPrime(4) should return 4231.");' + - text: pandigitalPrime(7) debe devolver 7652413. + testString: 'assert(pandigitalPrime(7) == 7652413, "pandigitalPrime(7) should return 7652413.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function pandigitalPrime(n) { + // Good luck! + return n; +} + +pandigitalPrime(7); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function pandigitalPrime(n) { + function isPrime(num) { + for (let i = 2, s = Math.sqrt(num); i <= s; i++) { + if (num % i === 0) { + return false; + } + } + return num !== 1; + } + + function getPermutations(n) { + if (n === 1) { + permutations.push(digitsArr.join('')); + } else { + for (let i = 0; i < n - 1; i++) { + getPermutations(n - 1); + // swap(n % 2 === 0 ? i : 0, n - 1); + if (n % 2 === 0) { + swap(i, n - 1); + } else { + swap(0, n - 1); + } + } + getPermutations(n - 1); + } + } + function swap(x, y) { + let temp = digitsArr[x]; + digitsArr[x] = digitsArr[y]; + digitsArr[y] = temp; + } + let max = 0; + let permutations = []; + let digitsArr; + let pandigitalNum = "; + + for (let max = n; max > 0; max--) { + pandigitalNum += max; + } + + for (let i = 0; i < pandigitalNum.length; i++) { + if (max > 0) { + break; + } else { + permutations = []; + const currMax = pandigitalNum.slice(i); + digitsArr = currMax.split(''); + getPermutations(digitsArr.length); + + // sort permutations in descending order + permutations.sort(function(a, b) { + return b - a; + }); + + for (let perm of permutations) { + const thisPerm = parseInt(perm); + if (isPrime(thisPerm)) { + max = thisPerm; + break; + } + } + } + } + + return max; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-410-circle-and-tangent-line.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-410-circle-and-tangent-line.spanish.md new file mode 100644 index 0000000000..f7e482a0e8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-410-circle-and-tangent-line.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f5071000cf542c510018 +challengeType: 5 +title: 'Problem 410: Circle and tangent line' +--- + +## Description +
+Sea C el círculo con el radio r, x2 + y2 = r2. Elegimos dos puntos P (a, b) y Q (-a, c) para que la línea que pasa por P y Q sea tangente a C. + +Por ejemplo, el cuadrupleto (r, a, b, c) = ( 2, 6, 2, -7) satisface esta propiedad. + +Sea F (R, X) el número de los cuádruples enteros (r, a, b, c) con esta propiedad y con 0 <r ≤ R y 0 <a ≤ X. + +Podemos verificar que F (1, 5) = 10, F (2, 10) = 52 y F (10, 100) = 3384. +Encuentre F (108, 109) + F (109, 108). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler410() debe devolver 799999783589946600. + testString: 'assert.strictEqual(euler410(), 799999783589946600, "euler410() should return 799999783589946600.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler410() { + // Good luck! + return true; +} + +euler410(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-411-uphill-paths.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-411-uphill-paths.spanish.md new file mode 100644 index 0000000000..2e1243b32f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-411-uphill-paths.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5081000cf542c510019 +challengeType: 5 +title: 'Problem 411: Uphill paths' +--- + +## Description +
+Sea n un entero positivo. Supongamos que hay estaciones en las coordenadas (x, y) = (2i mod n, 3i mod n) para 0 ≤ i ≤ 2n. Consideraremos estaciones con las mismas coordenadas que la misma estación. + +Deseamos formar una ruta de (0, 0) a (n, n) de modo que las coordenadas x e y nunca disminuyan. +Sea S (n) el número máximo de estaciones por las que puede pasar un camino. + +Por ejemplo, si n = 22, hay 11 estaciones distintas y una ruta válida puede pasar a lo más 5 estaciones. Por lo tanto, S (22) = 5. +El caso se ilustra a continuación, con un ejemplo de una ruta óptima: + + + +También se puede verificar que S (123) = 14 y S (10000) = 48. + +Encuentre ∑ S (k5) para 1 ≤ k ≤ 30. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler411() debe devolver 9936352. + testString: 'assert.strictEqual(euler411(), 9936352, "euler411() should return 9936352.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler411() { + // Good luck! + return true; +} + +euler411(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-412-gnomon-numbering.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-412-gnomon-numbering.spanish.md new file mode 100644 index 0000000000..77f428aebb --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-412-gnomon-numbering.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f5081000cf542c51001a +challengeType: 5 +title: 'Problem 412: Gnomon numbering' +--- + +## Description +
+Para los enteros m, n (0 ≤ n <m), sea L (m, n) una cuadrícula de m × m con la cuadrícula n × n superior derecha. + +Por ejemplo, L (5, 3) se ve así: + + + +Queremos numerar cada celda de L (m, n) con números enteros consecutivos 1, 2, 3, ... de tal manera que el número en cada la celda es más pequeña que el número debajo y a la izquierda de la misma. + +Por ejemplo, aquí hay dos numeraciones válidas de L (5, 3): + + +Sea LC (m, n) el número de numeraciones válidas de L (m, n). +Se puede verificar que LC (3, 0) = 42, LC (5, 3) = 250250, LC (6, 3) = 406029023400 y LC (10, 5) mod 76543217 = 61251715. + +Buscar LC (10000 , 5000) mod 76543217. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler412() debe devolver 38788800. + testString: 'assert.strictEqual(euler412(), 38788800, "euler412() should return 38788800.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler412() { + // Good luck! + return true; +} + +euler412(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-413-one-child-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-413-one-child-numbers.spanish.md new file mode 100644 index 0000000000..3df36ffefd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-413-one-child-numbers.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f50a1000cf542c51001c +challengeType: 5 +title: 'Problem 413: One-child Numbers' +--- + +## Description +
+Decimos que un número positivo de dígitos d (sin ceros a la izquierda) es un número de un solo hijo si exactamente una de sus subcadenas es divisible por d. + +Por ejemplo, 5671 es un número de un solo hijo de 4 dígitos. De todas sus sub-cadenas 5, 6, 7, 1, 56, 67, 71, 567, 671 y 5671, solo 56 es divisible por 4. +Del mismo modo, 104 es un número de un solo hijo de 3 dígitos porque solo 0 es divisible por 3. +1132451 es un número de un solo hijo de 7 dígitos porque solo 245 es divisible por 7. + +Sea F (N) el número de los números de un solo hijo menor que N. +Podemos verificar que F ( 10) = 9, F (103) = 389 y F (107) = 277674. + +Encuentre F (1019). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler413() debe devolver 3079418648040719. + testString: 'assert.strictEqual(euler413(), 3079418648040719, "euler413() should return 3079418648040719.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler413() { + // Good luck! + return true; +} + +euler413(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-414-kaprekar-constant.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-414-kaprekar-constant.spanish.md new file mode 100644 index 0000000000..e1a75545db --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-414-kaprekar-constant.spanish.md @@ -0,0 +1,87 @@ +--- +id: 5 +localeTitle: 5900f50b1000cf542c51001d +challengeType: 5 +title: 'Problem 414: Kaprekar constant' +--- + +## Description +
+6174 es un número notable; si ordenamos sus dígitos en orden creciente y restamos ese número del número que obtienes cuando ordenas los dígitos en orden decreciente, obtenemos 7641-1467 = 6174. +Aún más notable es que si comenzamos con cualquier número de 4 dígitos y repetimos este proceso de clasificación y resta, eventualmente terminaremos con 6174 o inmediatamente con 0 si todos los dígitos son iguales. +Esto también funciona con números que tienen menos de 4 dígitos si colocamos el número con ceros iniciales hasta que tengamos 4 dígitos. +Por ejemplo, comencemos con el número 0837: +8730-0378 = 8352 +8532-2358 = 6174 + + +6174 se llama constante de Kaprekar. El proceso de clasificación, resta y repetición hasta que se alcanza 0 o la constante de Kaprekar se denomina rutina de Kaprekar. + + +Podemos considerar la rutina de Kaprekar para otras bases y número de dígitos. +Desafortunadamente, no está garantizado que exista una constante de Kaprekar en todos los casos; o bien la rutina puede terminar en un ciclo para algunos números de entrada o la constante a la que llega la rutina puede ser diferente para diferentes números de entrada. +Sin embargo, se puede mostrar que para 5 dígitos y una base b = 6t + 3 ≠ 9, existe una constante de Kaprekar. +Por ejemplo, base 15: (10,4,14,9,5) 15 +base 21: (14,6,20,13,7) 21 + +Defina Cb como la constante de Kaprekar en la base b para 5 dígitos. +Defina que la función sb (i) sea +0 si i = Cb o si escribo en la base b consta de 5 dígitos idénticos +el número de iteraciones que toma la rutina de Kaprekar en la base b para llegar a Cb, de lo contrario + +Nota que podemos definir sb (i) para todos los enteros i <b5. Si escribo en la base b toma menos de 5 dígitos, el número se rellena con cero dígitos iniciales hasta que tengamos 5 dígitos antes de aplicar la rutina de Kaprekar. + + +Defina S (b) como la suma de sb (i) para 0 <i <b5. +Ej. S (15) = 5274369 +S (111) = 400668930299 + + +Halla la suma de S (6k + 3) para 2 ≤ k ≤ 300. +Da los últimos 18 dígitos como respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler414() debe devolver 552506775824935500. + testString: 'assert.strictEqual(euler414(), 552506775824935500, "euler414() should return 552506775824935500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler414() { + // Good luck! + return true; +} + +euler414(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-415-titanic-sets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-415-titanic-sets.spanish.md new file mode 100644 index 0000000000..2b9ec2e551 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-415-titanic-sets.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f50c1000cf542c51001e +challengeType: 5 +title: 'Problem 415: Titanic sets' +--- + +## Description +
+Un conjunto de puntos de celosía S se llama un conjunto titánico si existe una línea que pasa exactamente por dos puntos en S. + +Un ejemplo de un conjunto titánico es S = {(0, 0), (0, 1), ( 0, 2), (1, 1), (2, 0), (1, 0)}, donde la línea que pasa por (0, 1) y (2, 0) no pasa por ningún otro punto en S. + +Por otro lado, el conjunto {(0, 0), (1, 1), (2, 2), (4, 4)} no es un conjunto titánico ya que la línea pasa a través de cualquiera de los dos puntos en el conjunto También pasa por los otros dos. + +Para cualquier entero positivo N, sea T (N) el número de conjuntos S titánicos cuyo punto (x, y) satisface 0 ≤ x, y ≤ N. +Se puede verificar que T (1) = 11, T (2) = 494, T (4) = 33554178, T (111) mod 108 = 13500401 y T (105) mod 108 = 63259062. + +Encuentra T (1011) mod 108. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler415() debe devolver 55859742. + testString: 'assert.strictEqual(euler415(), 55859742, "euler415() should return 55859742.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler415() { + // Good luck! + return true; +} + +euler415(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-416-a-frogs-trip.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-416-a-frogs-trip.spanish.md new file mode 100644 index 0000000000..4022c34145 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-416-a-frogs-trip.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f50e1000cf542c510020 +challengeType: 5 +title: 'Problem 416: A frog"s trip' +--- + +## Description +
+Una fila de n cuadrados contiene una rana en el cuadrado de la izquierda. Por saltos sucesivos, la rana va a la casilla más a la derecha y luego a la casilla más a la izquierda. En el viaje de ida, salta uno, dos o tres cuadrados a la derecha, y en el viaje de regreso, salta a la izquierda de manera similar. No puede saltar fuera de las plazas. Repite el viaje de ida y vuelta m veces. + +Sea F (m, n) el número de formas en que la rana puede viajar para que, como máximo, una casilla permanezca sin visitar. +Por ejemplo, F (1, 3) = 4, F (1, 4) = 15, F (1, 5) = 46, F (2, 3) = 16 y F (2, 100) mod 109 = 429619151 + +Encuentra los últimos 9 dígitos de F (10, 1012). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler416() debe devolver 898082747. + testString: 'assert.strictEqual(euler416(), 898082747, "euler416() should return 898082747.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler416() { + // Good luck! + return true; +} + +euler416(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-417-reciprocal-cycles-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-417-reciprocal-cycles-ii.spanish.md new file mode 100644 index 0000000000..3bbbd46691 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-417-reciprocal-cycles-ii.spanish.md @@ -0,0 +1,78 @@ +--- +id: 5 +localeTitle: 5900f50d1000cf542c51001f +challengeType: 5 +title: 'Problem 417: Reciprocal cycles II' +--- + +## Description +
+Una fracción unitaria contiene 1 en el numerador. Se da la representación decimal de las fracciones unitarias con denominadores 2 a 10: + +1/2 = 0.5 +1/3 = 0. (3) +1/4 = 0.25 +1/5 = 0.2 +1/6 = 0.1 (6) +1/7 = 0. (142857) +1/8 = 0.125 +1/9 = 0. (1) +1/10 = 0.1 + +Donde 0.1 (6) significa 0.166666 ..., y tiene Un ciclo recurrente de 1 dígito. Se puede ver que 1/7 tiene un ciclo recurrente de 6 dígitos. + +Las fracciones unitarias cuyo denominador no tiene más factores primos que 2 y / o 5 no se considera que tengan un ciclo recurrente. +Definimos la longitud del ciclo recurrente de esas fracciones unitarias como 0. + + +Sea L (n) la longitud del ciclo recurrente de 1 / n. +Se le da que ∑L (n) para 3 ≤ n ≤ 1 000 000 es igual a 55535191115. + + +Encuentre ∑L (n) para 3 ≤ n ≤ 100 000 000 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler417() debe devolver 446572970925740. + testString: 'assert.strictEqual(euler417(), 446572970925740, "euler417() should return 446572970925740.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler417() { + // Good luck! + return true; +} + +euler417(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-418-factorisation-triples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-418-factorisation-triples.spanish.md new file mode 100644 index 0000000000..259cadaafc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-418-factorisation-triples.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f50f1000cf542c510021 +challengeType: 5 +title: 'Problem 418: Factorisation triples' +--- + +## Description +
+Sea n un entero positivo. Un triple entero (a, b, c) se llama triple de factorización de n si: 1 ≤ a ≤ b ≤ c +a · b · c = n. + +Defina f (n) como a + b + c para la factorización triple (a, b, c) de n que minimiza c / a. Se puede demostrar que este triple es único. + + +Por ejemplo, f (165) = 19, f (100100) = 142 y f (20!) = 4034872. + + +Encuentre f (43!). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler418() debe devolver 1177163565297340400. + testString: 'assert.strictEqual(euler418(), 1177163565297340400, "euler418() should return 1177163565297340400.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler418() { + // Good luck! + return true; +} + +euler418(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-419-look-and-say-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-419-look-and-say-sequence.spanish.md new file mode 100644 index 0000000000..375606271a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-419-look-and-say-sequence.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f5101000cf542c510022 +challengeType: 5 +title: 'Problem 419: Look and say sequence' +--- + +## Description +
+La secuencia de buscar y decir va 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, ... +La secuencia comienza con 1 y todos los demás miembros se obtienen describiendo el miembro anterior en términos de dígitos consecutivos. +Ayuda hacer esto en voz alta: +1 es 'uno uno' → 11 +11 es 'dos ​​unos' → 21 +21 es 'uno dos y uno uno' → 1211 +1211 es 'uno uno, uno dos y dos ones '→ 111221 +111221 es' tres one, two twos and one '→ 312211 +... + + +Defina A (n), B (n) y C (n) como el número de unidades, twos y threes en el elemento n 'n de la secuencia respectivamente. +Se puede verificar que A (40) = 31254, B (40) = 20259 y C (40) = 11625. + + +Encuentre A (n), B (n) y C (n) para n = 1012. +Da tu respuesta módulo 230 y separa tus valores para A, B y C con una coma. +Ej. Para n = 40 la respuesta sería 31254,20259,11625 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' euler419() debe devolver 998567458, 1046245404, 43363922.' + testString: 'assert.strictEqual(euler419(), 998567458, 1046245404, 43363922, "euler419() should return 998567458, 1046245404, 43363922.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler419() { + // Good luck! + return true; +} + +euler419(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-42-coded-triangle-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-42-coded-triangle-numbers.spanish.md new file mode 100644 index 0000000000..5a3b236d6f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-42-coded-triangle-numbers.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f3961000cf542c50fea9 +challengeType: 5 +title: 'Problem 42: Coded triangle numbers' +--- + +## Description +
+El enésimo término de la secuencia de los números de triángulos viene dado por, tn = ½n (n + 1); entonces los primeros diez números de triángulos son: +1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... +Al convertir cada letra en una palabra en un número correspondiente a su posición alfabética y sumar estos valores formamos un valor de palabra. Por ejemplo, el valor de palabra para SKY es 19 + 11 + 25 = 55 = t10. Si la palabra valor es un número de triángulo, llamaremos a la palabra una palabra de triángulo. +Usando una matriz de palabras de n longitud, ¿cuántas son palabras de triángulo? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: codedTriangleNumbers(1400) debe devolver 129. + testString: 'assert(codedTriangleNumbers(1400) == 129, "codedTriangleNumbers(1400) should return 129.");' + - text: codedTriangleNumbers(1500) debe devolver 137. + testString: 'assert(codedTriangleNumbers(1500) == 137, "codedTriangleNumbers(1500) should return 137.");' + - text: codedTriangleNumbers(1600) debe devolver 141. + testString: 'assert(codedTriangleNumbers(1600) == 141, "codedTriangleNumbers(1600) should return 141.");' + - text: codedTriangleNumbers(1786) debe devolver 162. + testString: 'assert(codedTriangleNumbers(1786) == 162, "codedTriangleNumbers(1786) should return 162.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function codedTriangleNumbers(n) { + // Good luck! + return 1; +} +// only change code above this line + +const words = ['A','ABILITY','ABLE','ABOUT','ABOVE','ABSENCE','ABSOLUTELY','ACADEMIC','ACCEPT','ACCESS','ACCIDENT','ACCOMPANY','ACCORDING','ACCOUNT','ACHIEVE','ACHIEVEMENT','ACID','ACQUIRE','ACROSS','ACT','ACTION','ACTIVE','ACTIVITY','ACTUAL','ACTUALLY','ADD','ADDITION','ADDITIONAL','ADDRESS','ADMINISTRATION','ADMIT','ADOPT','ADULT','ADVANCE','ADVANTAGE','ADVICE','ADVISE','AFFAIR','AFFECT','AFFORD','AFRAID','AFTER','AFTERNOON','AFTERWARDS','AGAIN','AGAINST','AGE','AGENCY','AGENT','AGO','AGREE','AGREEMENT','AHEAD','AID','AIM','AIR','AIRCRAFT','ALL','ALLOW','ALMOST','ALONE','ALONG','ALREADY','ALRIGHT','ALSO','ALTERNATIVE','ALTHOUGH','ALWAYS','AMONG','AMONGST','AMOUNT','AN','ANALYSIS','ANCIENT','AND','ANIMAL','ANNOUNCE','ANNUAL','ANOTHER','ANSWER','ANY','ANYBODY','ANYONE','ANYTHING','ANYWAY','APART','APPARENT','APPARENTLY','APPEAL','APPEAR','APPEARANCE','APPLICATION','APPLY','APPOINT','APPOINTMENT','APPROACH','APPROPRIATE','APPROVE','AREA','ARGUE','ARGUMENT','ARISE','ARM','ARMY','AROUND','ARRANGE','ARRANGEMENT','ARRIVE','ART','ARTICLE','ARTIST','AS','ASK','ASPECT','ASSEMBLY','ASSESS','ASSESSMENT','ASSET','ASSOCIATE','ASSOCIATION','ASSUME','ASSUMPTION','AT','ATMOSPHERE','ATTACH','ATTACK','ATTEMPT','ATTEND','ATTENTION','ATTITUDE','ATTRACT','ATTRACTIVE','AUDIENCE','AUTHOR','AUTHORITY','AVAILABLE','AVERAGE','AVOID','AWARD','AWARE','AWAY','AYE','BABY','BACK','BACKGROUND','BAD','BAG','BALANCE','BALL','BAND','BANK','BAR','BASE','BASIC','BASIS','BATTLE','BE','BEAR','BEAT','BEAUTIFUL','BECAUSE','BECOME','BED','BEDROOM','BEFORE','BEGIN','BEGINNING','BEHAVIOUR','BEHIND','BELIEF','BELIEVE','BELONG','BELOW','BENEATH','BENEFIT','BESIDE','BEST','BETTER','BETWEEN','BEYOND','BIG','BILL','BIND','BIRD','BIRTH','BIT','BLACK','BLOCK','BLOOD','BLOODY','BLOW','BLUE','BOARD','BOAT','BODY','BONE','BOOK','BORDER','BOTH','BOTTLE','BOTTOM','BOX','BOY','BRAIN','BRANCH','BREAK','BREATH','BRIDGE','BRIEF','BRIGHT','BRING','BROAD','BROTHER','BUDGET','BUILD','BUILDING','BURN','BUS','BUSINESS','BUSY','BUT','BUY','BY','CABINET','CALL','CAMPAIGN','CAN','CANDIDATE','CAPABLE','CAPACITY','CAPITAL','CAR','CARD','CARE','CAREER','CAREFUL','CAREFULLY','CARRY','CASE','CASH','CAT','CATCH','CATEGORY','CAUSE','CELL','CENTRAL','CENTRE','CENTURY','CERTAIN','CERTAINLY','CHAIN','CHAIR','CHAIRMAN','CHALLENGE','CHANCE','CHANGE','CHANNEL','CHAPTER','CHARACTER','CHARACTERISTIC','CHARGE','CHEAP','CHECK','CHEMICAL','CHIEF','CHILD','CHOICE','CHOOSE','CHURCH','CIRCLE','CIRCUMSTANCE','CITIZEN','CITY','CIVIL','CLAIM','CLASS','CLEAN','CLEAR','CLEARLY','CLIENT','CLIMB','CLOSE','CLOSELY','CLOTHES','CLUB','COAL','CODE','COFFEE','COLD','COLLEAGUE','COLLECT','COLLECTION','COLLEGE','COLOUR','COMBINATION','COMBINE','COME','COMMENT','COMMERCIAL','COMMISSION','COMMIT','COMMITMENT','COMMITTEE','COMMON','COMMUNICATION','COMMUNITY','COMPANY','COMPARE','COMPARISON','COMPETITION','COMPLETE','COMPLETELY','COMPLEX','COMPONENT','COMPUTER','CONCENTRATE','CONCENTRATION','CONCEPT','CONCERN','CONCERNED','CONCLUDE','CONCLUSION','CONDITION','CONDUCT','CONFERENCE','CONFIDENCE','CONFIRM','CONFLICT','CONGRESS','CONNECT','CONNECTION','CONSEQUENCE','CONSERVATIVE','CONSIDER','CONSIDERABLE','CONSIDERATION','CONSIST','CONSTANT','CONSTRUCTION','CONSUMER','CONTACT','CONTAIN','CONTENT','CONTEXT','CONTINUE','CONTRACT','CONTRAST','CONTRIBUTE','CONTRIBUTION','CONTROL','CONVENTION','CONVERSATION','COPY','CORNER','CORPORATE','CORRECT','COS','COST','COULD','COUNCIL','COUNT','COUNTRY','COUNTY','COUPLE','COURSE','COURT','COVER','CREATE','CREATION','CREDIT','CRIME','CRIMINAL','CRISIS','CRITERION','CRITICAL','CRITICISM','CROSS','CROWD','CRY','CULTURAL','CULTURE','CUP','CURRENT','CURRENTLY','CURRICULUM','CUSTOMER','CUT','DAMAGE','DANGER','DANGEROUS','DARK','DATA','DATE','DAUGHTER','DAY','DEAD','DEAL','DEATH','DEBATE','DEBT','DECADE','DECIDE','DECISION','DECLARE','DEEP','DEFENCE','DEFENDANT','DEFINE','DEFINITION','DEGREE','DELIVER','DEMAND','DEMOCRATIC','DEMONSTRATE','DENY','DEPARTMENT','DEPEND','DEPUTY','DERIVE','DESCRIBE','DESCRIPTION','DESIGN','DESIRE','DESK','DESPITE','DESTROY','DETAIL','DETAILED','DETERMINE','DEVELOP','DEVELOPMENT','DEVICE','DIE','DIFFERENCE','DIFFERENT','DIFFICULT','DIFFICULTY','DINNER','DIRECT','DIRECTION','DIRECTLY','DIRECTOR','DISAPPEAR','DISCIPLINE','DISCOVER','DISCUSS','DISCUSSION','DISEASE','DISPLAY','DISTANCE','DISTINCTION','DISTRIBUTION','DISTRICT','DIVIDE','DIVISION','DO','DOCTOR','DOCUMENT','DOG','DOMESTIC','DOOR','DOUBLE','DOUBT','DOWN','DRAW','DRAWING','DREAM','DRESS','DRINK','DRIVE','DRIVER','DROP','DRUG','DRY','DUE','DURING','DUTY','EACH','EAR','EARLY','EARN','EARTH','EASILY','EAST','EASY','EAT','ECONOMIC','ECONOMY','EDGE','EDITOR','EDUCATION','EDUCATIONAL','EFFECT','EFFECTIVE','EFFECTIVELY','EFFORT','EGG','EITHER','ELDERLY','ELECTION','ELEMENT','ELSE','ELSEWHERE','EMERGE','EMPHASIS','EMPLOY','EMPLOYEE','EMPLOYER','EMPLOYMENT','EMPTY','ENABLE','ENCOURAGE','END','ENEMY','ENERGY','ENGINE','ENGINEERING','ENJOY','ENOUGH','ENSURE','ENTER','ENTERPRISE','ENTIRE','ENTIRELY','ENTITLE','ENTRY','ENVIRONMENT','ENVIRONMENTAL','EQUAL','EQUALLY','EQUIPMENT','ERROR','ESCAPE','ESPECIALLY','ESSENTIAL','ESTABLISH','ESTABLISHMENT','ESTATE','ESTIMATE','EVEN','EVENING','EVENT','EVENTUALLY','EVER','EVERY','EVERYBODY','EVERYONE','EVERYTHING','EVIDENCE','EXACTLY','EXAMINATION','EXAMINE','EXAMPLE','EXCELLENT','EXCEPT','EXCHANGE','EXECUTIVE','EXERCISE','EXHIBITION','EXIST','EXISTENCE','EXISTING','EXPECT','EXPECTATION','EXPENDITURE','EXPENSE','EXPENSIVE','EXPERIENCE','EXPERIMENT','EXPERT','EXPLAIN','EXPLANATION','EXPLORE','EXPRESS','EXPRESSION','EXTEND','EXTENT','EXTERNAL','EXTRA','EXTREMELY','EYE','FACE','FACILITY','FACT','FACTOR','FACTORY','FAIL','FAILURE','FAIR','FAIRLY','FAITH','FALL','FAMILIAR','FAMILY','FAMOUS','FAR','FARM','FARMER','FASHION','FAST','FATHER','FAVOUR','FEAR','FEATURE','FEE','FEEL','FEELING','FEMALE','FEW','FIELD','FIGHT','FIGURE','FILE','FILL','FILM','FINAL','FINALLY','FINANCE','FINANCIAL','FIND','FINDING','FINE','FINGER','FINISH','FIRE','FIRM','FIRST','FISH','FIT','FIX','FLAT','FLIGHT','FLOOR','FLOW','FLOWER','FLY','FOCUS','FOLLOW','FOLLOWING','FOOD','FOOT','FOOTBALL','FOR','FORCE','FOREIGN','FOREST','FORGET','FORM','FORMAL','FORMER','FORWARD','FOUNDATION','FREE','FREEDOM','FREQUENTLY','FRESH','FRIEND','FROM','FRONT','FRUIT','FUEL','FULL','FULLY','FUNCTION','FUND','FUNNY','FURTHER','FUTURE','GAIN','GAME','GARDEN','GAS','GATE','GATHER','GENERAL','GENERALLY','GENERATE','GENERATION','GENTLEMAN','GET','GIRL','GIVE','GLASS','GO','GOAL','GOD','GOLD','GOOD','GOVERNMENT','GRANT','GREAT','GREEN','GREY','GROUND','GROUP','GROW','GROWING','GROWTH','GUEST','GUIDE','GUN','HAIR','HALF','HALL','HAND','HANDLE','HANG','HAPPEN','HAPPY','HARD','HARDLY','HATE','HAVE','HE','HEAD','HEALTH','HEAR','HEART','HEAT','HEAVY','HELL','HELP','HENCE','HER','HERE','HERSELF','HIDE','HIGH','HIGHLY','HILL','HIM','HIMSELF','HIS','HISTORICAL','HISTORY','HIT','HOLD','HOLE','HOLIDAY','HOME','HOPE','HORSE','HOSPITAL','HOT','HOTEL','HOUR','HOUSE','HOUSEHOLD','HOUSING','HOW','HOWEVER','HUGE','HUMAN','HURT','HUSBAND','I','IDEA','IDENTIFY','IF','IGNORE','ILLUSTRATE','IMAGE','IMAGINE','IMMEDIATE','IMMEDIATELY','IMPACT','IMPLICATION','IMPLY','IMPORTANCE','IMPORTANT','IMPOSE','IMPOSSIBLE','IMPRESSION','IMPROVE','IMPROVEMENT','IN','INCIDENT','INCLUDE','INCLUDING','INCOME','INCREASE','INCREASED','INCREASINGLY','INDEED','INDEPENDENT','INDEX','INDICATE','INDIVIDUAL','INDUSTRIAL','INDUSTRY','INFLUENCE','INFORM','INFORMATION','INITIAL','INITIATIVE','INJURY','INSIDE','INSIST','INSTANCE','INSTEAD','INSTITUTE','INSTITUTION','INSTRUCTION','INSTRUMENT','INSURANCE','INTEND','INTENTION','INTEREST','INTERESTED','INTERESTING','INTERNAL','INTERNATIONAL','INTERPRETATION','INTERVIEW','INTO','INTRODUCE','INTRODUCTION','INVESTIGATE','INVESTIGATION','INVESTMENT','INVITE','INVOLVE','IRON','IS','ISLAND','ISSUE','IT','ITEM','ITS','ITSELF','JOB','JOIN','JOINT','JOURNEY','JUDGE','JUMP','JUST','JUSTICE','KEEP','KEY','KID','KILL','KIND','KING','KITCHEN','KNEE','KNOW','KNOWLEDGE','LABOUR','LACK','LADY','LAND','LANGUAGE','LARGE','LARGELY','LAST','LATE','LATER','LATTER','LAUGH','LAUNCH','LAW','LAWYER','LAY','LEAD','LEADER','LEADERSHIP','LEADING','LEAF','LEAGUE','LEAN','LEARN','LEAST','LEAVE','LEFT','LEG','LEGAL','LEGISLATION','LENGTH','LESS','LET','LETTER','LEVEL','LIABILITY','LIBERAL','LIBRARY','LIE','LIFE','LIFT','LIGHT','LIKE','LIKELY','LIMIT','LIMITED','LINE','LINK','LIP','LIST','LISTEN','LITERATURE','LITTLE','LIVE','LIVING','LOAN','LOCAL','LOCATION','LONG','LOOK','LORD','LOSE','LOSS','LOT','LOVE','LOVELY','LOW','LUNCH','MACHINE','MAGAZINE','MAIN','MAINLY','MAINTAIN','MAJOR','MAJORITY','MAKE','MALE','MAN','MANAGE','MANAGEMENT','MANAGER','MANNER','MANY','MAP','MARK','MARKET','MARRIAGE','MARRIED','MARRY','MASS','MASTER','MATCH','MATERIAL','MATTER','MAY','MAYBE','ME','MEAL','MEAN','MEANING','MEANS','MEANWHILE','MEASURE','MECHANISM','MEDIA','MEDICAL','MEET','MEETING','MEMBER','MEMBERSHIP','MEMORY','MENTAL','MENTION','MERELY','MESSAGE','METAL','METHOD','MIDDLE','MIGHT','MILE','MILITARY','MILK','MIND','MINE','MINISTER','MINISTRY','MINUTE','MISS','MISTAKE','MODEL','MODERN','MODULE','MOMENT','MONEY','MONTH','MORE','MORNING','MOST','MOTHER','MOTION','MOTOR','MOUNTAIN','MOUTH','MOVE','MOVEMENT','MUCH','MURDER','MUSEUM','MUSIC','MUST','MY','MYSELF','NAME','NARROW','NATION','NATIONAL','NATURAL','NATURE','NEAR','NEARLY','NECESSARILY','NECESSARY','NECK','NEED','NEGOTIATION','NEIGHBOUR','NEITHER','NETWORK','NEVER','NEVERTHELESS','NEW','NEWS','NEWSPAPER','NEXT','NICE','NIGHT','NO','NOBODY','NOD','NOISE','NONE','NOR','NORMAL','NORMALLY','NORTH','NORTHERN','NOSE','NOT','NOTE','NOTHING','NOTICE','NOTION','NOW','NUCLEAR','NUMBER','NURSE','OBJECT','OBJECTIVE','OBSERVATION','OBSERVE','OBTAIN','OBVIOUS','OBVIOUSLY','OCCASION','OCCUR','ODD','OF','OFF','OFFENCE','OFFER','OFFICE','OFFICER','OFFICIAL','OFTEN','OIL','OKAY','OLD','ON','ONCE','ONE','ONLY','ONTO','OPEN','OPERATE','OPERATION','OPINION','OPPORTUNITY','OPPOSITION','OPTION','OR','ORDER','ORDINARY','ORGANISATION','ORGANISE','ORGANIZATION','ORIGIN','ORIGINAL','OTHER','OTHERWISE','OUGHT','OUR','OURSELVES','OUT','OUTCOME','OUTPUT','OUTSIDE','OVER','OVERALL','OWN','OWNER','PACKAGE','PAGE','PAIN','PAINT','PAINTING','PAIR','PANEL','PAPER','PARENT','PARK','PARLIAMENT','PART','PARTICULAR','PARTICULARLY','PARTLY','PARTNER','PARTY','PASS','PASSAGE','PAST','PATH','PATIENT','PATTERN','PAY','PAYMENT','PEACE','PENSION','PEOPLE','PER','PERCENT','PERFECT','PERFORM','PERFORMANCE','PERHAPS','PERIOD','PERMANENT','PERSON','PERSONAL','PERSUADE','PHASE','PHONE','PHOTOGRAPH','PHYSICAL','PICK','PICTURE','PIECE','PLACE','PLAN','PLANNING','PLANT','PLASTIC','PLATE','PLAY','PLAYER','PLEASE','PLEASURE','PLENTY','PLUS','POCKET','POINT','POLICE','POLICY','POLITICAL','POLITICS','POOL','POOR','POPULAR','POPULATION','POSITION','POSITIVE','POSSIBILITY','POSSIBLE','POSSIBLY','POST','POTENTIAL','POUND','POWER','POWERFUL','PRACTICAL','PRACTICE','PREFER','PREPARE','PRESENCE','PRESENT','PRESIDENT','PRESS','PRESSURE','PRETTY','PREVENT','PREVIOUS','PREVIOUSLY','PRICE','PRIMARY','PRIME','PRINCIPLE','PRIORITY','PRISON','PRISONER','PRIVATE','PROBABLY','PROBLEM','PROCEDURE','PROCESS','PRODUCE','PRODUCT','PRODUCTION','PROFESSIONAL','PROFIT','PROGRAM','PROGRAMME','PROGRESS','PROJECT','PROMISE','PROMOTE','PROPER','PROPERLY','PROPERTY','PROPORTION','PROPOSE','PROPOSAL','PROSPECT','PROTECT','PROTECTION','PROVE','PROVIDE','PROVIDED','PROVISION','PUB','PUBLIC','PUBLICATION','PUBLISH','PULL','PUPIL','PURPOSE','PUSH','PUT','QUALITY','QUARTER','QUESTION','QUICK','QUICKLY','QUIET','QUITE','RACE','RADIO','RAILWAY','RAIN','RAISE','RANGE','RAPIDLY','RARE','RATE','RATHER','REACH','REACTION','READ','READER','READING','READY','REAL','REALISE','REALITY','REALIZE','REALLY','REASON','REASONABLE','RECALL','RECEIVE','RECENT','RECENTLY','RECOGNISE','RECOGNITION','RECOGNIZE','RECOMMEND','RECORD','RECOVER','RED','REDUCE','REDUCTION','REFER','REFERENCE','REFLECT','REFORM','REFUSE','REGARD','REGION','REGIONAL','REGULAR','REGULATION','REJECT','RELATE','RELATION','RELATIONSHIP','RELATIVE','RELATIVELY','RELEASE','RELEVANT','RELIEF','RELIGION','RELIGIOUS','RELY','REMAIN','REMEMBER','REMIND','REMOVE','REPEAT','REPLACE','REPLY','REPORT','REPRESENT','REPRESENTATION','REPRESENTATIVE','REQUEST','REQUIRE','REQUIREMENT','RESEARCH','RESOURCE','RESPECT','RESPOND','RESPONSE','RESPONSIBILITY','RESPONSIBLE','REST','RESTAURANT','RESULT','RETAIN','RETURN','REVEAL','REVENUE','REVIEW','REVOLUTION','RICH','RIDE','RIGHT','RING','RISE','RISK','RIVER','ROAD','ROCK','ROLE','ROLL','ROOF','ROOM','ROUND','ROUTE','ROW','ROYAL','RULE','RUN','RURAL','SAFE','SAFETY','SALE','SAME','SAMPLE','SATISFY','SAVE','SAY','SCALE','SCENE','SCHEME','SCHOOL','SCIENCE','SCIENTIFIC','SCIENTIST','SCORE','SCREEN','SEA','SEARCH','SEASON','SEAT','SECOND','SECONDARY','SECRETARY','SECTION','SECTOR','SECURE','SECURITY','SEE','SEEK','SEEM','SELECT','SELECTION','SELL','SEND','SENIOR','SENSE','SENTENCE','SEPARATE','SEQUENCE','SERIES','SERIOUS','SERIOUSLY','SERVANT','SERVE','SERVICE','SESSION','SET','SETTLE','SETTLEMENT','SEVERAL','SEVERE','SEX','SEXUAL','SHAKE','SHALL','SHAPE','SHARE','SHE','SHEET','SHIP','SHOE','SHOOT','SHOP','SHORT','SHOT','SHOULD','SHOULDER','SHOUT','SHOW','SHUT','SIDE','SIGHT','SIGN','SIGNAL','SIGNIFICANCE','SIGNIFICANT','SILENCE','SIMILAR','SIMPLE','SIMPLY','SINCE','SING','SINGLE','SIR','SISTER','SIT','SITE','SITUATION','SIZE','SKILL','SKIN','SKY','SLEEP','SLIGHTLY','SLIP','SLOW','SLOWLY','SMALL','SMILE','SO','SOCIAL','SOCIETY','SOFT','SOFTWARE','SOIL','SOLDIER','SOLICITOR','SOLUTION','SOME','SOMEBODY','SOMEONE','SOMETHING','SOMETIMES','SOMEWHAT','SOMEWHERE','SON','SONG','SOON','SORRY','SORT','SOUND','SOURCE','SOUTH','SOUTHERN','SPACE','SPEAK','SPEAKER','SPECIAL','SPECIES','SPECIFIC','SPEECH','SPEED','SPEND','SPIRIT','SPORT','SPOT','SPREAD','SPRING','STAFF','STAGE','STAND','STANDARD','STAR','START','STATE','STATEMENT','STATION','STATUS','STAY','STEAL','STEP','STICK','STILL','STOCK','STONE','STOP','STORE','STORY','STRAIGHT','STRANGE','STRATEGY','STREET','STRENGTH','STRIKE','STRONG','STRONGLY','STRUCTURE','STUDENT','STUDIO','STUDY','STUFF','STYLE','SUBJECT','SUBSTANTIAL','SUCCEED','SUCCESS','SUCCESSFUL','SUCH','SUDDENLY','SUFFER','SUFFICIENT','SUGGEST','SUGGESTION','SUITABLE','SUM','SUMMER','SUN','SUPPLY','SUPPORT','SUPPOSE','SURE','SURELY','SURFACE','SURPRISE','SURROUND','SURVEY','SURVIVE','SWITCH','SYSTEM','TABLE','TAKE','TALK','TALL','TAPE','TARGET','TASK','TAX','TEA','TEACH','TEACHER','TEACHING','TEAM','TEAR','TECHNICAL','TECHNIQUE','TECHNOLOGY','TELEPHONE','TELEVISION','TELL','TEMPERATURE','TEND','TERM','TERMS','TERRIBLE','TEST','TEXT','THAN','THANK','THANKS','THAT','THE','THEATRE','THEIR','THEM','THEME','THEMSELVES','THEN','THEORY','THERE','THEREFORE','THESE','THEY','THIN','THING','THINK','THIS','THOSE','THOUGH','THOUGHT','THREAT','THREATEN','THROUGH','THROUGHOUT','THROW','THUS','TICKET','TIME','TINY','TITLE','TO','TODAY','TOGETHER','TOMORROW','TONE','TONIGHT','TOO','TOOL','TOOTH','TOP','TOTAL','TOTALLY','TOUCH','TOUR','TOWARDS','TOWN','TRACK','TRADE','TRADITION','TRADITIONAL','TRAFFIC','TRAIN','TRAINING','TRANSFER','TRANSPORT','TRAVEL','TREAT','TREATMENT','TREATY','TREE','TREND','TRIAL','TRIP','TROOP','TROUBLE','TRUE','TRUST','TRUTH','TRY','TURN','TWICE','TYPE','TYPICAL','UNABLE','UNDER','UNDERSTAND','UNDERSTANDING','UNDERTAKE','UNEMPLOYMENT','UNFORTUNATELY','UNION','UNIT','UNITED','UNIVERSITY','UNLESS','UNLIKELY','UNTIL','UP','UPON','UPPER','URBAN','US','USE','USED','USEFUL','USER','USUAL','USUALLY','VALUE','VARIATION','VARIETY','VARIOUS','VARY','VAST','VEHICLE','VERSION','VERY','VIA','VICTIM','VICTORY','VIDEO','VIEW','VILLAGE','VIOLENCE','VISION','VISIT','VISITOR','VITAL','VOICE','VOLUME','VOTE','WAGE','WAIT','WALK','WALL','WANT','WAR','WARM','WARN','WASH','WATCH','WATER','WAVE','WAY','WE','WEAK','WEAPON','WEAR','WEATHER','WEEK','WEEKEND','WEIGHT','WELCOME','WELFARE','WELL','WEST','WESTERN','WHAT','WHATEVER','WHEN','WHERE','WHEREAS','WHETHER','WHICH','WHILE','WHILST','WHITE','WHO','WHOLE','WHOM','WHOSE','WHY','WIDE','WIDELY','WIFE','WILD','WILL','WIN','WIND','WINDOW','WINE','WING','WINNER','WINTER','WISH','WITH','WITHDRAW','WITHIN','WITHOUT','WOMAN','WONDER','WONDERFUL','WOOD','WORD','WORK','WORKER','WORKING','WORKS','WORLD','WORRY','WORTH','WOULD','WRITE','WRITER','WRITING','WRONG','YARD','YEAH','YEAR','YES','YESTERDAY','YET','YOU','YOUNG','YOUR','YOURSELF','YOUTH']; + +codedTriangleNumbers(1786); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-420-2x2-positive-integer-matrix.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-420-2x2-positive-integer-matrix.spanish.md new file mode 100644 index 0000000000..95952f5894 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-420-2x2-positive-integer-matrix.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5111000cf542c510023 +challengeType: 5 +title: 'Problem 420: 2x2 positive integer matrix' +--- + +## Description +
+Una matriz de enteros positivos es una matriz cuyos elementos son todos enteros positivos. +Algunas matrices de enteros positivos se pueden expresar como un cuadrado de una matriz de enteros positivos de dos maneras diferentes. Este es un ejemplo: + + + + + +Definimos F (N) como el número de matrices de enteros positivos 2x2 que tienen una traza menor que N y que se pueden expresar como un cuadrado de una matriz de enteros positivos de dos maneras diferentes . +Podemos verificar que F (50) = 7 y F (1000) = 1019. + + + +Encuentre F (107). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler420() debe devolver 145159332. + testString: 'assert.strictEqual(euler420(), 145159332, "euler420() should return 145159332.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler420() { + // Good luck! + return true; +} + +euler420(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-421-prime-factors-of-n151.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-421-prime-factors-of-n151.spanish.md new file mode 100644 index 0000000000..18e3dd3dfd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-421-prime-factors-of-n151.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5131000cf542c510024 +challengeType: 5 +title: 'Problem 421: Prime factors of n15+1' +--- + +## Description +
+números de la forma n15 + 1 son compuestos para cada entero n> 1. +Para los enteros positivos n y m, s (n, m) se define como la suma de los distintos factores primos de n15 + 1 que no exceda m. + +Ej. 215 + 1 = 3 × 3 × 11 × 331. +So s (2,10) = 3 and s (2,1000) = 3 + 11 + 331 = 345. + +También 1015 + 1 = 7 × 11 × 13 × 211 × 241 × 2161 × 9091. +So s (10,100) = 31 y s (10,1000) = 483. +Encuentre ∑ s (n, 108) para 1 ≤ n ≤ 1011. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler421() debe devolver 2304215802083466200. + testString: 'assert.strictEqual(euler421(), 2304215802083466200, "euler421() should return 2304215802083466200.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler421() { + // Good luck! + return true; +} + +euler421(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-422-sequence-of-points-on-a-hyperbola.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-422-sequence-of-points-on-a-hyperbola.spanish.md new file mode 100644 index 0000000000..d5ffc49f49 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-422-sequence-of-points-on-a-hyperbola.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5131000cf542c510025 +challengeType: 5 +title: 'Problem 422: Sequence of points on a hyperbola' +--- + +## Description +
+Sea H la hipérbola definida por la ecuación 12x2 + 7xy - 12y2 = 625. + +Luego, defina X como el punto (7, 1). Se puede ver que X está en H. + +Ahora definimos una secuencia de puntos en H, {Pi: i ≥ 1}, como: +P1 = (13, 61/4). +P2 = (-43/6, -4). +Para i> 2, Pi es el punto único en H que es diferente de Pi-1 y, por lo tanto, la línea PiPi-1 es paralela a la línea Pi-2X. Se puede demostrar que Pi está bien definido y que sus coordenadas son siempre racionales. +Se le da que P3 = (-19/2, -229/24), P4 = (1267/144, -37/12) y P7 = (17194218091/143327232, 274748766781/1719926784). + +Encuentre Pn para n = 1114 en el siguiente formato: Si Pn = (a / b, c / d) donde las fracciones están en los términos más bajos y los denominadores son positivos, entonces la respuesta es (a + b + c + d ) mod 1 000 000 007. + +Para n = 7, la respuesta habría sido: 806236837. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler422() debe devolver 92060460. + testString: 'assert.strictEqual(euler422(), 92060460, "euler422() should return 92060460.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler422() { + // Good luck! + return true; +} + +euler422(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-423-consecutive-die-throws.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-423-consecutive-die-throws.spanish.md new file mode 100644 index 0000000000..f52d59bddd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-423-consecutive-die-throws.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f5141000cf542c510027 +challengeType: 5 +title: 'Problem 423: Consecutive die throws' +--- + +## Description +
+Sea n un entero positivo. +Un dado de 6 caras se lanza n veces. Sea c el número de pares de lanzamientos consecutivos que dan el mismo valor. + +Por ejemplo, si n = 7 y los valores de los lanzamientos del dado son (1,1,5,6,6,6,3), entonces los siguientes pares de lanzamientos consecutivos dan el mismo valor: +(1,1 , 5,6,6,6,3) +(1,1,5,6,6,6,3) +(1,1,5,6,6,6,3) +Por lo tanto, c = 3 para (1,1,5,6,6,6,3). + +Defina C (n) como el número de resultados de lanzar un dado de 6 caras n veces, de manera que c no exceda de π (n) .1 +Por ejemplo, C (3) = 216, C (4) = 1290 , C (11) = 361912500 y C (24) = 4727547363281250000. + +Defina S (L) como ∑ C (n) para 1 ≤ n ≤ L. +Por ejemplo, S (50) mod 1 000 000 007 = 832833871 . + +Encuentre S (50 000 000) mod 1 000 000 007. + +1 π denota la función de conteo de primos, es decir, π (n) es el número de primos ≤ n. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler423() debe devolver 653972374. + testString: 'assert.strictEqual(euler423(), 653972374, "euler423() should return 653972374.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler423() { + // Good luck! + return true; +} + +euler423(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-424-kakuro.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-424-kakuro.spanish.md new file mode 100644 index 0000000000..583ab3afa4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-424-kakuro.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f5141000cf542c510026 +challengeType: 5 +title: 'Problem 424: Kakuro' +--- + +## Description +
+Lo anterior es un ejemplo de un rompecabezas críptico kakuro (también conocido como sumas cruzadas, o incluso sumas cruzadas), con su solución final a la derecha. (Las reglas comunes de los rompecabezas kakuro se pueden encontrar fácilmente en numerosos sitios de Internet. Otra información relacionada también se puede encontrar actualmente en krazydad.com, cuyo autor ha proporcionado los datos del rompecabezas para este desafío.) + +El archivo de texto descargable (kakuro200.txt ) contiene la descripción de 200 rompecabezas de este tipo, una mezcla de tipos 5x5 y 6x6. El primer rompecabezas en el archivo es el ejemplo anterior que está codificado de la siguiente manera: + +6, X, X, (vCC), (vI), X, X, X, (hH), B, O, (vCA), (vJE), X, (hFE, vD), O, O, O, O, (hA), O, I, (hJC, vB), O, O, (hJC), H, O, O, O, X, X, X, (hJE), O, O, X + +El primer carácter es un dígito numérico que indica el tamaño de la cuadrícula de información. Sería un 6 (para un rompecabezas kakuro de 5x5) o un 7 (para un rompecabezas 6x6) seguido de una coma (,). La línea superior extra y la columna izquierda son necesarias para insertar información. + +El contenido de cada celda se describe y sigue con una coma, yendo de izquierda a derecha y comenzando por la línea superior. +X = celda gris, no se requiere que se llene con un dígito. +O (mayúscula) = Celda vacía blanca que se rellena con un dígito. +A = O cualquiera de las letras mayúsculas de la A a la J para ser reemplazada por su dígito equivalente en el rompecabezas resuelto. +() = Ubicación de las sumas cifradas. Las sumas horizontales están precedidas por una "h" minúscula y las sumas verticales están precedidas por una "v" minúscula. A estos le siguen una o dos letras mayúsculas, dependiendo de si la suma es un dígito único o un dígito doble. Para sumas de dos dígitos, la primera letra sería para las "decenas" y la segunda para las "unidades". Cuando la celda debe contener información para una suma tanto horizontal como vertical, la primera es siempre para la suma horizontal y las dos están separadas por una coma dentro del mismo conjunto de corchetes, ej .: (hFE, vD). Cada conjunto de corchetes también es seguido inmediatamente por una coma. + +La descripción de la última celda va seguida de un retorno de carro / avance de línea (CRLF) en lugar de una coma. + +La respuesta requerida a cada rompecabezas se basa en el valor de cada letra necesaria para llegar a la solución y de acuerdo con el orden alfabético. Como se indica en el ejemplo del rompecabezas, su respuesta sería 8426039571. Al menos 9 de las 10 cartas cifradas son siempre parte de la descripción del problema. Cuando solo se dan 9, al que falta se le debe asignar el dígito restante. + +Se da cuenta de que la suma de las respuestas para los primeros 10 rompecabezas en el archivo es 64414157580. + +Encuentra la suma de las respuestas para los 200 rompecabezas. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler424() debe devolver 1059760019628. + testString: 'assert.strictEqual(euler424(), 1059760019628, "euler424() should return 1059760019628.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler424() { + // Good luck! + return true; +} + +euler424(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-425-prime-connection.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-425-prime-connection.spanish.md new file mode 100644 index 0000000000..06bd2f824f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-425-prime-connection.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f5151000cf542c510028 +challengeType: 5 +title: 'Problem 425: Prime connection' +--- + +## Description +
+Se dice que dos números positivos A y B están conectados (denotado por "A ↔ B") si se cumple una de estas condiciones: +(1) A y B tienen la misma longitud y difieren exactamente en un dígito; por ejemplo, 123 ↔ 173. +(2) Al agregar un dígito a la izquierda de A (o B), B (o A); por ejemplo, 23 ↔ 223 y 123 ↔ 23. + + +Llamamos a un primo P a 2 relativo si existe una cadena de primos conectados entre 2 y P y ningún primo en la cadena excede a P. + + +Por ejemplo, 127 es un pariente de 2. Una de las posibles cadenas se muestra a continuación: +2 ↔ 3 ↔ 13 ↔ 113 ↔ 103 ↔ 107 ↔ 127 +Sin embargo, 11 y 103 no son parientes de 2. + + +Sea F (N) la suma de los números primos ≤ N que no son parientes de 2. +Podemos verificar que F (103) = 431 y F (104) = 78728. + + +Encuentre F (107). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler425() debe devolver 46479497324. + testString: 'assert.strictEqual(euler425(), 46479497324, "euler425() should return 46479497324.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler425() { + // Good luck! + return true; +} + +euler425(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-426-box-ball-system.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-426-box-ball-system.spanish.md new file mode 100644 index 0000000000..b94ecfedb1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-426-box-ball-system.spanish.md @@ -0,0 +1,85 @@ +--- +id: 5 +localeTitle: 5900f5171000cf542c510029 +challengeType: 5 +title: 'Problem 426: Box-ball system' +--- + +## Description +
+Considera una fila infinita de cajas. Algunas de las cajas contienen una bola. Por ejemplo, una configuración inicial de 2 casillas ocupadas consecutivas seguidas de 2 casillas vacías, 2 casillas ocupadas, 1 casilla vacía y 2 casillas ocupadas se pueden denotar mediante la secuencia (2, 2, 2, 1, 2), en la que el número de casillas ocupadas y vacías consecutivas aparecen alternativamente. + + +Un turno consiste en mover cada bola exactamente una vez de acuerdo con la siguiente regla: Transfiera la bola de la izquierda que no se haya movido a la casilla vacía más cercana a su derecha. + + +Después de un giro, la secuencia (2, 2, 2, 1, 2) se convierte en (2, 2, 1, 2, 3) como se puede ver a continuación; Tenga en cuenta que comenzamos la nueva secuencia a partir de la primera casilla ocupada. + + + + + + +Un sistema como este se denomina sistema Box-Ball o BBS para abreviar. + + +Se puede mostrar que después de un número suficiente de turnos, el sistema evoluciona a un estado en el que los números consecutivos de casillas ocupadas son invariantes. En el siguiente ejemplo, los números consecutivos de cuadros ocupados evolucionan a [1, 2, 3]; Llamaremos a esto el estado final. + + + + + + +Definimos la secuencia {ti}: s0 = 290797 +sk + 1 = sk2 mod 50515093 +tk = (sk mod 64) + 1 + +A partir de la configuración inicial (t0, t1,…, t10), el estado final se convierte en [1, 3, 10, 24, 51, 75]. +A partir de la configuración inicial (t0, t1,…, t10 000 000), encuentre el estado final. +Da como respuesta la suma de los cuadrados de los elementos del estado final. Por ejemplo, si el estado final es [1, 2, 3], entonces 14 (= 12 + 22 + 32) es su respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler426() debe devolver 31591886008. + testString: 'assert.strictEqual(euler426(), 31591886008, "euler426() should return 31591886008.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler426() { + // Good luck! + return true; +} + +euler426(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-427-n-sequences.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-427-n-sequences.spanish.md new file mode 100644 index 0000000000..4e53b907cf --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-427-n-sequences.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f5181000cf542c51002a +challengeType: 5 +title: 'Problem 427: n-sequences' +--- + +## Description +
+Una secuencia de enteros S = {si} se llama una secuencia n si tiene n elementos y cada elemento si satisface 1 ≤ si ≤ n. Así, hay nn secuencias n distintas en total. +Por ejemplo, la secuencia S = {1, 5, 5, 10, 7, 7, 7, 2, 3, 7} es una secuencia de 10. + +Para cualquier secuencia S, sea L (S) la longitud de la subsecuencia contigua más larga de S con el mismo valor. +Por ejemplo, para la secuencia S anterior, L (S) = 3, debido a los tres 7 consecutivos. + +Sea f (n) = ∑ L (S) para todas las n secuencias S. + +Por ejemplo, f (3) = 45, f (7) = 1403689 yf (11) = 481496895121. + +Encuentre f (7 500 000) mod 1 000 000 009. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler427() debe devolver 97138867. + testString: 'assert.strictEqual(euler427(), 97138867, "euler427() should return 97138867.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler427() { + // Good luck! + return true; +} + +euler427(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-428-necklace-of-circles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-428-necklace-of-circles.spanish.md new file mode 100644 index 0000000000..3f9c395531 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-428-necklace-of-circles.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f5191000cf542c51002b +challengeType: 5 +title: 'Problem 428: Necklace of Circles' +--- + +## Description +
+Sean a , b y c números positivos. +Sean W, X, Y, Z cuatro puntos colineales donde | WX | = a , | XY | = b , | YZ | = c y | WZ | = a + b + c . +Sea C en el círculo que tiene el diámetro XY. +Sea C Out Sé el círculo que tiene el WZ diámetro. + +El triplete ( a , b , c ) se denomina collar triplete si puede colocar k ≥ 3 círculos distintos C 1 , C 2 , ..., C k tal que: +
  • C i no tiene puntos interiores comunes con ningún C j para 1 ≤ i , jk y ij ,
  • C i es tangente a C in y C out para 1 ≤ ik ,
  • C i es tangente a C i +1 para 1 ≤ i < k , y
  • C k es tangente a C 1 .
+Por ejemplo, (5, 5, 5) y (4, 3, 21) son trillizos de collar, mientras que se puede mostrar que (2, 2, 5) no lo es. +una representación visual de un collar trío + +Sea T ( n ) el número de tripletes de collar ( a , b , c ) de modo que a , b y c sean enteros positivos, y bn . +Por ejemplo, T (1) = 9, T (20) = 732 y T (3000) = 438106. + +Encuentre T (1 000 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: necklace(1000000000) debe devolver 747215561862. + testString: 'assert.strictEqual(necklace(1000000000), 747215561862, "necklace(1000000000) should return 747215561862.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function necklace(n) { + // Good luck! + return true; +} + +necklace(1000000000) +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-429-sum-of-squares-of-unitary-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-429-sum-of-squares-of-unitary-divisors.spanish.md new file mode 100644 index 0000000000..554f72b76c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-429-sum-of-squares-of-unitary-divisors.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5191000cf542c51002c +challengeType: 5 +title: 'Problem 429: Sum of squares of unitary divisors' +--- + +## Description +
+Un divisor unitario d de un número n es un divisor de n que tiene la propiedad gcd (d, n / d) = 1. +Los divisores unitarios de 4! = 24 son 1, 3, 8 y 24. +La suma de sus cuadrados es 12 + 32 + 82 + 242 = 650. + + +Sea S (n) la suma de los cuadrados de los divisores unitarios de n. Así S (4!) = 650. + + +Encuentra S (100 000 000!) Módulo 1 000 000 009. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler429() debe devolver 98792821. + testString: 'assert.strictEqual(euler429(), 98792821, "euler429() should return 98792821.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler429() { + // Good luck! + return true; +} + +euler429(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-43-sub-string-divisibility.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-43-sub-string-divisibility.spanish.md new file mode 100644 index 0000000000..b7ae5f4e6f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-43-sub-string-divisibility.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f3971000cf542c50feaa +challengeType: 5 +title: 'Problem 43: Sub-string divisibility' +--- + +## Description +
+El número, 1406357289, es un número pandigital de 0 a 9 porque está formado por cada uno de los dígitos 0 a 9 en algún orden, pero también tiene una propiedad de divisibilidad de sub-cadena bastante interesante. +Sea d1 el primer dígito, d2 el segundo dígito, etc. De esta manera, notamos lo siguiente: +d2d3d4 = 406 es divisible por 2 +d3d4d5 = 063 es divisible por 3 +d4d5d6 = 635 es divisible por 5 +d5d6d7 = 357 es divisible por 7 +d6d7d8 = 572 es divisible por 11 +d7d8d9 = 728 es divisible por 13 +d8d9d10 = 289 es divisible por 17 +Encuentra los números de todos los 0 a 9 números pandigitales con esta propiedad. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' substringDivisibility() debe devolver [1430952867, 1460357289, 1406357289, 4130952867, 4160357289, 4106357289].' + testString: 'assert.deepEqual(substringDivisibility(), [ 1430952867, 1460357289, 1406357289, 4130952867, 4160357289, 4106357289 ], "substringDivisibility() should return [ 1430952867, 1460357289, 1406357289, 4130952867, 4160357289, 4106357289 ].");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function substringDivisibility() { + // Good luck! + return []; +} + +substringDivisibility(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-430-range-flips.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-430-range-flips.spanish.md new file mode 100644 index 0000000000..ea22a3ed88 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-430-range-flips.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f51a1000cf542c51002d +challengeType: 5 +title: 'Problem 430: Range flips' +--- + +## Description +
+discos N se colocan en una fila, indexados de 1 a N de izquierda a derecha. +Cada disco tiene un lado negro y un lado blanco. Inicialmente todos los discos muestran su lado blanco. + +En cada turno, dos enteros A y B, no necesariamente distintos, entre 1 y N (inclusive) se eligen de manera uniforme y aleatoria. +Todos los discos con un índice de A a B (inclusive) se invierten. + +El siguiente ejemplo muestra el caso N = 8. En el primer turno A = 5 y B = 2, y en el segundo turno A = 4 y B = 6. + + + +Sea E (N, M) el número esperado de discos que muestran su lado blanco después de que M gira. +Podemos verificar que E (3, 1) = 10/9, E (3, 2) = 5/3, E (10, 4) ≈ 5.157 y E (100, 10) ≈ 51.893. + +Encuentra E (1010, 4000). +Da tu respuesta redondeada a 2 lugares decimales detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler430() debe devolver 5000624921.38. + testString: 'assert.strictEqual(euler430(), 5000624921.38, "euler430() should return 5000624921.38.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler430() { + // Good luck! + return true; +} + +euler430(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-431-square-space-silo.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-431-square-space-silo.spanish.md new file mode 100644 index 0000000000..cb390f7ebd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-431-square-space-silo.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f51b1000cf542c51002e +challengeType: 5 +title: 'Problem 431: Square Space Silo' +--- + +## Description +
+Fred, el granjero, hace arreglos para tener un nuevo silo de almacenamiento instalado en su granja y, teniendo una obsesión por todo lo relacionado con las cosas, está absolutamente devastado cuando descubre que es circular. Quentin, el representante de la compañía que instaló el silo, explica que solo fabrican silos cilíndricos, pero señala que está apoyado en una base cuadrada. Fred no se divierte e insiste en que se retire de su propiedad. + +Pensamiento rápido Quentin explica que cuando se suministran materiales granulares desde arriba, se forma una pendiente cónica y el ángulo natural formado con la horizontal se denomina ángulo de reposo. Por ejemplo, si el ángulo de reposo, $ \ alpha = 30 $ grados, y el grano se entrega en el centro del silo, se formará un cono perfecto hacia la parte superior del cilindro. En el caso de este silo, que tiene un diámetro de 6 m, la cantidad de espacio desperdiciado sería de aproximadamente 32.648388556 m3. Sin embargo, si el grano se entrega en un punto en la parte superior que tiene una distancia horizontal de $ x $ metros desde el centro, se forma un cono con una base extrañamente curvada e inclinada. Le muestra a Fred una foto. + + + + +Dejaremos que la cantidad de espacio desperdiciado en metros cúbicos se dé en $ V (x) $. Si $ x = 1.114785284 $, que tiene tres decimales cuadrados, entonces la cantidad de espacio desperdiciado, $ V (1.114785284) \ approx 36 $. Dada la variedad de soluciones posibles para este problema, hay exactamente otra opción: $ V (2.511167869) \ approx 49 $. Sería como saber que la plaza es el rey del silo, sentada en espléndida gloria sobre tu grano. + +Los ojos de Fred se iluminan con deleite ante esta elegante resolución, pero al examinar más de cerca los dibujos y cálculos de Quentin, su felicidad se convierte en desánimo una vez más. Fred señala a Quentin que el radio del silo es de 6 metros, no el diámetro, y el ángulo de reposo para su grano es de 40 grados. Sin embargo, si Quentin puede encontrar un conjunto de soluciones para este silo en particular, entonces estará más que feliz de mantenerlo. + +Si Quentin piensa rápido, satisface de manera frustrante el apetito de Fred el granjero por el cuadrado de todas las cosas, luego determine los valores de $ x $ para todas las opciones posibles de desperdicio de espacio cuadrado y calcule $ \ sum x $ correcto a 9 lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler431() debe devolver 23.386029052. + testString: 'assert.strictEqual(euler431(), 23.386029052, "euler431() should return 23.386029052.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler431() { + // Good luck! + return true; +} + +euler431(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-432-totient-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-432-totient-sum.spanish.md new file mode 100644 index 0000000000..52b93c7eec --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-432-totient-sum.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f51e1000cf542c510030 +challengeType: 5 +title: 'Problem 432: Totient sum' +--- + +## Description +
+Sea S (n, m) = ∑φ (n × i) para 1 ≤ i ≤ m. (φ es la función total de Euler) +Se le da que S (510510,106) = 45480596821125120. + + +Encuentre S (510510,1011). +Da los últimos 9 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler432() debe devolver 754862080. + testString: 'assert.strictEqual(euler432(), 754862080, "euler432() should return 754862080.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler432() { + // Good luck! + return true; +} + +euler432(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-433-steps-in-euclids-algorithm.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-433-steps-in-euclids-algorithm.spanish.md new file mode 100644 index 0000000000..a342d6a39b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-433-steps-in-euclids-algorithm.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f51d1000cf542c51002f +challengeType: 5 +title: 'Problem 433: Steps in Euclid"s algorithm' +--- + +## Description +
+Sea E (x0, y0) el número de pasos necesarios para determinar el mayor divisor común de x0 y y0 con el algoritmo de Euclid. Más formalmente: x1 = y0, y1 = x0 mod y0xn = yn-1, yn = xn-1 mod yn-1 +E (x0, y0) es la n más pequeña tal que yn = 0. + + +Tenemos E ( 1,1) = 1, E (10,6) = 3 y E (6,10) = 4. + + +Defina S (N) como la suma de E (x, y) para 1 ≤ x, y ≤ N. +Tenemos S (1) = 1, S (10) = 221 y S (100) = 39826. + + +Encuentra S (5 · 106). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler433() debe devolver 326624372659664. + testString: 'assert.strictEqual(euler433(), 326624372659664, "euler433() should return 326624372659664.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler433() { + // Good luck! + return true; +} + +euler433(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-434-rigid-graphs.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-434-rigid-graphs.spanish.md new file mode 100644 index 0000000000..c88c01435a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-434-rigid-graphs.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f51f1000cf542c510031 +challengeType: 5 +title: 'Problem 434: Rigid graphs' +--- + +## Description +
+Recuerde que una gráfica es una colección de vértices y bordes que conectan los vértices, y que dos vértices conectados por un borde se denominan adyacentes. +gráficas se pueden incrustar en el espacio euclidiano al asociar cada vértice con un punto en el espacio euclidiano. +Un gráfico flexible es una incrustación de un gráfico en el que es posible mover uno o más vértices de manera continua, de modo que la distancia entre al menos dos vértices no adyacentes se altera mientras las distancias entre cada par de vértices adyacentes se mantienen constantes. +Un gráfico rígido es una incrustación de un gráfico que no es flexible. +Informalmente, una gráfica es rígida si al reemplazar los vértices con bisagras totalmente giratorias y los bordes con varillas que son inflexibles e inelásticos, ninguna parte de la gráfica se puede mover independientemente del resto de la gráfica. + +Los gráficos de cuadrícula incrustados en el plano euclidiano no son rígidos, como lo demuestra la siguiente animación: +Sin embargo, se pueden hacer rígidos agregando bordes diagonales a las celdas. Por ejemplo, para el gráfico de cuadrícula de 2x3, hay 19 formas de hacer que el gráfico sea rígido: +Tenga en cuenta que para los propósitos de este problema, no consideramos cambiar la orientación de un borde diagonal o agregar ambos bordes diagonales a una celda como un Diferente forma de hacer una cuadrícula gráfica rígida. + +Sea R (m, n) el número de formas para hacer que la gráfica de la cuadrícula m × n sea rígida. +Por ejemplo, R (2,3) = 19 y R (5,5) = 23679901 + +Defina S (N) como ∑R (i, j) para 1 ≤ i, j ≤ N. +Por ejemplo, S (5) = 25021721. +Encuentre S (100), dé su respuesta módulo 1000000033 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler434() debe devolver 863253606. + testString: 'assert.strictEqual(euler434(), 863253606, "euler434() should return 863253606.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler434() { + // Good luck! + return true; +} + +euler434(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-435-polynomials-of-fibonacci-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-435-polynomials-of-fibonacci-numbers.spanish.md new file mode 100644 index 0000000000..720c144bad --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-435-polynomials-of-fibonacci-numbers.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f5201000cf542c510032 +challengeType: 5 +title: 'Problem 435: Polynomials of Fibonacci numbers' +--- + +## Description +
+Los números de Fibonacci {fn, n ≥ 0} se definen recursivamente como fn = fn-1 + fn-2 con los casos base f0 = 0 y f1 = 1. +Defina los polinomios {Fn, n ≥ 0} como Fn (x ) = ∑fixi para 0 ≤ i ≤ n. +Por ejemplo, F7 (x) = x + x2 + 2x3 + 3x4 + 5x5 + 8x6 + 13x7, y F7 (11) = 268357683. +Sea n = 1015. Encuentre la suma [∑0≤x≤100 Fn (x )] mod 1307674368000 (= 15!). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler435() debe devolver 252541322550. + testString: 'assert.strictEqual(euler435(), 252541322550, "euler435() should return 252541322550.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler435() { + // Good luck! + return true; +} + +euler435(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-436-unfair-wager.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-436-unfair-wager.spanish.md new file mode 100644 index 0000000000..0f604cd2d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-436-unfair-wager.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f5221000cf542c510033 +challengeType: 5 +title: 'Problem 436: Unfair wager' +--- + +## Description +
+Julie le propone la siguiente apuesta a su hermana Louise. +Ella sugiere que jueguen un juego de azar para determinar quién lavará los platos. +Para este juego, usarán un generador de números aleatorios independientes distribuidos uniformemente entre 0 y 1. +El juego comienza con S = 0. +La primera jugadora, Louise, suma a S diferentes números aleatorios del generador hasta que S> 1 y registra su último número aleatorio 'x'. +La segunda jugadora, Julie, continúa agregando a S diferentes números aleatorios del generador hasta S> 2 y registra su último número aleatorio 'y'. +El jugador con el número más alto gana y el perdedor lava los platos, es decir, si y> x el segundo jugador gana. + +Por ejemplo, si el primer jugador roba 0.62 y 0.44, el primer turno de jugador termina desde 0.62 + 0.44> 1 yx = 0.44. +Si los segundos jugadores empatan 0.1, 0.27 y 0.91, el segundo turno de jugador termina desde 0.62 + 0.44 + 0.1 + 0.27 + 0.91> 2 y y = 0.91. +Desde y> x, el segundo jugador gana. + +Louise lo piensa por un segundo, y se opone: "Eso no es justo". +¿Cuál es la probabilidad de que el segundo jugador gane? +Da tu respuesta redondeada a 10 lugares detrás del punto decimal en la forma 0.abcdefghij +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler436() debe devolver 0.5276662759. + testString: 'assert.strictEqual(euler436(), 0.5276662759, "euler436() should return 0.5276662759.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler436() { + // Good luck! + return true; +} + +euler436(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-437-fibonacci-primitive-roots.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-437-fibonacci-primitive-roots.spanish.md new file mode 100644 index 0000000000..30ab7b3dda --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-437-fibonacci-primitive-roots.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f5241000cf542c510036 +challengeType: 5 +title: 'Problem 437: Fibonacci primitive roots' +--- + +## Description +
+Cuando calculamos 8n módulo 11 para n = 0 a 9 obtenemos: 1, 8, 9, 6, 4, 10, 3, 2, 5, 7. +Como vemos, ocurren todos los valores posibles de 1 a 10. Entonces, 8 es una raíz primitiva de 11. +Pero hay más: +Si observamos de cerca, vemos: +1 + 8 = 9 +8 + 9 = 17≡6 mod 11 +9 + 6 = 15≡4 mod 11 +6 + 4 = 10 +4 + 10 = 14≡3 mod 11 +10 + 3 = 13≡2 mod 11 +3 + 2 = 5 +2 + 5 = 7 +5 + 7 = 12≡1 mod 11. + +Así que las potencias de 8 mod 11 son cíclicas con el período 10, y 8n + 8n + 1 ≡ 8n + 2 (mod 11). +8 se denomina raíz primitiva de Fibonacci de 11. +No todos los primos tienen una raíz primitiva de Fibonacci. +Hay 323 primos menos de 10000 con una o más raíces primitivas de Fibonacci y la suma de estos primos es 1480491. +Halla la suma de los primos menos de 100,000,000 con al menos una raíz primitiva de Fibonacci. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler437() debe devolver 74204709657207. + testString: 'assert.strictEqual(euler437(), 74204709657207, "euler437() should return 74204709657207.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler437() { + // Good luck! + return true; +} + +euler437(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-438-integer-part-of-polynomial-equations-solutions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-438-integer-part-of-polynomial-equations-solutions.spanish.md new file mode 100644 index 0000000000..bd2e41b7f9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-438-integer-part-of-polynomial-equations-solutions.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5231000cf542c510034 +challengeType: 5 +title: 'Problem 438: Integer part of polynomial equation"s solutions' +--- + +## Description +
+Para una n-tupla de enteros t = (a1, ..., an), sea (x1, ..., xn) las soluciones de la ecuación polinomial xn + a1xn-1 + a2xn-2 + ... + an-1x + an = 0. + + +Considere las siguientes dos condiciones: +x1, ..., xn son todas reales. +Si x1, ..., xn están ordenados, ⌊xi⌋ = i para 1 ≤ i ≤ n. (⌊ · ⌋: función de piso.) + +En el caso de n = 4, hay 12 nuplas de enteros que satisfacen ambas condiciones. +Definimos S (t) como la suma de los valores absolutos de los enteros en t. +Para n = 4 podemos verificar que ∑S (t) = 2087 para todas las n-tuplas t que satisfacen ambas condiciones. + + +Encuentra ∑S (t) para n = 7. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler438() debe devolver 2046409616809. + testString: 'assert.strictEqual(euler438(), 2046409616809, "euler438() should return 2046409616809.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler438() { + // Good luck! + return true; +} + +euler438(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-439-sum-of-sum-of-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-439-sum-of-sum-of-divisors.spanish.md new file mode 100644 index 0000000000..2b42aacd02 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-439-sum-of-sum-of-divisors.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f5231000cf542c510035 +challengeType: 5 +title: 'Problem 439: Sum of sum of divisors' +--- + +## Description +
+Sea d (k) la suma de todos los divisores de k. +Definimos la función S (N) = ∑1≤i≤N ∑1≤j≤Nd (i · j). +Por ejemplo, S (3) = d (1) + d (2) + d (3) + d (2) + d (4) + d (6) + d (3) + d (6) + d (9) = 59. + +Se le da que S (103) = 563576517282 y S (105) mod 109 = 215766508. +Encuentre S (1011) mod 109. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler439() debe devolver 968697378. + testString: 'assert.strictEqual(euler439(), 968697378, "euler439() should return 968697378.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler439() { + // Good luck! + return true; +} + +euler439(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-44-pentagon-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-44-pentagon-numbers.spanish.md new file mode 100644 index 0000000000..fb79e5f2f1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-44-pentagon-numbers.spanish.md @@ -0,0 +1,88 @@ +--- +id: 5 +localeTitle: 5900f3981000cf542c50feab +challengeType: 5 +title: 'Problem 44: Pentagon numbers' +--- + +## Description +
+números pentagonales son generados por la fórmula, P n = n (3 n −1) / 2. Los primeros diez números pentagonales son: +1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... +Se puede ver que P 4 + P 7 = 22 + 70 = 92 = P 8 . Sin embargo, su diferencia, 70 - 22 = 48, no es pentagonal. +Encuentra el par de números pentagonales, P j y P k , para los cuales su suma y diferencia son pentagonales y D = | P k - P j | se minimiza ¿Cuál es el valor de D? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: pentagonNumbers() debe devolver 5482660. + testString: 'assert.strictEqual(pentagonNumbers(), 5482660, "pentagonNumbers() should return 5482660.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function pentagonNumbers() { + // Good luck! + return true; +} + +pentagonNumbers(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function pentagonNumbers() { + function isPentagonal(num) { + // Formula found by solving pentagonal number + // equation for n. + const n = (Math.sqrt((24 * num) + 1) + 1) / 6; + return n % 1 === 0; + } + + function pentagonal(num) { + return (num * ((3 * num) - 1)) / 2; + } + let result; + let i = 1; + while (!result) { + i++; + const num1 = (i * ((3 * i) - 1)) / 2; // Pentagonal num formula + const minDiff = num1 - (((i - 1) * ((3 * (i - 1)) - 1)) / 2); + let j = i - 1; + while (j > 0 && !result) { + const num2 = (j * ((3 * j) - 1)) / 2; + if (isPentagonal(num1 - num2) && isPentagonal(num1 + num2)) { + result = num1 - num2; + } + j--; + } + } + return result; + } +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-440-gcd-and-tiling.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-440-gcd-and-tiling.spanish.md new file mode 100644 index 0000000000..5f4a142de1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-440-gcd-and-tiling.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f5241000cf542c510037 +challengeType: 5 +title: 'Problem 440: GCD and Tiling' +--- + +## Description +
+Queremos armar un tablero de longitud n y altura 1 completamente, con bloques 1 × 2 o bloques 1 × 1 con un solo dígito decimal en la parte superior: + +Por ejemplo, estas son algunas de las formas de mosaico de un tablero de longitud n = 8: + +Sea T (n) el número de formas para formar una tabla de longitud n como se describió anteriormente. + +Por ejemplo, T (1) = 10 y T (2) = 101. + +Sea S (L) la suma triple ∑a, b, c gcd (T (ca), T (cb)) para 1 ≤ a, b, c ≤ L. +Por ejemplo: +S (2) = 10444 +S (3) = 1292115238446807016106539989 +S (4) mod 987 898 789 = 670616280. + +Encuentra S (2000) mod 987 898 789 . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler440() debe devolver 970746056. + testString: 'assert.strictEqual(euler440(), 970746056, "euler440() should return 970746056.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler440() { + // Good luck! + return true; +} + +euler440(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-441-the-inverse-summation-of-coprime-couples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-441-the-inverse-summation-of-coprime-couples.spanish.md new file mode 100644 index 0000000000..4bff486ec0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-441-the-inverse-summation-of-coprime-couples.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f5261000cf542c510038 +challengeType: 5 +title: 'Problem 441: The inverse summation of coprime couples' +--- + +## Description +
+Para un entero M, definimos R (M) como la suma de 1 / (p · q) para todos los pares de enteros pyq que satisfacen todas estas condiciones: + +1 ≤ p <q ≤ M +p + q ≥ M +p y q son coprime. + +También definimos S (N) como la suma de R (i) para 2 ≤ i ≤ N. +Podemos verificar que S (2) = R (2) = 1/2, S (10) ≈ 6.9147 y S (100) ≈ 58.2962. + + +Encuentra S (107). Da tu respuesta redondeada a cuatro lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler441() debe devolver 5000088.8395. + testString: 'assert.strictEqual(euler441(), 5000088.8395, "euler441() should return 5000088.8395.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler441() { + // Good luck! + return true; +} + +euler441(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-442-eleven-free-integers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-442-eleven-free-integers.spanish.md new file mode 100644 index 0000000000..ce943b9516 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-442-eleven-free-integers.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f5271000cf542c510039 +challengeType: 5 +title: 'Problem 442: Eleven-free integers' +--- + +## Description +
+Un entero se llama once libre si su expansión decimal no contiene ninguna subcadena que represente una potencia de 11 excepto 1. + +Por ejemplo, 2404 y 13431 no tienen once, mientras que 911 y 4121331 no lo son. + +Sea E (n) el enésimo entero positivo libre de once. Por ejemplo, E (3) = 3, E (200) = 213 y E (500 000) = 531563. + +Encuentre E (1018). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler442() debe devolver 1295552661530920200. + testString: 'assert.strictEqual(euler442(), 1295552661530920200, "euler442() should return 1295552661530920200.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler442() { + // Good luck! + return true; +} + +euler442(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-443-gcd-sequence.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-443-gcd-sequence.spanish.md new file mode 100644 index 0000000000..cf3cfa225a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-443-gcd-sequence.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5271000cf542c51003a +challengeType: 5 +title: 'Problem 443: GCD sequence' +--- + +## Description +
+Sea g (n) una secuencia definida de la siguiente manera: +g (4) = 13, +g (n) = g (n-1) + gcd (n, g (n-1)) para n> 4. + +Los primeros valores son: + +n4567891011121314151617181920 ... +g (n) 1314161718272829303132333451545560 ... + + +Se le da que g (1 000) = 2524 yg (1 000 000) = 2624152. + +Buscar g (1015). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler443() debe devolver 2744233049300770. + testString: 'assert.strictEqual(euler443(), 2744233049300770, "euler443() should return 2744233049300770.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler443() { + // Good luck! + return true; +} + +euler443(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-444-the-roundtable-lottery.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-444-the-roundtable-lottery.spanish.md new file mode 100644 index 0000000000..07a7dee61a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-444-the-roundtable-lottery.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f52a1000cf542c51003b +challengeType: 5 +title: 'Problem 444: The Roundtable Lottery' +--- + +## Description +
+Un grupo de personas decide sentarse en una mesa redonda y jugar un juego de intercambio de boletos de lotería. Cada persona comienza con un boleto de lotería sin puntuación asignado al azar. Cada boleto, cuando se rasca, revela un premio de una libra entera que va desde £ 1 a £ p, sin dos boletos iguales. El objetivo del juego es que cada persona maximice sus ganancias de boletos al abandonar el juego. + +Se elige una persona arbitraria para ser el primer jugador. Al ir alrededor de la mesa, cada jugador tiene solo una de dos opciones: + +1. El jugador puede rascar su boleto y revelar su valor a todos en la mesa. +2. El jugador puede cambiar su boleto sin puntuación por un boleto rayado de un jugador anterior, y luego dejar el juego con ese boleto. El jugador anterior luego rasca su boleto recién adquirido y revela su valor para todos en la mesa. + +El juego termina una vez que todas las entradas han sido rayadas. Todos los jugadores que queden en la mesa deben irse con sus boletos actualmente retenidos. + +Suponga que cada jugador utiliza la estrategia óptima para maximizar el valor esperado de sus ganancias de boletos. + +Sea E (p) el número esperado de jugadores que quedan en la mesa cuando el juego termina en un juego que consiste en jugadores p (por ejemplo, E (111) = 5.2912 cuando se redondea a 5 dígitos significativos). + +Deje que S1 (N) = E (p) +Deje que Sk (N) = Sk-1 (p) para k> 1 + +Encuentre S20 (1014) y escriba la respuesta en notación científica redondeada a 10 dígitos significativos. Use una e minúscula para separar la mantisa y el exponente (por ejemplo, S3 (100) = 5.983679014e5). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler444() debe devolver 1.200856722e + 263. + testString: 'assert.strictEqual(euler444(), 1.200856722e+263, "euler444() should return 1.200856722e+263.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler444() { + // Good luck! + return true; +} + +euler444(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-445-retractions-a.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-445-retractions-a.spanish.md new file mode 100644 index 0000000000..e995611e7a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-445-retractions-a.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f52a1000cf542c51003c +challengeType: 5 +title: 'Problem 445: Retractions A' +--- + +## Description +
+Para cada entero n> 1, la familia de funciones fn, a, b se define +por fn, a, b (x) ≡ax + b mod n para a, b, x entero y 0 0 Llamaremos retracción de fn, a, ba si fn, a, b (fn, a, b (x)) ≡fn, a, b (x) mod n para cada 0≤x 0 Sea R (n) el número de retracciones para n. + + +Se le da que +∑ R (c) para c = C (100 000, k), y 1 ≤ k ≤99 999 ≡628701600 (mod 1 000 000 007). +(C (n, k) es el coeficiente binomial). + +Encuentre ∑ R (c) para c = C (10 000 000, k), y 1 ≤k≤ 9 999 999. +Dé su respuesta módulo 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler445() debe devolver 659104042. + testString: 'assert.strictEqual(euler445(), 659104042, "euler445() should return 659104042.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler445() { + // Good luck! + return true; +} + +euler445(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-446-retractions-b.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-446-retractions-b.spanish.md new file mode 100644 index 0000000000..261c70243f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-446-retractions-b.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f52c1000cf542c51003d +challengeType: 5 +title: 'Problem 446: Retractions B' +--- + +## Description +
+Para cada entero n> 1, la familia de funciones fn, a, b se define +por fn, a, b (x) ≡ax + b mod n para a, b, x entero y 0 0 Llamaremos retracción de fn, a, ba si fn, a, b (fn, a, b (x)) ≡fn, a, b (x) mod n para cada 0≤x 0 Sea R (n) el número de retracciones para n. + + +F (N) = ∑R (n4 + 4) para 1≤n≤N. +F (1024) = 77532377300600. + +Encuentra F (107) (mod 1 000 000 007) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler446() debe devolver 907803852. + testString: 'assert.strictEqual(euler446(), 907803852, "euler446() should return 907803852.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler446() { + // Good luck! + return true; +} + +euler446(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-447-retractions-c.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-447-retractions-c.spanish.md new file mode 100644 index 0000000000..6dceba375f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-447-retractions-c.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f52c1000cf542c51003e +challengeType: 5 +title: 'Problem 447: Retractions C' +--- + +## Description +
+Para cada entero n> 1, la familia de funciones fn, a, b se define +por fn, a, b (x) ≡ax + b mod n para a, b, x entero y 0 0 Llamaremos retracción de fn, a, ba si fn, a, b (fn, a, b (x)) ≡fn, a, b (x) mod n para cada 0≤x 0 Sea R (n) el número de retracciones para n. + + +F (N) = ∑R (n) para 2≤n≤N. +F (107) ≡638042271 (mod 1 000 000 007). + + +Encuentra F (1014) (mod 1 000 000 007). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler447() debe devolver 530553372. + testString: 'assert.strictEqual(euler447(), 530553372, "euler447() should return 530553372.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler447() { + // Good luck! + return true; +} + +euler447(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-448-average-least-common-multiple.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-448-average-least-common-multiple.spanish.md new file mode 100644 index 0000000000..6c910912ba --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-448-average-least-common-multiple.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f52c1000cf542c51003f +challengeType: 5 +title: 'Problem 448: Average least common multiple' +--- + +## Description +
+La función lcm (a, b) denota el mínimo común múltiplo de ay b. +Sea A (n) el promedio de los valores de mcm (n, i) para 1≤i≤n. +Por ejemplo: A (2) = (2 + 2) / 2 = 2 y A (10) = (10 + 10 + 30 + 20 + 10 + 30 + 70 + 40 + 90 + 10) / 10 = 32. + +Sea S (n) = ∑A (k) para 1≤k≤n. +S (100) = 122726. + + +Encuentra S (99999999019) mod 999999017. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler448() debe devolver 106467648. + testString: 'assert.strictEqual(euler448(), 106467648, "euler448() should return 106467648.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler448() { + // Good luck! + return true; +} + +euler448(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-449-chocolate-covered-candy.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-449-chocolate-covered-candy.spanish.md new file mode 100644 index 0000000000..6c0a83a6e8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-449-chocolate-covered-candy.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f52d1000cf542c510040 +challengeType: 5 +title: 'Problem 449: Chocolate covered candy' +--- + +## Description +
+Phil el pastelero está haciendo una nueva tanda de dulces cubiertos de chocolate. Cada centro de caramelo tiene la forma de un elipsoide de revolución definido por la ecuación: b2x2 + b2y2 + a2z2 = a2b2. + + +Phil quiere saber cuánto chocolate se necesita para cubrir un centro de caramelo con una capa uniforme de chocolate de un milímetro de espesor. +Si a = 1 mm yb = 1 mm, la cantidad de chocolate requerida es + +283 +π mm3 + +Si a = 2 mm yb = 1 mm, la cantidad de chocolate requerida es de aproximadamente 60.35475635 mm3. + + +Encuentre la cantidad de chocolate en mm3 requerida si a = 3 mm y b = 1 mm. Da tu respuesta como el número redondeado a 8 lugares decimales detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler449() debe devolver 103.37870096. + testString: 'assert.strictEqual(euler449(), 103.37870096, "euler449() should return 103.37870096.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler449() { + // Good luck! + return true; +} + +euler449(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-45-triangular-pentagonal-and-hexagonal.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-45-triangular-pentagonal-and-hexagonal.spanish.md new file mode 100644 index 0000000000..9ef625694b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-45-triangular-pentagonal-and-hexagonal.spanish.md @@ -0,0 +1,93 @@ +--- +id: 5 +localeTitle: 5900f3991000cf542c50feac +challengeType: 5 +title: 'Problem 45: Triangular, pentagonal, and hexagonal' +--- + +## Description +
+números de triángulo, pentagonal y hexagonal son generados por las siguientes fórmulas: +
Triángulo
T n = n ( n +1) / 2
1, 3, 6, 10, 15, ...
+
Pentagonal
P n = n (3 n −1) / 2
1, 5, 12, 22, 35, ...
+
Hexagonal
H n = n (2 n −1)
1, 6, 15, 28, 45, ...
+Se puede verificar que T 285 = P 165 = H 143 = 40755. +Encuentre el siguiente número de triángulo que también sea pentagonal y hexagonal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: triPentaHexa(40756) debe devolver 1533776805. + testString: 'assert.strictEqual(triPentaHexa(40756), 1533776805, "triPentaHexa(40756) should return 1533776805.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function triPentaHexa(n) { + // Good luck! + return true; +} + +triPentaHexa(40756); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function triPentaHexa(n) { + function triangular(num) { + return (num * (num + 1)) / 2; +} + +function isPentagonal(num) { + // Formula found by completing the square and + // solving for n. + const n = (Math.sqrt((24 * num) + 1) + 1) / 6; + return n % 1 === 0; +} + + function isHexagonal(num) { + // Formula found by completing the square and + // solving for n. + const n = Math.sqrt(0.5 * (num + (1 / 8))) + 0.25; + return n % 1 === 0; +} + +let iTri = n; +let tri; +let found = false; +while (!found) { + iTri++; + tri = triangular(iTri); + if (isPentagonal(tri) && isHexagonal(tri)) { + found = true; + } + } + return tri; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-450-hypocycloid-and-lattice-points.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-450-hypocycloid-and-lattice-points.spanish.md new file mode 100644 index 0000000000..467a13f694 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-450-hypocycloid-and-lattice-points.spanish.md @@ -0,0 +1,84 @@ +--- +id: 5 +localeTitle: 5900f52e1000cf542c510041 +challengeType: 5 +title: 'Problem 450: Hypocycloid and Lattice points' +--- + +## Description +
+Un hipocicloide es la curva dibujada por un punto en un círculo pequeño que gira dentro de un círculo más grande. Las ecuaciones paramétricas de un hipocicloide centrado en el origen y que comienzan en el punto más a la derecha vienen dadas por: +$ x (t) = (R - r) \ cos (t) + r \ cos (\ frac {R - r } rt) $ +$ y (t) = (R - r) \ sin (t) - r \ sin (\ frac {R - r} rt) $ +Donde R es el radio del círculo grande y r el radio del pequeño círculo. + + +Sea $ C (R, r) $ el conjunto de puntos distintos con coordenadas enteras en el hipocicloide con radio R y r, y para el cual hay un valor correspondiente de t tal que $ \ sin (t) $ y $ \ cos (t) $ son números racionales. + +Sea $ S (R, r) = \ sum _ {(x, y) \ en C (R, r)} | x | + | y ​​| $ es la suma de los valores absolutos de las coordenadas x e y de los puntos en $ C (R, r) $. + + +Sea $ T (N) = \ sum_ {R = 3} ^ N \ sum_ {r = 1} ^ {\ lfloor \ frac {R - 1} 2 \ rfloor} S (R, r) $ sea el suma de $ S (R, r) $ para R y r enteros positivos, $ R \ leq N $ y $ 2r <R $. + + +Se le da: C (3, 1) = +{(3, 0), (-1, 2), (-1,0), (-1, -2)} +C (2500, 1000 ) = +{(2500, 0), (772, 2376), (772, -2376), (516, 1792), +(516, -1792), (500, 0), (68, 504), ( 68, -504), (- 1356, 1088), (-1356, -1088), (-1500, 1000), (-1500, -1000)} + +Nota: (-625, 0) no es un elemento de C (2500, 1000) porque $ \ sin (t) $ no es un número racional para los valores correspondientes de t. + + +S (3, 1) = (| 3 | + | 0 |) + (| -1 | + | 2 |) + (| -1 | + | 0 |) + (| -1 | + | - 2 |) = 10 + +T (3) = 10; T (10) = 524; T (100) = 580442; T (103) = 583108600. + + +Encuentra T (106). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler450() debe devolver 583333163984220900. + testString: 'assert.strictEqual(euler450(), 583333163984220900, "euler450() should return 583333163984220900.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler450() { + // Good luck! + return true; +} + +euler450(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-451-modular-inverses.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-451-modular-inverses.spanish.md new file mode 100644 index 0000000000..5f5c76ef5b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-451-modular-inverses.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f5311000cf542c510042 +challengeType: 5 +title: 'Problem 451: Modular inverses' +--- + +## Description +
+Considere el número 15. +Hay ocho números positivos menores que 15 que son coprime a 15: 1, 2, 4, 7, 8, 11, 13, 14. +Los inversos modulares de estos números módulo 15 son: 1, 8, 4, 13, 2, 11, 7, 14 +porque +1 * 1 mod 15 = 1 +2 * 8 = 16 mod 15 = 1 +4 * 4 = 16 mod 15 = 1 +7 * 13 = 91 mod 15 = 1 +11 * 11 = 121 mod 15 = 1 +14 * 14 = 196 mod 15 = 1 + +Sea I (n) el mayor número positivo m más pequeño que n-1, de modo que el inverso modular de m módulo n es igual a m en sí. +Entonces yo (15) = 11. +También I (100) = 51 y I (7) = 1. + +Encuentra ∑I (n) para 3≤n≤2 · 107 +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler451() debe devolver 153651073760956. + testString: 'assert.strictEqual(euler451(), 153651073760956, "euler451() should return 153651073760956.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler451() { + // Good luck! + return true; +} + +euler451(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-452-long-products.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-452-long-products.spanish.md new file mode 100644 index 0000000000..a135300ce1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-452-long-products.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f5311000cf542c510043 +challengeType: 5 +title: 'Problem 452: Long Products' +--- + +## Description +
+Defina F (m, n) como el número de n-tuplas de enteros positivos para los cuales el producto de los elementos no excede de m. +F (10, 10) = 571. +F (106, 106) mod 1 234 567 891 = 252903833. +Encuentre F (109, 109) mod 1 234 567 891. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler452() debe devolver 345558983. + testString: 'assert.strictEqual(euler452(), 345558983, "euler452() should return 345558983.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler452() { + // Good luck! + return true; +} + +euler452(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-453-lattice-quadrilaterals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-453-lattice-quadrilaterals.spanish.md new file mode 100644 index 0000000000..fb8443da11 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-453-lattice-quadrilaterals.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5311000cf542c510044 +challengeType: 5 +title: 'Problem 453: Lattice Quadrilaterals' +--- + +## Description +
+Un cuadrilátero simple es un polígono que tiene cuatro vértices distintos, no tiene ángulos rectos y no se intersecta por sí mismo. + +Sea Q (m, n) el número de cuadriláteros simples cuyos vértices son puntos de red con coordenadas (x, y) que satisfacen 0 ≤ x ≤ my 0 ≤ y ≤ n. + +Por ejemplo, Q (2, 2) = 94 como se puede ver a continuación: + +También se puede verificar que Q (3, 7) = 39590, Q (12, 3) = 309000 y Q (123, 45 ) = 70542215894646. + +Encuentra Q (12345, 6789) mod 135707531. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler453() debe devolver 104354107. + testString: 'assert.strictEqual(euler453(), 104354107, "euler453() should return 104354107.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler453() { + // Good luck! + return true; +} + +euler453(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-454-diophantine-reciprocals-iii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-454-diophantine-reciprocals-iii.spanish.md new file mode 100644 index 0000000000..1a79134c73 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-454-diophantine-reciprocals-iii.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f5331000cf542c510045 +challengeType: 5 +title: 'Problem 454: Diophantine reciprocals III' +--- + +## Description +
+En la siguiente ecuación x, y yn son enteros positivos. + +1x ++ +1y += +1n + +Para un límite L definimos F (L) como el número de soluciones que satisfacen x <y ≤ L. + +Podemos verificar que F (15) = 4 y F (1000) = 1069. +Encuentra F (1012). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler454() debe devolver 5435004633092. + testString: 'assert.strictEqual(euler454(), 5435004633092, "euler454() should return 5435004633092.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler454() { + // Good luck! + return true; +} + +euler454(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-455-powers-with-trailing-digits.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-455-powers-with-trailing-digits.spanish.md new file mode 100644 index 0000000000..12e04c621e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-455-powers-with-trailing-digits.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5331000cf542c510046 +challengeType: 5 +title: 'Problem 455: Powers With Trailing Digits' +--- + +## Description +
+Sea f (n) el mayor entero positivo x menor que 109, de modo que los últimos 9 dígitos de nx formen el número x (incluidos los ceros a la izquierda), o cero si no existe tal entero. + +Por ejemplo: + +f (4) = 411728896 (4411728896 = ... 490411728896) +f (10) = 0 +f (157) = 743757 (157743757 = ... 567000743757) +Σf (n), 2 ≤ n ≤ 103 = 442530011399 +Encuentre Σf (n), 2 ≤ n ≤ 106. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler455() debe devolver 450186511399999. + testString: 'assert.strictEqual(euler455(), 450186511399999, "euler455() should return 450186511399999.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler455() { + // Good luck! + return true; +} + +euler455(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-456-triangles-containing-the-origin-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-456-triangles-containing-the-origin-ii.spanish.md new file mode 100644 index 0000000000..3c5e8190b8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-456-triangles-containing-the-origin-ii.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f5351000cf542c510047 +challengeType: 5 +title: 'Problem 456: Triangles containing the origin II' +--- + +## Description +
+Defina: xn = (1248n mod 32323) - 16161yn = (8421n mod 30103) - 15051 +Pn = {(x1, y1), (x2, y2), ..., (xn, yn)} + + +For ejemplo, P8 = {(-14913, -6630), (-10161, 5625), (5226, 11896), (8340, -10778), (15852, -5203), (-15165, 11295), (-1427 , -14495), (12407, 1060)}. + +Sea C (n) el número de triángulos cuyos vértices están en Pn que contienen el origen en el interior. + + +Ejemplos: +C (8) = 20 +C (600) = 8950634 +C (40 000) = 2666610948988 + + +Encuentre C (2 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler456() debe devolver 333333208685971500. + testString: 'assert.strictEqual(euler456(), 333333208685971500, "euler456() should return 333333208685971500.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler456() { + // Good luck! + return true; +} + +euler456(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-457-a-polynomial-modulo-the-square-of-a-prime.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-457-a-polynomial-modulo-the-square-of-a-prime.spanish.md new file mode 100644 index 0000000000..5e3eadb681 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-457-a-polynomial-modulo-the-square-of-a-prime.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f5361000cf542c510048 +challengeType: 5 +title: 'Problem 457: A polynomial modulo the square of a prime' +--- + +## Description +
+Sea f (n) = n2 - 3n - 1. +Sea p un primo. +Sea R (p) el entero positivo n más pequeño, de modo que f (n) mod p2 = 0 si existe tal entero n, de lo contrario R (p) = 0. + + +Sea SR (L) sea ∑R (p ) para todos los números primos que no excedan de L. + + +Encuentre SR (107). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler457() debe devolver 2647787126797397000. + testString: 'assert.strictEqual(euler457(), 2647787126797397000, "euler457() should return 2647787126797397000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler457() { + // Good luck! + return true; +} + +euler457(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-458-permutations-of-project.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-458-permutations-of-project.spanish.md new file mode 100644 index 0000000000..133a41982b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-458-permutations-of-project.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f5361000cf542c510049 +challengeType: 5 +title: 'Problem 458: Permutations of Project' +--- + +## Description +
+Considera el alfabeto A hecho de las letras de la palabra "proyecto": A = {c, e, j, o, p, r, t}. +Sea T (n) el número de cadenas de longitud n que consiste en letras de A que no tienen una subcadena que es una de las 5040 permutaciones de "proyecto". + +T (7) = 77-7! = 818503. + + +Encuentra T (1012). Da los últimos 9 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler458() debe devolver 423341841. + testString: 'assert.strictEqual(euler458(), 423341841, "euler458() should return 423341841.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler458() { + // Good luck! + return true; +} + +euler458(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-459-flipping-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-459-flipping-game.spanish.md new file mode 100644 index 0000000000..ad3fd02ade --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-459-flipping-game.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f5371000cf542c51004a +challengeType: 5 +title: 'Problem 459: Flipping game' +--- + +## Description +
+El juego de volteo es un juego de dos jugadores jugado en un tablero cuadrado de N por N. +Cada cuadrado contiene un disco con un lado blanco y un lado negro. +El juego comienza con todos los discos mostrando su lado blanco. + +Un turno consiste en voltear todos los discos en un rectángulo con las siguientes propiedades: +la esquina superior derecha del rectángulo contiene un disco blanco +el ancho del rectángulo es un cuadrado perfecto (1, 4, 9, 16, ...) +la altura del rectángulo es un número triangular (1, 3, 6, 10, ...) + + +Los jugadores alternan turnos. Un jugador gana girando la cuadrícula todo negro. + +Deje que W (N) sea el número de movimientos ganadores para el primer jugador en un tablero N por N con todos los discos blancos, asumiendo que es el juego perfecto. +W (1) = 1, W (2) = 0, W (5) = 8 y W (102) = 31395. + +Para N = 5, los ocho primeros movimientos ganadores del primer jugador son: + + + + +Encuentre W (106). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler459() debe devolver 3996390106631. + testString: 'assert.strictEqual(euler459(), 3996390106631, "euler459() should return 3996390106631.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler459() { + // Good luck! + return true; +} + +euler459(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-46-goldbachs-other-conjecture.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-46-goldbachs-other-conjecture.spanish.md new file mode 100644 index 0000000000..99f8f72dbb --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-46-goldbachs-other-conjecture.spanish.md @@ -0,0 +1,108 @@ +--- +id: 5 +localeTitle: 5900f39a1000cf542c50fead +challengeType: 5 +title: 'Problem 46: Goldbach"s other conjecture' +--- + +## Description +
+Christian Goldbach propuso que cada número compuesto impar puede escribirse como la suma de un número primo y dos veces un cuadrado. +9 = 7 + 2 × 1 2 +15 = 7 + 2 × 2 2 +21 = 3 + 2 × 3 2 +25 = 7 + 2 × 3 2 +27 = 19 + 2 × 2 2 +33 = 31 + 2 × 1 2 +Resulta que la conjetura era falsa. +¿Cuál es el compuesto impar más pequeño que no se puede escribir como la suma de un número primo y dos veces un cuadrado? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: goldbachsOtherConjecture() debe devolver 5777. + testString: 'assert.strictEqual(goldbachsOtherConjecture(), 5777, "goldbachsOtherConjecture() should return 5777.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function goldbachsOtherConjecture() { + // Good luck! + return true; +} + +goldbachsOtherConjecture(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function goldbachsOtherConjecture() { function isPrime(num) { + if (num < 2) { + return false; + } else if (num === 2) { + return true; + } + const sqrtOfNum = Math.floor(num ** 0.5); + for (let i = 2; i <= sqrtOfNum + 1; i++) { + if (num % i === 0) { + return false; + } + } + return true; + } + + function isSquare(num) { + return Math.sqrt(num) % 1 === 0; + } + + // construct a list of prime numbers + const primes = []; + for (let i = 2; primes.length < 1000; i++) { + if (isPrime(i)) primes.push(i); + } + + let num = 3; + let answer; + while (!answer) { + num += 2; + if (!isPrime(num)) { + let found = false; + for (let primeI = 0; primeI < primes.length && !found; primeI++) { + const square = (num - primes[primeI]) / 2; + if (isSquare(square)) { + found = true; + break; + } + } + if (!found) answer = num; + } + } + return answer; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-460-an-ant-on-the-move.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-460-an-ant-on-the-move.spanish.md new file mode 100644 index 0000000000..5b2a1a12e7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-460-an-ant-on-the-move.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f5381000cf542c51004b +challengeType: 5 +title: 'Problem 460: An ant on the move' +--- + +## Description +
+En el plano euclidiano, una hormiga viaja desde el punto A (0, 1) al punto B (d, 1) para un entero d. + + +En cada paso, la hormiga en el punto (x0, y0) elige uno de los puntos de la red (x1, y1) que satisfacen x1 ≥ 0 e y1 ≥ 1 y va directo a (x1, y1) a una velocidad constante v El valor de v depende de y0 y y1 de la siguiente manera: +Si y0 = y1, el valor de v es igual a y0. +Si y0 ≠ y1, el valor de v es igual a (y1 - y0) / (ln (y1) - ln (y0)). + +La imagen de la izquierda es una de las rutas posibles para d = 4. Primero, la hormiga va de A (0, 1) a P1 (1, 3) a velocidad (3 - 1) / (ln (3) - ln ( 1) ≈ 1.8205. Entonces el tiempo requerido es sqrt (5) / 1.8205 ≈ 1.2283. +Desde P1 (1, 3) a P2 (3, 3), la hormiga viaja a la velocidad 3, por lo que el tiempo requerido es 2/3 ≈ 0.6667. De P2 (3, 3) a B (4, 1) la hormiga viaja a la velocidad (1 - 3) / (ln (1) - ln (3)) ≈ 1.8205, por lo que el tiempo requerido es sqrt (5) / 1.8205 1.2283. +Por lo tanto, el tiempo total requerido es 1.2283 + 0.6667 + 1.2283 = 3.1233. + + +La imagen de la derecha es otro camino. El tiempo total requerido se calcula como 0.98026 + 1 + 0.98026 = 2.96052. Se puede mostrar que esta es la ruta más rápida para d = 4. + + + +Sea F (d) el tiempo total requerido si la hormiga elige la ruta más rápida. Por ejemplo, F (4) ≈ 2.960516287. +Podemos verificar que F (10) ≈ 4.668187834 y F (100) ≈ 9.217221972. + + +Encuentra F (10000). Da tu respuesta redondeada a nueve lugares decimales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler460() debe devolver 18.420738199. + testString: 'assert.strictEqual(euler460(), 18.420738199, "euler460() should return 18.420738199.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler460() { + // Good luck! + return true; +} + +euler460(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-461-almost-pi.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-461-almost-pi.spanish.md new file mode 100644 index 0000000000..1a8be941d7 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-461-almost-pi.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f53a1000cf542c51004c +challengeType: 5 +title: 'Problem 461: Almost Pi' +--- + +## Description +
+Sea fn (k) = ek / n - 1, para todos los enteros no negativos k. +Notablemente, f200 (6) + f200 (75) + f200 (89) + f200 (226) = 3.141592644529… ≈ π. +De hecho, es la mejor aproximación de π de la forma fn (a) + fn (b) + fn (c) + fn (d) para n = 200. +Sea g (n) = a2 + b2 + c2 + d 2 para a, b, c, d que minimizan el error: | fn (a) + fn (b) + fn (c) + fn (d) - π | +(donde | x | denota el valor absoluto de x). +Le dan g (200) = 62 + 752 + 892 + 2262 = 64658. +Encuentre g (10000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler461() debe devolver 159820276. + testString: 'assert.strictEqual(euler461(), 159820276, "euler461() should return 159820276.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler461() { + // Good luck! + return true; +} + +euler461(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-462-permutation-of-3-smooth-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-462-permutation-of-3-smooth-numbers.spanish.md new file mode 100644 index 0000000000..c93e7f3be4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-462-permutation-of-3-smooth-numbers.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f53b1000cf542c51004d +challengeType: 5 +title: 'Problem 462: Permutation of 3-smooth numbers' +--- + +## Description +
+Un número de 3 líneas es un número entero que no tiene un factor primo mayor que 3. Para un número entero N, definimos S (N) como el conjunto de números de 3 líneas menos o igual a N. Por ejemplo, S (20) = {1, 2, 3, 4, 6, 8, 9, 12, 16, 18}. + + +Definimos F (N) como el número de permutaciones de S (N) en que cada elemento viene después de todos sus divisores apropiados. + + +Esta es una de las permutaciones posibles para N = 20. +- 1, 2, 4, 3, 9, 8, 16, 6, 18, 12. +Esta no es una permutación válida porque 12 viene antes que su divisor 6. +- 1, 2, 4, 3, 9, 8, 12, 16, 6, 18. + + +Podemos verificar que F (6) = 5, F (8) = 9, F (20) = 450 y F (1000) ≈ 8.8521816557e21. +Encuentra F (1018). Dé como respuesta su notación científica redondeada a diez dígitos después del punto decimal. +Al dar su respuesta, use una e minúscula para separar la mantisa y el exponente. Por ejemplo, si la respuesta es 112,233,445,566,778,899 entonces el formato de respuesta sería 1.1223344557e17. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler462() debe devolver el infinito. + testString: 'assert.strictEqual(euler462(), Infinity, "euler462() should return Infinity.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler462() { + // Good luck! + return true; +} + +euler462(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-463-a-weird-recurrence-relation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-463-a-weird-recurrence-relation.spanish.md new file mode 100644 index 0000000000..946d5a2732 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-463-a-weird-recurrence-relation.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f53c1000cf542c51004e +challengeType: 5 +title: 'Problem 463: A weird recurrence relation' +--- + +## Description +
+La función $ f $ se define para todos los enteros positivos de la siguiente manera: +$ f (1) = 1 $ +$ f (3) = 3 $ +$ f (2n) = f (n) $ +$ f (4n) + 1) = 2f (2n + 1) - f (n) $ +$ f (4n + 3) = 3f (2n + 1) - 2f (n) $ + +La función $ S (n) $ se define como $ \ sum_ {i = 1} ^ {n} f (i) $. +$ S (8) = 22 $ y $ S (100) = 3604 $. +Encuentra $ S (3 ^ {37}) $. Da los últimos 9 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler463() debe devolver 808981553. + testString: 'assert.strictEqual(euler463(), 808981553, "euler463() should return 808981553.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler463() { + // Good luck! + return true; +} + +euler463(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-464-mbius-function-and-intervals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-464-mbius-function-and-intervals.spanish.md new file mode 100644 index 0000000000..c20c3f4be9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-464-mbius-function-and-intervals.spanish.md @@ -0,0 +1,75 @@ +--- +id: 5 +localeTitle: 5900f53d1000cf542c51004f +challengeType: 5 +title: 'Problem 464: Möbius function and intervals' +--- + +## Description +
+La función de Möbius, denotada μ (n), se define como: +μ (n) = (-1) ω (n) si n es squarefree (donde ω (n) es el número de factores primos distintos de n) +μ (n) = 0 si n no es squarefree. + +Sea P (a, b) el número de enteros n en el intervalo [a, b] tal que μ (n) = 1. +Sea N (a, b) el número de enteros n en el intervalo [ a, b] tal que μ (n) = -1. +Por ejemplo, P (2,10) = 2 y N (2,10) = 4. + + + +Sea C (n) el número de pares de enteros (a, b) de manera que: +1 ≤ a ≤ b ≤ n, +99 · N (a, b) ≤ 100 · P (a, b) y +99 · P (a, b) ≤ 100 · N (a, b). + +Por ejemplo, C (10) = 13, C (500) = 16676 y C (10 000) = 20155319. + + + +Encuentre C (20 000 000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler464() debe devolver 198775297232878. + testString: 'assert.strictEqual(euler464(), 198775297232878, "euler464() should return 198775297232878.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler464() { + // Good luck! + return true; +} + +euler464(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-465-polar-polygons.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-465-polar-polygons.spanish.md new file mode 100644 index 0000000000..e05d1bd729 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-465-polar-polygons.spanish.md @@ -0,0 +1,72 @@ +--- +id: 5 +localeTitle: 5900f53d1000cf542c510050 +challengeType: 5 +title: 'Problem 465: Polar polygons' +--- + +## Description +
+El núcleo de un polígono se define por el conjunto de puntos desde los que se puede ver todo el límite del polígono. Definimos un polígono polar como un polígono para el cual el origen está estrictamente contenido dentro de su núcleo. + +Para este problema, un polígono puede tener vértices consecutivos colineales. Sin embargo, un polígono todavía no puede tener auto-intersección y no puede tener área cero. + +Por ejemplo, solo el primero de los siguientes es un polígono polar (los núcleos del segundo, tercero y cuarto no contienen estrictamente el origen y el quinto no tiene ningún núcleo): + + + +Aviso que el primer polígono tiene tres vértices colineales consecutivos. + +Sea P (n) el número de polígonos polares de manera que los vértices (x, y) tengan coordenadas enteras cuyos valores absolutos no sean mayores que n. + +Tenga en cuenta que los polígonos deben contarse como diferentes si tienen un conjunto diferente de bordes, incluso si encierran la misma área. Por ejemplo, el polígono con vértices [(0,0), (0,3), (1,1), (3,0)] es distinto del polígono con vértices [(0,0), (0,3 ), (1,1), (3,0), (1,0)]. + +Por ejemplo, P (1) = 131, P (2) = 1648531, P (3) = 1099461296175 y P (343) mod 1 000 000 007 = 937293740. + +Encuentre P (713) mod 1 000 000 007 . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler465() debe devolver 585965659. + testString: 'assert.strictEqual(euler465(), 585965659, "euler465() should return 585965659.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler465() { + // Good luck! + return true; +} + +euler465(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-466-distinct-terms-in-a-multiplication-table.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-466-distinct-terms-in-a-multiplication-table.spanish.md new file mode 100644 index 0000000000..9f02dc83fd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-466-distinct-terms-in-a-multiplication-table.spanish.md @@ -0,0 +1,71 @@ +--- +id: 5 +localeTitle: 5900f53e1000cf542c510051 +challengeType: 5 +title: 'Problem 466: Distinct terms in a multiplication table' +--- + +## Description +
+Sea P (m, n) el número de términos distintos en una tabla de multiplicación m × n. + +Por ejemplo, una tabla de multiplicar de 3 × 4 se ve así: + +× 12341 12342 24683 36912 + + + +Hay 8 términos distintos {1,2,3,4,6,8,9,12}, por lo tanto P (3,4) = 8. + +Te dan que: +P (64,64) = 1263, +P (12,345) = 1998, y +P (32,1015) = 13826382602124302. + +Encuentra P ( 64,1016). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler466() debe devolver 258381958195474750. + testString: 'assert.strictEqual(euler466(), 258381958195474750, "euler466() should return 258381958195474750.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler466() { + // Good luck! + return true; +} + +euler466(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-467-superinteger.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-467-superinteger.spanish.md new file mode 100644 index 0000000000..7bfd3f1099 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-467-superinteger.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f5411000cf542c510052 +challengeType: 5 +title: 'Problem 467: Superinteger' +--- + +## Description +
+Un entero s se denomina superinteger de otro entero n si los dígitos de n forman una subsecuencia de los dígitos de s. +Por ejemplo, 2718281828 es un superinteger de 18828, mientras que 314159 no es un superinteger de 151. + + +Sea p (n) el número primo nth y sea c (n) el número compuesto nth. Por ejemplo, p (1) = 2, p (10) = 29, c (1) = 4 y c (10) = 18. +{p (i): i ≥ 1} = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...} +{c (i): i ≥ 1} = {4, 6, 8, 9, 10, 12, 14, 15, 16, 18 , ...} + +Sea PD la secuencia de las raíces digitales de {p (i)} (CD se define de manera similar para {c (i)}): +PD = {2, 3, 5, 7, 2, 4, 8, 1, 5, 2, ...} +CD = {4, 6, 8, 9, 1, 3, 5, 6, 7, 9, ...} + +Sea Pn el entero formado concatenando los primeros n elementos de PD (Cn se define de manera similar para CD). +P10 = 2357248152 +C10 = 4689135679 + +Sea f (n) el número entero positivo más pequeño que sea un superintendente común de Pn y Cn. Por ejemplo, f (10) = 2357246891352679, y f (100) mod 1 000 000 007 = 771661825. + +Encuentre f (10 000) mod 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler467() debe devolver 775181359. + testString: 'assert.strictEqual(euler467(), 775181359, "euler467() should return 775181359.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler467() { + // Good luck! + return true; +} + +euler467(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-468-smooth-divisors-of-binomial-coefficients.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-468-smooth-divisors-of-binomial-coefficients.spanish.md new file mode 100644 index 0000000000..971feeb110 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-468-smooth-divisors-of-binomial-coefficients.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f5411000cf542c510054 +challengeType: 5 +title: 'Problem 468: Smooth divisors of binomial coefficients' +--- + +## Description +
+Un entero se llama B-suave si ninguno de sus factores primos es mayor que B. + +Sea SB (n) el divisor B-liso más grande de n. +Ejemplos: +S1 (10) = 1 +S4 (2100) = 12 +S17 (2496144) = 5712 + +Defina F (n) = ∑1≤B≤n ∑0≤r≤n SB (C (n, r)). Aquí, C (n, r) denota el coeficiente binomial. +Ejemplos: +F (11) = 3132 +F (1 111) mod 1 000 000 993 = 706036312 +F (111 111) mod 1 000 000 993 = 22156169 + +Encuentre F (11 111 111) mod 1 000 000 993 . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler468() debe devolver 852950321. + testString: 'assert.strictEqual(euler468(), 852950321, "euler468() should return 852950321.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler468() { + // Good luck! + return true; +} + +euler468(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-469-empty-chairs.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-469-empty-chairs.spanish.md new file mode 100644 index 0000000000..f8d4a07474 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-469-empty-chairs.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f5411000cf542c510053 +challengeType: 5 +title: 'Problem 469: Empty chairs' +--- + +## Description +
+En una sala N se colocan sillas alrededor de una mesa redonda. +Caballeros entran en la sala uno por uno y eligen al azar una silla vacía disponible. +Para tener suficiente espacio para los codos, los caballeros siempre dejan al menos una silla vacía entre sí. + + +Cuando no quedan sillas adecuadas, se determina la fracción C de sillas vacías. +También definimos E (N) como el valor esperado de C. +Podemos verificar que E (4) = 1/2 y E (6) = 5/9. + + +Encuentra E (1018). Dé su respuesta redondeada a catorce lugares decimales en la forma 0.abcdefghijklmn. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler469() debe devolver 0.56766764161831. + testString: 'assert.strictEqual(euler469(), 0.56766764161831, "euler469() should return 0.56766764161831.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler469() { + // Good luck! + return true; +} + +euler469(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-47-distinct-primes-factors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-47-distinct-primes-factors.spanish.md new file mode 100644 index 0000000000..4d4bec4855 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-47-distinct-primes-factors.spanish.md @@ -0,0 +1,111 @@ +--- +id: 5 +localeTitle: 5900f39c1000cf542c50feae +challengeType: 5 +title: 'Problem 47: Distinct primes factors' +--- + +## Description +
+Los dos primeros números consecutivos que tienen dos factores primos distintos son: +
14 = 2 × 7
+
15 = 3 × 5
+Los primeros tres números consecutivos que tienen tres factores primos distintos son: +
644 = 2² × 7 × 23
+
645 = 3 × 5 × 43
+
646 = 2 × 17 × 19
+Encuentre los primeros cuatro enteros consecutivos que tengan cuatro factores primos distintos cada uno. ¿Cuál es el primero de estos números? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' distinctPrimeFactors(2, 2) debe devolver 14.' + testString: 'assert.strictEqual(distinctPrimeFactors(2, 2), 14, "distinctPrimeFactors(2, 2) should return 14.");' + - text: ' distinctPrimeFactors(3, 3) debe devolver 644.' + testString: 'assert.strictEqual(distinctPrimeFactors(3, 3), 644, "distinctPrimeFactors(3, 3) should return 644.");' + - text: ' distinctPrimeFactors(4, 4) debe devolver 134043.' + testString: 'assert.strictEqual(distinctPrimeFactors(4, 4), 134043, "distinctPrimeFactors(4, 4) should return 134043.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function distinctPrimeFactors(targetNumPrimes, targetConsecutive) { + // Good luck! + return true; +} + +distinctPrimeFactors(4, 4); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function distinctPrimeFactors(targetNumPrimes, targetConsecutive) { + + function isPrime(num) { + for (let i = 2, s = Math.sqrt(num); i <= s; i++) { + if (num % i === 0) { + return false; + } + } + return num !== 1; + } + + function getPrimeFactors(num) { + const factors = []; + for (let i = 2; i <= Math.sqrt(num); i++) { + if (num % i === 0) { + // found a factor + if (isPrime(i)) { + factors.push(i); + } + if (isPrime(num / i) && i !== Math.sqrt(num)) { + factors.push(num / i); + } + } + } + return factors; + } + + function findConsecutiveNumbers() { + let number = 0; + let consecutive = 0; + while (consecutive < targetConsecutive) { + number++; + if (getPrimeFactors(number).length >= targetNumPrimes) { + consecutive++; + } else { + consecutive = 0; + } + } + return (number - targetConsecutive) + 1; + } + + return findConsecutiveNumbers(); + } +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-470-super-ramvok.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-470-super-ramvok.spanish.md new file mode 100644 index 0000000000..0644167130 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-470-super-ramvok.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f5431000cf542c510055 +challengeType: 5 +title: 'Problem 470: Super Ramvok' +--- + +## Description +
+Considere un solo juego de Ramvok: + +Sea t el número máximo de turnos que dura el juego. Si t = 0, entonces el juego termina inmediatamente. De lo contrario, en cada turno i, el jugador tira un dado. Después de la tirada, si el jugador puede detener el juego y recibir un premio igual al valor de la tirada actual, o descartar la tirada y volver a intentarlo en el siguiente turno. Si i = t, entonces el rollo no puede ser descartado y el premio debe ser aceptado. Antes de que comience el juego, t es elegido por el jugador, quien debe pagar un costo por adelantado por alguna constante c. Para c = 0, t puede elegirse para ser infinito (con un costo inicial de 0). Sea R (d, c) la ganancia esperada (es decir, la ganancia neta) que recibe el jugador de un solo juego de Ramvok con un juego óptimo, dado un dado justo y costoso constante c. Por ejemplo, R (4, 0.2) = 2.65. Supongamos que el jugador tiene fondos suficientes para pagar cualquiera o todos los costos iniciales. + +Ahora considere un juego de Super Ramvok: + +En Super Ramvok, el juego de Ramvok se juega repetidamente, pero con una ligera modificación. Después de cada juego, el dado se altera. El proceso de alteración es el siguiente: el dado se lanza una vez, y si la cara resultante tiene sus puntos visibles, entonces se modifica esa cara para que esté en blanco. Si la cara ya está en blanco, se vuelve a cambiar a su valor original. Después de que se realiza la alteración, puede comenzar otro juego de Ramvok (y durante ese juego, en cada turno, el dado se lanza hasta que aparece una cara con un valor). El jugador sabe qué caras están en blanco y cuáles no están en todo momento. El juego de Super Ramvok termina una vez que todas las caras del dado están en blanco. + +Sea S (d, c) la ganancia esperada que el jugador recibe de un juego de Super Ramvok jugado de manera óptima, dado un buen dado de d-sided para comenzar (con todos los lados visibles) y costo constante c. Por ejemplo, S (6, 1) = 208.3. + +Sea F (n) = ∑4≤d≤n ∑0≤c≤n S (d, c). + +Calcule F (20), redondeado al entero más cercano. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler470() debe devolver 147668794. + testString: 'assert.strictEqual(euler470(), 147668794, "euler470() should return 147668794.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler470() { + // Good luck! + return true; +} + +euler470(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-471-triangle-inscribed-in-ellipse.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-471-triangle-inscribed-in-ellipse.spanish.md new file mode 100644 index 0000000000..c9bed7905f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-471-triangle-inscribed-in-ellipse.spanish.md @@ -0,0 +1,65 @@ +--- +id: 5 +localeTitle: 5900f5431000cf542c510056 +challengeType: 5 +title: 'Problem 471: Triangle inscribed in ellipse' +--- + +## Description +
+El triángulo ΔABC está inscrito en una elipse con la ecuación $ \ frac {x ^ 2} {a ^ 2} + \ frac {y ^ 2} {b ^ 2} = 1 $, 0 <2b <a, a y b enteros +Sea r (a, b) el radio del incircle de ΔABC cuando el incircle tiene centro (2b, 0) y A tiene coordenadas $ \ left (\ frac a 2, \ frac {\ sqrt 3} 2 b \ right ps +Por ejemplo, r (3,1) = ½, r (6,2) = 1, r (12,3) = 2. + + +Sea $ G (n) = \ sum_ {a = 3} ^ n \ sum_ {b = 1} ^ {\ lfloor \ frac {a - 1} 2 \ rfloor} r (a, b) $ +Te dan G (10) = 20.59722222, G (100) = 19223.60980 (redondeado a 10 dígitos significantes). +Encuentra G (1011). +Da tu respuesta en notación científica redondeada a 10 dígitos significativos. Usa una e minúscula para separar la mantisa y el exponente. +Para G (10) la respuesta hubiera sido 2.059722222e1. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler471() debe devolver 1.895093981e + 31. + testString: 'assert.strictEqual(euler471(), 1.895093981e+31, "euler471() should return 1.895093981e+31.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler471() { + // Good luck! + return true; +} + +euler471(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.spanish.md new file mode 100644 index 0000000000..f50c6fb1b3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-472-comfortable-distance-ii.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f5451000cf542c510057 +challengeType: 5 +title: 'Problem 472: Comfortable Distance II' +--- + +## Description +
+Hay N asientos en una fila. N personas vienen una tras otra para llenar los asientos de acuerdo con las siguientes reglas: +Ninguna persona se sienta al lado de otra. +La primera persona elige cualquier asiento. +Cada persona subsiguiente elige el asiento más alejado de cualquier otra persona que ya esté sentada, siempre que no infrinja la regla 1. Si hay más de una opción que satisface esta condición, la persona elige la opción más a la izquierda. +Tenga en cuenta que debido a la regla 1, algunos asientos seguramente quedarán desocupados, y el número máximo de personas que pueden sentarse es menor que N (para N> 1). + +Aquí están los posibles asientos para N = 15: + + + +Vemos que si la primera persona elige correctamente, los 15 asientos pueden acomodar hasta 7 personas. +También podemos ver que la primera persona tiene 9 opciones para maximizar el número de personas que pueden estar sentadas. + +Sea f (N) el número de opciones que tiene la primera persona para maximizar el número de ocupantes para N asientos en una fila. Por lo tanto, f (1) = 1, f (15) = 9, f (20) = 6 y f (500) = 16. + +También, ∑f (N) = 83 para 1 ≤ N ≤ 20 y ∑ f (N) = 13343 para 1 ≤ N ≤ 500. + +Encuentra ∑f (N) para 1 ≤ N ≤ 1012. Da los últimos 8 dígitos de tu respuesta. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler472() debe devolver 73811586. + testString: 'assert.strictEqual(euler472(), 73811586, "euler472() should return 73811586.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler472() { + // Good luck! + return true; +} + +euler472(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-473-phigital-number-base.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-473-phigital-number-base.spanish.md new file mode 100644 index 0000000000..00542a92d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-473-phigital-number-base.spanish.md @@ -0,0 +1,73 @@ +--- +id: 5 +localeTitle: 5900f5461000cf542c510058 +challengeType: 5 +title: 'Problem 473: Phigital number base' +--- + +## Description +
+Sea $ \ varphi $ la proporción áurea: $ \ varphi = \ frac {1+ \ sqrt {5}} {2}. $ +Notablemente, es posible escribir cada entero positivo como una suma de potencias de $ \ varphi $ incluso si requerimos que cada poder de $ \ varphi $ se use como máximo una vez en esta suma. +Incluso entonces esta representación no es única. +Podemos hacerlo único al requerir que no se utilicen potencias con exponentes consecutivos y que la representación sea finita. +Ej .: +$ 2 = \ varphi + \ varphi ^ {- 2} $ y $ 3 = \ varphi ^ {2} + \ varphi ^ {- 2} $ + + +Para representar esta suma de potencias de $ \ varphi $ usamos una cadena de 0 y 1 con un punto para indicar dónde comienzan los exponentes negativos. +Llamamos a esto la representación en la base numérica digital. +Entonces $ 1 = 1 _ {\ varphi} $, $ 2 = 10.01 _ {\ varphi} $, $ 3 = 100.01 _ {\ varphi} $ y $ 14 = 100100.001001 _ {\ varphi} $. +Las cadenas que representan 1, 2 y 14 en la base numérica digital son palindrómicas, mientras que la cadena que representa 3 no lo es. (El punto figital no es el carácter medio). + + +La suma de los enteros positivos que no exceden 1000 cuya representación figital es palindrómica es 4345. + + +Halla la suma de los enteros positivos que no exceda de $ 10 ^ {10} $ cuya representación figital es palindrómica. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler473() debe devolver 35856681704365. + testString: 'assert.strictEqual(euler473(), 35856681704365, "euler473() should return 35856681704365.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler473() { + // Good luck! + return true; +} + +euler473(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.spanish.md new file mode 100644 index 0000000000..62d9d3a8ce --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-474-last-digits-of-divisors.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f5471000cf542c510059 +challengeType: 5 +title: 'Problem 474: Last digits of divisors' +--- + +## Description +
+Para un entero positivo n y dígitos d, definimos F (n, d) como el número de los divisores de n cuyos últimos dígitos son iguales a d. +Por ejemplo, F (84, 4) = 3. Entre los divisores de 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84), tres de ellos (4, 14, 84) tiene el último dígito 4. + + +También podemos verificar que F (12 !, 12) = 11 y F (50 !, 123) = 17888. + + +Buscar F (106 !, 65432) módulo (1016 + 61). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler474() debe devolver 9690646731515010. + testString: 'assert.strictEqual(euler474(), 9690646731515010, "euler474() should return 9690646731515010.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler474() { + // Good luck! + return true; +} + +euler474(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-475-music-festival.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-475-music-festival.spanish.md new file mode 100644 index 0000000000..01c6a6aeb4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-475-music-festival.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f5481000cf542c51005a +challengeType: 5 +title: 'Problem 475: Music festival' +--- + +## Description +
+12n músicos participan en un festival de música. El primer día forman 3 cuartetos y practican todo el día. +Es un desastre. Al final del día, todos los músicos deciden que nunca volverán a aceptar tocar con ningún miembro de su cuarteto. +En el segundo día, forman 4n tríos, cada músico evitando a sus compañeros de cuarteto anteriores. + +Sea f (12n) el número de maneras de organizar los tríos entre los 12n músicos. +Le dan f (12) = 576 y f (24) mod 1 000 000 007 = 509089824. + +Encuentre f (600) mod 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler475() debe devolver 75780067. + testString: 'assert.strictEqual(euler475(), 75780067, "euler475() should return 75780067.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler475() { + // Good luck! + return true; +} + +euler475(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-476-circle-packing-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-476-circle-packing-ii.spanish.md new file mode 100644 index 0000000000..619247cda6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-476-circle-packing-ii.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f5481000cf542c51005b +challengeType: 5 +title: 'Problem 476: Circle Packing II' +--- + +## Description +
+Sea R (a, b, c) el área máxima cubierta por tres círculos no superpuestos dentro de un triángulo con longitudes de borde a, b y c. +Sea S (n) el valor promedio de R (a, b, c) sobre todos los tripletes enteros (a, b, c) de tal manera que 1 ≤ a ≤ b ≤ c <a + b ≤ n +Le dan S (2) = R (1, 1, 1) ≈ 0.31998, S (5) ≈ 1.25899. +Encuentre S (1803) redondeado a 5 lugares decimales detrás del punto decimal. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler476() debe devolver 110242.87794. + testString: 'assert.strictEqual(euler476(), 110242.87794, "euler476() should return 110242.87794.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler476() { + // Good luck! + return true; +} + +euler476(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-477-number-sequence-game.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-477-number-sequence-game.spanish.md new file mode 100644 index 0000000000..96c422403c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-477-number-sequence-game.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f54a1000cf542c51005c +challengeType: 5 +title: 'Problem 477: Number Sequence Game' +--- + +## Description +
+El juego de secuencia de números comienza con una secuencia S de N números escritos en una línea. +Dos jugadores alternan turnos. En su turno, un jugador debe seleccionar y eliminar el primer o el último número que queda en la secuencia. +La puntuación del jugador es la suma de todos los números que ha tomado. Cada jugador intenta maximizar su propia suma. +Si N = 4 y S = {1, 2, 10, 3}, entonces cada jugador maximiza su puntuación de la siguiente manera: +Jugador 1: elimina el primer número (1) +Jugador 2: elimina el último número de la secuencia restante (3) +Jugador 1: elimina el último número de la secuencia restante (10) +Jugador 2: elimina el número restante (2) +puntuación del jugador 1 es 1 + 10 = 11. +Sea F (N) la puntuación de jugador 1 si ambos jugadores siguen la estrategia óptima para la secuencia S = {s1, s2, ..., sN} definida como: +s1 = 0 +si + 1 = (si2 + 45) módulo 1 000 000 007 +La secuencia comienza con S = {0, 45, 2070, 4284945, 753524550, 478107844, 894218625, ...}. +Te dan F (2) = 45, F (4) = 4284990, F (100) = 26365463243, F (104) = 2495838522951. +Encuentra F (108). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler477() debe devolver 25044905874565164. + testString: 'assert.strictEqual(euler477(), 25044905874565164, "euler477() should return 25044905874565164.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler477() { + // Good luck! + return true; +} + +euler477(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-478-mixtures.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-478-mixtures.spanish.md new file mode 100644 index 0000000000..0971dda3e4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-478-mixtures.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f54c1000cf542c51005e +challengeType: 5 +title: 'Problem 478: Mixtures' +--- + +## Description +
+Consideremos mezclas de tres sustancias: A, B y C. Una mezcla puede describirse mediante una relación de las cantidades de A, B y C que contiene, es decir, (a: b: c). Por ejemplo, una mezcla descrito por la relación (2: 3: 5) contiene 20% de A, 30% B y 50% C + +Para los fines de este problema, no podemos separar los componentes individuales de una mezcla. Sin embargo, podemos combinar diferentes cantidades de diferentes mezclas para formar mezclas con nuevas proporciones. + +Por ejemplo, digamos que tenemos tres mezclas con relaciones (3: 0: 2), (3: 6: 11) y (3: 3: 4). Al mezclar 10 unidades del primero, 20 unidades del segundo y 30 unidades del tercero, obtenemos una nueva mezcla con proporción (6: 5: 9), ya que: +(10 · 3/5 + 20 · 3/20 + 30 · 3/10: 10 · 0/5 + 20 · 6/20 + 30 · 3/10: 10 · 2/5 + 20 · 11/20 + 30 · 4/10) += (18: 15: 27) = (6: 5: 9) + +Sin embargo, con las mismas tres mezclas, es imposible formar la relación (3: 2: 1), ya que la cantidad de B es siempre menor que la cantidad de C. + +Sea n un entero positivo. Supongamos que por cada triple de enteros (a, b, c) con 0 ≤ a, b, c ≤ n y gcd (a, b, c) = 1, tenemos una mezcla con relación (a: b: c). Sea M (n) el conjunto de todas estas mezclas. + +Por ejemplo, M (2) contiene las 19 mezclas con las siguientes proporciones: +{(0: 0: 1), (0: ​​1: 0), (0: ​​1: 1), (0: ​​1: 2 ), (0: ​​2: 1), +(1: 0: 0), (1: 0: 1), (1: 0: 2), (1: 1: 0), (1: 1: 1) , +(1: 1: 2), (1: 2: 0), (1: 2: 1), (1: 2: 2), (2: 0: 1), +(2: 1: 0) , (2: 1: 1), (2: 1: 2), (2: 2: 1)}. + +Sea E (n) el número de subconjuntos de M (n) que pueden producir la mezcla con relación (1: 1: 1), es decir, la mezcla con partes iguales A, B y C. +Podemos verificar que E (1) = 103, E (2) = 520447, E (10) mod 118 = 82608406 y E (500) mod 118 = 13801403. +Encuentre E (10 000 000) mod 118. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler478() debe devolver 59510340. + testString: 'assert.strictEqual(euler478(), 59510340, "euler478() should return 59510340.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler478() { + // Good luck! + return true; +} + +euler478(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.spanish.md new file mode 100644 index 0000000000..41b8b7cd02 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f54b1000cf542c51005d +challengeType: 5 +title: 'Problem 479: Roots on the Rise' +--- + +## Description +
+Sean ak, bk y ck las tres soluciones (números reales o complejos) para la expresión 1 / x = (k / x) 2 (k + x2) - kx. + +Por ejemplo, para k = 5, vemos que {a5, b5, c5} es aproximadamente {5.727244, -0.363622 + 2.057397i, -0.363622-2.057397i}. + +Sea S (n) = Σ (ak + bk) p (bk + ck) p (ck + ak) p para todos los enteros p, k tal que 1 ≤ p, k ≤ n. + +Curiosamente, S (n) es siempre un número entero. Por ejemplo, S (4) = 51160. + +Encuentre S (106) módulo 1 000 000 007. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler479() debe devolver 191541795. + testString: 'assert.strictEqual(euler479(), 191541795, "euler479() should return 191541795.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler479() { + // Good luck! + return true; +} + +euler479(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-48-self-powers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-48-self-powers.spanish.md new file mode 100644 index 0000000000..a66a450891 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-48-self-powers.spanish.md @@ -0,0 +1,81 @@ +--- +id: 5 +localeTitle: 5900f39c1000cf542c50feaf +challengeType: 5 +title: 'Problem 48: Self powers' +--- + +## Description +
+La serie, 1 1 + 2 2 + 3 3 + ... + 10 10 = 10405071317. +Encuentre los últimos diez dígitos de la serie, 1 1 + 2 2 + 3 3 + ... + 1000 1000 . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: ' selfPowers(10, 3) debe devolver 317.' + testString: 'assert.strictEqual(selfPowers(10, 3), 317, "selfPowers(10, 3) should return 317.");' + - text: ' selfPowers(150, 6) debe devolver 29045.' + testString: 'assert.strictEqual(selfPowers(150, 6), 29045, "selfPowers(150, 6) should return 29045.");' + - text: ' selfPowers(673, 7) debe devolver 2473989.' + testString: 'assert.strictEqual(selfPowers(673, 7), 2473989, "selfPowers(673, 7) should return 2473989.");' + - text: ' selfPowers(1000, 10) debe devolver 9110846700.' + testString: 'assert.strictEqual(selfPowers(1000, 10), 9110846700, "selfPowers(1000, 10) should return 9110846700.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function selfPowers(power, lastDigits) { + // Good luck! + return true; +} + +selfPowers(1000, 10); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function selfPowers(power, lastDigits) { + let sum = 0; + const modulo = Math.pow(10, lastDigits); + + for (let i = 1; i <= power; i++) { + let temp = i; + for (let j = 1; j < i; j++) { + temp *= i; + temp %= modulo; + } + + sum += temp; + sum %= modulo; + } + + return sum; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-480-the-last-question.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-480-the-last-question.spanish.md new file mode 100644 index 0000000000..a2511873f0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-480-the-last-question.spanish.md @@ -0,0 +1,95 @@ +--- +id: 5 +localeTitle: 5900f54c1000cf542c51005f +challengeType: 5 +title: 'Problem 480: The Last Question' +--- + +## Description +
+Considere todas las palabras que pueden formarse seleccionando letras, en cualquier orden, de la frase: +thereisasyetinsufficientdataforameaningfulanswer +Supongamos que las que tienen 15 letras o menos se enumeran en orden alfabético y se numeran secuencialmente a partir de 1. +La lista incluiría: +1: a +2: aa +3: aaa +4: aaaa +5: aaaaa +6: aaaaaa +7: aaaaaac +8: aaaaaacd +9: aaaaaacde +10: aaaaaacdee +11: aaaaaacdeee +12: aaaaaacdeeee +13: aaaaaacdeeee +13: aaaaaacdeeeee +14: aaaaaacdeeeeee +15: aaaaaacdeeeeeef +16: aaaaaacdeeeeeeg +17: aaaaaacdeeeeeeh +... +28: aaaaaacdeeeeeey +29: aaaaaacdeeeeef +30: aaaaaacdeeeeefe +... +115246685191495242: euleoywuttttsss +115246685191495243: Euler +115246685191495244: eulera +... +525069350231428029: ywuuttttssssrrrDefine P (w) como la posición de la palabra w. +Define W (p) como la palabra en la posición p. +Podemos ver que P (w) y W (p) son inversos: P (W (p)) = p y W (P (w)) = w. +Ejemplos: +W (10) = aaaaaacdee +P (aaaaaacdee) = 10 +W (115246685191495243) = Euler +P (Euler) = 115246685191495243Find W (P (legionario) + P (calorímetros) - P (aniquilan) + P ( orquestado) - P (aleteo)). +Da tu respuesta usando caracteres en minúscula (sin puntuación ni espacio). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler480() debe devolver turnthestarson. + testString: 'assert.strictEqual(euler480(), turnthestarson, "euler480() should return turnthestarson.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler480() { + // Good luck! + return true; +} + +euler480(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-49-prime-permutations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-49-prime-permutations.spanish.md new file mode 100644 index 0000000000..70dec712a1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-49-prime-permutations.spanish.md @@ -0,0 +1,105 @@ +--- +id: 5 +localeTitle: 5900f39d1000cf542c50feb0 +challengeType: 5 +title: 'Problem 49: Prime permutations' +--- + +## Description +
+La secuencia aritmética, 1487, 4817, 8147, en la que cada uno de los términos aumenta en 3330, es inusual en dos formas: (i) cada uno de los tres términos es primo, y, (ii) cada uno de los números de 4 dígitos Son permutaciones de unos a otros. +No hay secuencias aritméticas compuestas por tres números primos de 1, 2 o 3 dígitos, que muestran esta propiedad, pero hay otra secuencia creciente de 4 dígitos. +¿Qué número de 12 dígitos se forma al concatenar los tres términos en esta secuencia? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: primePermutations() debe devolver 296962999629. + testString: 'assert.strictEqual(primePermutations(), 296962999629, "primePermutations() should return 296962999629.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function primePermutations() { + // Good luck! + return true; +} + +primePermutations(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function primePermutations() { + function arePermutations(num1, num2) { + const numStr1 = num1.toString(); + let numStr2 = num2.toString(); + if (numStr1.length !== numStr2.length) { + return false; + } + + for (let i = 0; i < numStr1.length; i++) { + const index = numStr2.indexOf(numStr1[i]); + if (index === -1) { + return false; + } + numStr2 = numStr2.slice(0, index) + numStr2.slice(index + 1); + } + return true; + } + + function isPrime(num) { + if (num < 2) { + return false; + } else if (num === 2) { + return true; + } + const sqrtOfNum = Math.floor(num ** 0.5); + for (let i = 2; i <= sqrtOfNum + 1; i++) { + if (num % i === 0) { + return false; + } + } + return true; + } + + for (let num1 = 1000; num1 <= 9999; num1++) { + const num2 = num1 + 3330; + const num3 = num2 + 3330; + if (isPrime(num1) && isPrime(num2) && isPrime(num3)) { + if (arePermutations(num1, num2) && arePermutations(num1, num3) + && num1 !== 1487) { + // concatenate and return numbers + return (num1 * 100000000) + (num2 * 10000) + num3; + } + } + } + return 0; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-5-smallest-multiple.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-5-smallest-multiple.spanish.md new file mode 100644 index 0000000000..b2e6e454d6 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-5-smallest-multiple.spanish.md @@ -0,0 +1,80 @@ +--- +id: 5 +localeTitle: 5900f3711000cf542c50fe84 +challengeType: 5 +title: 'Problem 5: Smallest multiple' +--- + +## Description +
+2520 es el número más pequeño que se puede dividir por cada uno de los números del 1 al 10 sin ningún resto. +¿Cuál es el número positivo más pequeño que es divisible por todos los números del 1 al n ? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: smallestMult(5) debe devolver 60. + testString: 'assert.strictEqual(smallestMult(5), 60, "smallestMult(5) should return 60.");' + - text: smallestMult(7) debe devolver 420. + testString: 'assert.strictEqual(smallestMult(7), 420, "smallestMult(7) should return 420.");' + - text: smallestMult(10) debe devolver 2520. + testString: 'assert.strictEqual(smallestMult(10), 2520, "smallestMult(10) should return 2520.");' + - text: smallestMult(13) debe devolver 360360. + testString: 'assert.strictEqual(smallestMult(13), 360360, "smallestMult(13) should return 360360.");' + - text: smallestMult(20) debe devolver 232792560. + testString: 'assert.strictEqual(smallestMult(20), 232792560, "smallestMult(20) should return 232792560.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function smallestMult(n) { + // Good luck! + return true; +} + +smallestMult(20); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function smallestMult(n){ + function gcd(a, b) { + return b === 0 ? a : gcd(b, a%b); // Euclidean algorithm + } + + function lcm(a, b) { + return a * b / gcd(a, b); + } + var result = 1; + for(var i = 2; i <= n; i++) { + result = lcm(result, i); + } + return result; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-50-consecutive-prime-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-50-consecutive-prime-sum.spanish.md new file mode 100644 index 0000000000..255b256ffd --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-50-consecutive-prime-sum.spanish.md @@ -0,0 +1,101 @@ +--- +id: 5 +localeTitle: 5900f39e1000cf542c50feb1 +challengeType: 5 +title: 'Problem 50: Consecutive prime sum' +--- + +## Description +
+El primer 41, puede escribirse como la suma de seis primos consecutivos: +41 = 2 + 3 + 5 + 7 + 11 + 13 +Esta es la suma más larga de primos consecutivos que se suma a un primo por debajo de cien. +La suma más larga de números primos consecutivos por debajo de mil que se suma a un número primo, contiene 21 términos y es igual a 953. +¿Qué número primo, por debajo de un millón, se puede escribir como la suma de los números primos más consecutivos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: consecutivePrimeSum(1000) debe devolver 953. + testString: 'assert.strictEqual(consecutivePrimeSum(1000), 953, "consecutivePrimeSum(1000) should return 953.");' + - text: PrimeSum consecutivePrimeSum(1000000) debe devolver 997651. + testString: 'assert.strictEqual(consecutivePrimeSum(1000000), 997651, "consecutivePrimeSum(1000000) should return 997651.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function consecutivePrimeSum(limit) { + // Good luck! + return true; +} + +consecutivePrimeSum(1000000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function consecutivePrimeSum(limit) { + function isPrime(num) { + if (num < 2) { + return false; + } else if (num === 2) { + return true; + } + const sqrtOfNum = Math.floor(num ** 0.5); + for (let i = 2; i <= sqrtOfNum + 1; i++) { + if (num % i === 0) { + return false; + } + } + return true; + } + function getPrimes(limit) { + const primes = []; + for (let i = 0; i <= limit; i++) { + if (isPrime(i)) primes.push(i); + } + return primes; + } + + const primes = getPrimes(limit); + let primeSum = [...primes]; + primeSum.reduce((acc, n, i) => { + primeSum[i] += acc; + return acc += n; + }, 0); + + for (let j = primeSum.length - 1; j >= 0; j--) { + for (let i = 0; i < j; i++) { + const sum = primeSum[j] - primeSum[i]; + if (sum > limit) break; + if (isPrime(sum) && primes.indexOf(sum) > -1) return sum; + } + } +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-51-prime-digit-replacements.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-51-prime-digit-replacements.spanish.md new file mode 100644 index 0000000000..c0bcc03d66 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-51-prime-digit-replacements.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f39f1000cf542c50feb2 +challengeType: 5 +title: 'Problem 51: Prime digit replacements' +--- + +## Description +
+Al reemplazar el primer dígito del número de 2 dígitos * 3, resulta que seis de los nueve valores posibles: 13, 23, 43, 53, 73 y 83, son primos. +Al reemplazar los dígitos tercero y cuarto de 56 ** 3 por el mismo dígito, este número de 5 dígitos es el primer ejemplo que tiene siete números primos entre los diez números generados, dando como resultado la familia: 56003, 56113, 56333, 56443, 56663, 56773 y 56993. En consecuencia, 56003, siendo el primer miembro de esta familia, es el principal más pequeño de esta propiedad. +Encuentre el número primo más pequeño que, al reemplazar parte del número (no necesariamente los dígitos adyacentes) por el mismo dígito, es parte de una familia de ocho valores primos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler51() debe devolver 121313. + testString: 'assert.strictEqual(euler51(), 121313, "euler51() should return 121313.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler51() { + // Good luck! + return true; +} + +euler51(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-52-permuted-multiples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-52-permuted-multiples.spanish.md new file mode 100644 index 0000000000..124c07b8fc --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-52-permuted-multiples.spanish.md @@ -0,0 +1,88 @@ +--- +id: 5 +localeTitle: 5900f3a01000cf542c50feb3 +challengeType: 5 +title: 'Problem 52: Permuted multiples' +--- + +## Description +
+Se puede ver que el número, 125874, y su doble, 251748, contienen exactamente los mismos dígitos, pero en un orden diferente. +Encuentre el entero positivo más pequeño, x, tal que 2x, 3x, 4x, 5x y 6x, contengan los mismos dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: permutedMultiples() debe devolver 142857. + testString: 'assert.strictEqual(permutedMultiples(), 142857, "permutedMultiples() should return 142857.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function permutedMultiples() { + // Good luck! + return true; +} + +permutedMultiples(); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function permutedMultiples() { + const isPermutation = (a, b) => + a.length !== b.length + ? false + : a.split('').sort().join() === b.split('').sort().join(); + + + let start = 1; + let found = false; + let result = 0; + + while (!found) { + start *= 10; + for (let i = start; i < start * 10 / 6; i++) { + found = true; + for (let j = 2; j <= 6; j++) { + if (!isPermutation(i + ", j * i + ")) { + found = false; + break; + } + } + if (found) { + result = i; + break; + } + } + } + + return result; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-53-combinatoric-selections.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-53-combinatoric-selections.spanish.md new file mode 100644 index 0000000000..502ead1068 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-53-combinatoric-selections.spanish.md @@ -0,0 +1,91 @@ +--- +id: 5 +localeTitle: 5900f3a11000cf542c50feb4 +challengeType: 5 +title: 'Problem 53: Combinatoric selections' +--- + +## Description +
+Hay exactamente diez formas de seleccionar tres de cinco, 12345: +123, 124, 125, 134, 135, 145, 234, 235, 245 y 345 +En combinatoria, usamos la notación, 5C3 = 10. +In general, + +nCr = +n! r! (n − r)! +, donde r ≤ n, n! = n × (n − 1) × ... × 3 × 2 × 1, y 0! = 1. + +No es hasta n = 23, que un valor excede de un millón: 23C10 = 1144066. +¿Cuántos, no necesariamente distintos, valores de nCr, para 1 ≤ n ≤ 100, son mayores que un millón? ? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: combinatoricSelections(1000) deben devolver 4626. + testString: 'assert.strictEqual(combinatoricSelections(1000), 4626, "combinatoricSelections(1000) should return 4626.");' + - text: combinatoricSelections(10000) deben devolver 4431. + testString: 'assert.strictEqual(combinatoricSelections(10000), 4431, "combinatoricSelections(10000) should return 4431.");' + - text: combinatoricSelections(100000) deben devolver 4255. + testString: 'assert.strictEqual(combinatoricSelections(100000), 4255, "combinatoricSelections(100000) should return 4255.");' + - text: combinatoricSelections(1000000) deben devolver 4075. + testString: 'assert.strictEqual(combinatoricSelections(1000000), 4075, "combinatoricSelections(1000000) should return 4075.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function combinatoricSelections(limit) { + // Good luck! + return 1; +} + +combinatoricSelections(1000000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +function combinatoricSelections(limit) { + const factorial = n => + Array.apply(null, { length: n }) + .map((_, i) => i + 1) + .reduce((p, c) => p * c, 1); + + let result = 0; + const nMax = 100; + + for (let n = 1; n <= nMax; n++) { + for (let r = 0; r <= n; r++) { + if (factorial(n) / (factorial(r) * factorial(n - r)) >= limit) + result++; + } + } + + return result; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-54-poker-hands.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-54-poker-hands.spanish.md new file mode 100644 index 0000000000..76b564a263 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-54-poker-hands.spanish.md @@ -0,0 +1,79 @@ +--- +id: 5 +localeTitle: 5900f3a21000cf542c50feb5 +challengeType: 5 +title: 'Problem 54: Poker hands' +--- + +## Description +
+En el juego de cartas de póker, una mano consta de cinco cartas y se clasifican, de la más baja a la más alta, de la siguiente manera: +Carta alta: carta de mayor valor. +Un par: Dos cartas del mismo valor. +dos pares: dos pares diferentes. +Three of a Kind: Tres cartas del mismo valor. +Recta: Todas las cartas son valores consecutivos. +Flush: Todas las cartas del mismo palo. +Full House: Tres de una clase y una pareja. +Four of a Kind: Cuatro cartas del mismo valor. +Descarga directa: todas las cartas son valores consecutivos del mismo palo. +Escalera Real: Diez, Jack, Reina, Rey, As, en el mismo palo. +Las cartas se valoran en el orden: 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Reina, Rey, As. +Si dos jugadores tienen las mismas manos clasificadas, el rango compuesto por el valor más alto gana; por ejemplo, un par de ochos supera un par de cinco (vea el ejemplo 1 a continuación). Pero si dos rangos empatan, por ejemplo, ambos jugadores tienen un par de reinas, entonces se comparan las cartas más altas en cada mano (ver el ejemplo 4 a continuación); si las cartas más altas se empatan, se comparan las siguientes cartas más altas, y así sucesivamente. +Considera las siguientes cinco manos repartidas a dos jugadores: + +Mano Jugador 1 Jugador 2 Ganador +1 5H 5C 6S 7S KDPair of Fives 2C 3S 8S 8D TDPair of Eights Player 2 +2 5D 8C 9S JS ACHasta la carta más alta Ace 2C 5C 7D 8S QHLa carta más alta Queen Player 1 +3 2D 9C AS AH Tree Aces 3D 6D 7D TD QDFlush with Diamonds Player 2 +4 4D 6S 9H QH QCPair of QueensLa carta más alta Nueve 3D 6D 7H QD QSPair of QueensLa carta más alta Seven Player 1 +5 2H 2D 4C 2D 4C 4D 4SFull HouseWith Three Fours 3C 3D 3S 9S 9DFull Houseewith Three Threes Player 1 + +El archivo, poker.txt, contiene mil manos aleatorias repartidas a dos jugadores. Cada línea del archivo contiene diez cartas (separadas por un solo espacio): las cinco primeras son las cartas del Jugador 1 y las cinco últimas son las cartas del Jugador 2. Puede suponer que todas las manos son válidas (sin caracteres no válidos ni cartas repetidas), la mano de cada jugador no tiene un orden específico y en cada mano hay un claro ganador. +¿Cuántas manos gana el jugador 1? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler54() debe devolver 376. + testString: 'assert.strictEqual(euler54(), 376, "euler54() should return 376.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler54() { + // Good luck! + return true; +} + +euler54(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-55-lychrel-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-55-lychrel-numbers.spanish.md new file mode 100644 index 0000000000..903341d9b4 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-55-lychrel-numbers.spanish.md @@ -0,0 +1,102 @@ +--- +id: 5 +localeTitle: 5900f3a31000cf542c50feb6 +challengeType: 5 +title: 'Problem 55: Lychrel numbers' +--- + +## Description +
+Si tomamos 47, revertimos y sumamos, 47 + 74 = 121, que es palindrómico. +No todos los números producen palíndromos tan rápidamente. Por ejemplo, +349 + 943 = 1292, +1292 + 2921 = 4213 +4213 + 3124 = 7337 +Es decir, 349 tomó tres iteraciones para llegar a un palíndromo. +Aunque nadie lo ha demostrado aún, se piensa que algunos números, como 196, nunca producen un palíndromo. Un número que nunca forma un palíndromo a través del proceso inverso y de adición se llama un número de Lychrel. Debido a la naturaleza teórica de estos números, y para el propósito de este problema, asumiremos que un número es Lychrel hasta que se demuestre lo contrario. Además, se le otorga que por cada número inferior a diez mil, (i) se convertirá en un palíndromo en menos de cincuenta iteraciones, o, (ii) nadie, con toda la potencia de cálculo que existe, ha logrado hasta ahora mapearlo a un palíndromo. De hecho, 10677 es el primer número que se muestra que requiere más de cincuenta iteraciones antes de producir un palíndromo: 4668731596684224866951378664 (53 iteraciones, 28 dígitos). +Sorprendentemente, hay números palindrómicos que son números de Lychrel; el primer ejemplo es 4994. +¿Cuántos números de Lychrel hay debajo de num ? +NOTA: La redacción se modificó ligeramente el 24 de abril de 2007 para enfatizar la naturaleza teórica de números Lychrel. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: countLychrelNumbers(1000) debe devolver 13. + testString: 'assert.strictEqual(countLychrelNumbers(1000), 13, "countLychrelNumbers(1000) should return 13.");' + - text: countLychrelNumbers(5000) debe devolver 76. + testString: 'assert.strictEqual(countLychrelNumbers(5000), 76, "countLychrelNumbers(5000) should return 76.");' + - text: countLychrelNumbers(10000) debe devolver 249. + testString: 'assert.strictEqual(countLychrelNumbers(10000), 249, "countLychrelNumbers(10000) should return 249.");' + - text: Su función debe contar todos los números de Lychrel. + testString: 'assert.strictEqual(countLychrelNumbers(3243), 39, "Your function should count all Lychrel numbers.");' + - text: Su función debe pasar todos los casos de prueba. + testString: 'assert.strictEqual(countLychrelNumbers(7654), 140, "Your function should pass all test cases.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function countLychrelNumbers(num) { + // Good luck! + return true; +} + +countLychrelNumbers(10000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const countLychrelNumbers = (size) => { + const numReverse = (num) => { + return Number(num.toString().split('').reverse().join('')); + }; + const isPalin = (num) => { + if (numReverse(num) === num) { + return true; + } + return false; + }; + let total = 0; + for (let i = 1; i < size; i++) { + let loopCount = 1; + let sum = i; + while (loopCount < 50) { + sum = sum + numReverse(sum); + if (isPalin(sum)) { + break; + } else { + loopCount++; + } + } + if (loopCount === 50) { + total++; + } + } + return total; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-56-powerful-digit-sum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-56-powerful-digit-sum.spanish.md new file mode 100644 index 0000000000..9c266bfa37 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-56-powerful-digit-sum.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f3a41000cf542c50feb7 +challengeType: 5 +title: 'Problem 56: Powerful digit sum' +--- + +## Description +
+Un googol (10100) es un número masivo: uno seguido de cien ceros; 100100 es casi inimaginablemente grande: uno seguido de doscientos ceros. A pesar de su tamaño, la suma de los dígitos en cada número es solo 1. +Considerando los números naturales de la forma, ab, donde a, b <100, ¿cuál es la suma digital máxima? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler56() debe devolver 972. + testString: 'assert.strictEqual(euler56(), 972, "euler56() should return 972.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler56() { + // Good luck! + return true; +} + +euler56(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-57-square-root-convergents.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-57-square-root-convergents.spanish.md new file mode 100644 index 0000000000..faf342e4c9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-57-square-root-convergents.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3a51000cf542c50feb8 +challengeType: 5 +title: 'Problem 57: Square root convergents' +--- + +## Description +
+Es posible mostrar que la raíz cuadrada de dos se puede expresar como una fracción continua infinita. +√ 2 = 1 + 1 / (2 + 1 / (2 + 1 / (2 + ...))) = 1.414213 ... +Al expandir esto para las primeras cuatro iteraciones, obtenemos: +1 + 1 / 2 = 3/2 = 1.5 +1 + 1 / (2 + 1/2) = 7/5 = 1.4 +1 + 1 / (2 + 1 / (2 + 1/2)) = 17/12 = 1.41666. .. +1 + 1 / (2 + 1 / (2 + 1 / (2 + 1/2))) = 41/29 = 1.41379 ... +Las siguientes tres expansiones son 99/70, 239/169, y 577/408, pero la octava expansión, 1393/985, es el primer ejemplo donde el número de dígitos en el numerador excede el número de dígitos en el denominador. +En las primeras mil expansiones, ¿cuántas fracciones contienen un numerador con más dígitos que el denominador? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler57() debe devolver 153. + testString: 'assert.strictEqual(euler57(), 153, "euler57() should return 153.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler57() { + // Good luck! + return true; +} + +euler57(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-58-spiral-primes.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-58-spiral-primes.spanish.md new file mode 100644 index 0000000000..01bc0ee102 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-58-spiral-primes.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3a61000cf542c50feb9 +challengeType: 5 +title: 'Problem 58: Spiral primes' +--- + +## Description +
+Comenzando con 1 y girando en sentido contrario a las agujas del reloj de la siguiente manera, se forma una espiral cuadrada con una longitud de lado 7. +37 36 35 34 33 32 31 +38 17 16 15 14 13 30 +39 18 5 4 3 12 29 +40 19 6 1 2 11 28 +41 20 7 8 9 10 27 +42 21 22 23 24 25 2643 44 45 46 47 48 49 +Es interesante observar que los cuadrados impares se encuentran a lo largo de la diagonal inferior derecha, pero lo que es más interesante es que 8 de los 13 números que se encuentran a lo largo de ambas diagonales son primos; es decir, una relación de 8/13 ≈ 62%. +Si se envuelve una nueva capa completa alrededor de la espiral de arriba, se formará una espiral cuadrada con longitud de lado 9. Si este proceso continúa, ¿cuál es la longitud del lado de la espiral cuadrada para la cual la proporción de números primos a lo largo de ambas diagonales cae por debajo del 10%? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler58() debe devolver 26241. + testString: 'assert.strictEqual(euler58(), 26241, "euler58() should return 26241.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler58() { + // Good luck! + return true; +} + +euler58(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-59-xor-decryption.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-59-xor-decryption.spanish.md new file mode 100644 index 0000000000..f92ca21a19 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-59-xor-decryption.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3a81000cf542c50feba +challengeType: 5 +title: 'Problem 59: XOR decryption' +--- + +## Description +
+cada carácter de una computadora se le asigna un código único y el estándar preferido es ASCII (Código Estándar Americano para el Intercambio de Información). Por ejemplo, mayúscula A = 65, asterisco (*) = 42 y minúscula k = 107. +Un método moderno de encriptación es tomar un archivo de texto, convertir los bytes a ASCII, luego XOR cada byte con un valor dado, tomado de una clave secreta La ventaja de la función XOR es que el uso de la misma clave de cifrado en el texto cifrado restaura el texto simple; por ejemplo, 65 XOR 42 = 107, luego 107 XOR 42 = 65. +Para el cifrado irrompible, la clave tiene la misma longitud que el mensaje de texto sin formato, y la clave está formada por bytes aleatorios. El usuario mantendría el mensaje cifrado y la clave de cifrado en diferentes ubicaciones, y sin ambas "mitades", es imposible descifrar el mensaje. +Desafortunadamente, este método no es práctico para la mayoría de los usuarios, por lo que el método modificado es usar una contraseña como clave. Si la contraseña es más corta que el mensaje, lo cual es probable, la clave se repite cíclicamente a lo largo del mensaje. El balance para este método es usar una clave de contraseña suficientemente larga para la seguridad, pero lo suficientemente corta como para ser memorable. +Su tarea ha sido fácil, ya que la clave de cifrado consta de tres caracteres en minúscula. Utilizando cipher.txt (clic con el botón derecho y 'Guardar enlace / destino como ...'), un archivo que contiene los códigos ASCII cifrados, y el conocimiento de que el texto plano debe contener palabras comunes en inglés, descifrar el mensaje y encontrar la suma de Valores ASCII en el texto original. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler59() debe devolver 107359. + testString: 'assert.strictEqual(euler59(), 107359, "euler59() should return 107359.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler59() { + // Good luck! + return true; +} + +euler59(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-6-sum-square-difference.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-6-sum-square-difference.spanish.md new file mode 100644 index 0000000000..54a8bdbea3 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-6-sum-square-difference.spanish.md @@ -0,0 +1,79 @@ +--- +id: 5 +localeTitle: 5900f3721000cf542c50fe85 +challengeType: 5 +title: 'Problem 6: Sum square difference' +--- + +## Description +
+La suma de los cuadrados de los primeros diez números naturales es, +
1 2 + 2 2 + ... + 10 2 = 385
+El cuadrado de la suma de los primeros diez números naturales es, +
(1 + 2 + ... + 10) 2 = 55 2 = 3025
+Por lo tanto, la diferencia entre la suma de los cuadrados de los primeros diez números naturales y el cuadrado de la suma es 3025 - 385 = 2640. +Halla la diferencia entre la suma de los cuadrados de los primeros n números naturales y el cuadrado de suma. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: sumSquareDifference(10) debe devolver 2640. + testString: 'assert.strictEqual(sumSquareDifference(10), 2640, "sumSquareDifference(10) should return 2640.");' + - text: sumSquareDifference(20) debe devolver 41230. + testString: 'assert.strictEqual(sumSquareDifference(20), 41230, "sumSquareDifference(20) should return 41230.");' + - text: sumSquareDifference(100) debe devolver 25164150. + testString: 'assert.strictEqual(sumSquareDifference(100), 25164150, "sumSquareDifference(100) should return 25164150.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function sumSquareDifference(n) { + // Good luck! + return true; +} + +sumSquareDifference(100); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const sumSquareDifference = (number)=>{ + let squareOfSum = Math.pow(sumOfArithmeticSeries(1,1,number),2); + let sumOfSquare = sumOfSquareOfNumbers(number); + return squareOfSum - sumOfSquare; +} + +function sumOfArithmeticSeries(a,d,n){ + return (n/2)*(2*a+(n-1)*d); +} + +function sumOfSquareOfNumbers(n){ + return (n*(n+1)*(2*n+1))/6; +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-60-prime-pair-sets.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-60-prime-pair-sets.spanish.md new file mode 100644 index 0000000000..fad05396ac --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-60-prime-pair-sets.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f3a81000cf542c50febb +challengeType: 5 +title: 'Problem 60: Prime pair sets' +--- + +## Description +
+Los números primos 3, 7, 109 y 673 son bastante notables. Al tomar dos primos y concatenarlos en cualquier orden, el resultado siempre será primo. Por ejemplo, tomando 7 y 109, tanto 7109 como 1097 son primos. La suma de estos cuatro números primos, 792, representa la suma más baja para un conjunto de cuatro números primos con esta propiedad. +Encuentre la suma más baja para un conjunto de cinco primos para los cuales dos primos concatenan para producir otro primo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler60() debe devolver 26033. + testString: 'assert.strictEqual(euler60(), 26033, "euler60() should return 26033.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler60() { + // Good luck! + return true; +} + +euler60(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-61-cyclical-figurate-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-61-cyclical-figurate-numbers.spanish.md new file mode 100644 index 0000000000..f45178e120 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-61-cyclical-figurate-numbers.spanish.md @@ -0,0 +1,91 @@ +--- +id: 5 +localeTitle: 5900f3a91000cf542c50febc +challengeType: 5 +title: 'Problem 61: Cyclical figurate numbers' +--- + +## Description +
+números de triángulo, cuadrado, pentagonal, hexagonal, heptagonal y octagonal son todos números figurados (poligonales) y se generan mediante las siguientes fórmulas: +Triángulo + +P3, n = n (n + 1) / 2 + +1, 3 , 6, 10, 15, ... +Cuadrado + +P4, n = n2 + +1, 4, 9, 16, 25, ... +Pentagonal + +P5, n = n (3n − 1) / 2 + +1, 5, 12, 22, 35, ... +Hexagonal + +P6, n = n (2n − 1) + +1, 6, 15, 28, 45, ... +Heptagonal + +P7, n = n (5n-3) / 2 + +1, 7, 18, 34, 55, ... +Octagonal + +P8, n = n (3n-2) + +1, 8, 21, 40, 65 , ... +El conjunto ordenado de tres números de 4 dígitos: 8128, 2882, 8281, tiene tres propiedades interesantes. +El conjunto es cíclico, ya que los dos últimos dígitos de cada número son los dos primeros dígitos del siguiente número (incluido el último número con el primero). +Cada tipo poligonal: triángulo (P3,127 = 8128), cuadrado (P4,91 = 8281) y pentagonal (P5,44 = 2882), está representado por un número diferente en el conjunto. +Este es el único conjunto de números de 4 dígitos con esta propiedad. +Encuentre la suma del único conjunto ordenado de seis números cíclicos de 4 dígitos para los cuales cada tipo poligonal: triángulo, cuadrado, pentagonal, hexagonal, heptagonal y octagonal, se representa con un número diferente en el conjunto. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler61() debe devolver 28684. + testString: 'assert.strictEqual(euler61(), 28684, "euler61() should return 28684.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler61() { + // Good luck! + return true; +} + +euler61(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-62-cubic-permutations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-62-cubic-permutations.spanish.md new file mode 100644 index 0000000000..0aba23b48d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-62-cubic-permutations.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f3aa1000cf542c50febd +challengeType: 5 +title: 'Problem 62: Cubic permutations' +--- + +## Description +
+El cubo, 41063625 (3453), puede permutarse para producir otros dos cubos: 56623104 (3843) y 66430125 (4053). De hecho, 41063625 es el cubo más pequeño que tiene exactamente tres permutaciones de sus dígitos que también son cubos. +Encuentre el cubo más pequeño para el que exactamente cinco permutaciones de sus dígitos son cubo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler62() debe devolver 127035954683. + testString: 'assert.strictEqual(euler62(), 127035954683, "euler62() should return 127035954683.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler62() { + // Good luck! + return true; +} + +euler62(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-63-powerful-digit-counts.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-63-powerful-digit-counts.spanish.md new file mode 100644 index 0000000000..7a7af1df4e --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-63-powerful-digit-counts.spanish.md @@ -0,0 +1,57 @@ +--- +id: 5 +localeTitle: 5900f3ab1000cf542c50febe +challengeType: 5 +title: 'Problem 63: Powerful digit counts' +--- + +## Description +
+El número de 5 dígitos, 16807 = 75, es también una quinta potencia. De manera similar, el número de 9 dígitos, 134217728 = 89, es una novena potencia. +¿Cuántos enteros positivos de n dígitos existen que también son una enésima potencia? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler63() debe devolver 49. + testString: 'assert.strictEqual(euler63(), 49, "euler63() should return 49.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler63() { + // Good luck! + return true; +} + +euler63(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-64-odd-period-square-roots.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-64-odd-period-square-roots.spanish.md new file mode 100644 index 0000000000..48f60bd0d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-64-odd-period-square-roots.spanish.md @@ -0,0 +1,179 @@ +--- +id: 5 +localeTitle: 5900f3ac1000cf542c50febf +challengeType: 5 +title: 'Problem 64: Odd period square roots' +--- + +## Description +
+Todas las raíces cuadradas son periódicas cuando se escriben como fracciones continuas y se pueden escribir en la forma: + +√N = a0 + +1 + +a1 + +1 + + +a2 + +1 + + + +a3 + ... + +Por ejemplo, consideremos √23: + +√23 = 4 + √23 - 4 = 4 + +1 += 4 + +1 + +1√23—4 + +1 + +√23 - 37 + +Si continuamos obtendríamos la siguiente expansión: + +√23 = 4 + +1 + +1 + +1 + + +3 + +1 + + + +1 + +1 + + + + +8 +. + +El proceso se puede resumir de la siguiente manera: + +a0 = 4, + +1√23—4 += +√23 + 47 += 1 + +√23—37 +a1 = 1, + +7√23 —3 += +7 (√23 + 3) 14 += 3 + +√23—32 +a2 = 3, + +2√23—3 += +2 (√23 + 3) 14 += 1 + +√23—47 +a3 = 1, + +7√23—4 += +7 (√23 + 4) 7 += 8 + +√23—4 +a4 = 8, + +1√23—4 += +√23 + 47 += 1 + +√23—37 +a5 = 1, + +7√23—3 += +7 (√23 + 3) 14 += 3 + +√23—32 +a6 = 3 , + +2√23—3 += +2 (√23 + 3) 14 += 1 + +√23—47 +a7 = 1, + +7√23—4 += +7 (√23 + 4) 7 += 8 + +√23—4 + +Puede ser Visto que la secuencia se está repitiendo. Para mayor precisión, usamos la notación √23 = [4; (1,3,1,8)], para indicar que el bloque (1,3,1,8) se repite indefinidamente. + +Las primeras diez representaciones de fracciones continuas de raíces cuadradas (irracionales) son: +√2 = [1; (2)], período = 1 +√3 = [1; (1,2)], período = 2 +√ 5 = [2; (4)], período = 1 +√6 = [2; (2,4)], período = 2 +√7 = [2; (1,1,1,4)], período = 4 +√8 = [2; (1,4)], período = 2 +√10 = [3; (6)], período = 1 +√11 = [3; (3,6)], período = 2 +√12 = [3; (2,6)], período = 2 +√13 = [3; (1,1,1,1,6)], período = 5 +Exactamente cuatro fracciones continuas, para N ≤ 13 , tiene un periodo impar. +¿Cuántas fracciones continuas para N ≤ 10000 tienen un período impar? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler64() debe devolver 1322. + testString: 'assert.strictEqual(euler64(), 1322, "euler64() should return 1322.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler64() { + // Good luck! + return true; +} + +euler64(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-65-convergents-of-e.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-65-convergents-of-e.spanish.md new file mode 100644 index 0000000000..52f0d81cb5 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-65-convergents-of-e.spanish.md @@ -0,0 +1,145 @@ +--- +id: 5 +localeTitle: 5900f3ad1000cf542c50fec0 +challengeType: 5 +title: 'Problem 65: Convergents of e' +--- + +## Description +
+La raíz cuadrada de 2 se puede escribir como una fracción continua infinita. + +√2 = 1 + +1 + +2 + +1 + + +2 + +1 + + + +2 + +1 + + + + +2 + ... + +La fracción continua infinita se puede escribir, √2 = [1; (2)], (2) indica que 2 repeticiones hasta el infinito. De manera similar, √23 = [4; (1,3,1,8)]. +Resulta que la secuencia de valores parciales de fracciones continuas para raíces cuadradas proporciona las mejores aproximaciones racionales. Consideremos los convergentes para √2. + + +1 + +1 += 3/2 + +2 + +1 + +1 += 7/5 + +2 + +1 + + +2 + +1 + +1 += 17/12 + +2 + +1 + + + +2 + +1 + + + + + + +1 + +1 += 41/29 + +2 + +1 + + +2 + +1 + + + + +2 + +1 + + + + + +2 + + +Por lo tanto, la secuencia de los primeros diez convergentes para √2 es: +1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ... +Lo más sorprendente es que la constante matemática importante, e = [2; 1,2,1, 1,4,1, 1,6,1, ..., 1,2k, 1, ...]. +Los primeros diez términos en la secuencia de convergentes para e son: +2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536 , ... +La suma de dígitos en el numerador del décimo convergente es 1 + 4 + 5 + 7 = 17. +Encuentre la suma de dígitos en el numerador del centésimo convergente de la fracción continua para e. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler65() debe devolver 272. + testString: 'assert.strictEqual(euler65(), 272, "euler65() should return 272.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler65() { + // Good luck! + return true; +} + +euler65(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-66-diophantine-equation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-66-diophantine-equation.spanish.md new file mode 100644 index 0000000000..7772841c84 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-66-diophantine-equation.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f3ae1000cf542c50fec1 +challengeType: 5 +title: 'Problem 66: Diophantine equation' +--- + +## Description +
+Considere las ecuaciones diofánticas cuadráticas de la forma: +x2 - Dy2 = 1 +Por ejemplo, cuando D = 13, la solución mínima en x es 6492 - 13 × 1802 = 1. +Se puede suponer que no hay soluciones en positivo enteros cuando D es cuadrado. +Al encontrar soluciones mínimas en x para D = {2, 3, 5, 6, 7}, obtenemos lo siguiente: +32 - 2 × 22 = 1 +22 - 3 × 12 = 192 - 5 × 42 = 1 +52 - 6 × 22 = 1 +82 - 7 × 32 = 1 +Por lo tanto, al considerar soluciones mínimas en x para D ≤ 7, la mayor x se obtiene cuando D = 5. +Encuentre el valor de D ≤ 1000 en soluciones mínimas de x para las cuales se obtiene el valor más grande de x. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler66() debe devolver 661. + testString: 'assert.strictEqual(euler66(), 661, "euler66() should return 661.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler66() { + // Good luck! + return true; +} + +euler66(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-67-maximum-path-sum-ii.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-67-maximum-path-sum-ii.spanish.md new file mode 100644 index 0000000000..9400ac1066 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-67-maximum-path-sum-ii.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3b01000cf542c50fec2 +challengeType: 5 +title: 'Problem 67: Maximum path sum II' +--- + +## Description +
+Comenzando en la parte superior del triángulo debajo y moviéndose a los números adyacentes en la fila de abajo, el total máximo de arriba a abajo es 23. +37 4 +2 4 6 +8 5 9 3 +Es decir, 3 + 7 + 4 + 9 = 23. +Encuentre el total máximo de arriba a abajo en triangle.txt (haga clic con el botón derecho y 'Guardar enlace / destino como ...'), un archivo de texto de 15K que contiene un triángulo con cien filas. +NOTA: Esta es una versión mucho más difícil del Problema 18. ¡No es posible probar todas las rutas para resolver este problema, ya que hay 299 en total! Si pudiera controlar un billón (1012) de rutas por segundo, llevaría más de veinte mil millones de años verificarlas todas. Hay un algoritmo eficiente para resolverlo. ; o) +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler67() debe devolver 7273. + testString: 'assert.strictEqual(euler67(), 7273, "euler67() should return 7273.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler67() { + // Good luck! + return true; +} + +euler67(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-68-magic-5-gon-ring.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-68-magic-5-gon-ring.spanish.md new file mode 100644 index 0000000000..607b9c49e0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-68-magic-5-gon-ring.spanish.md @@ -0,0 +1,74 @@ +--- +id: 5 +localeTitle: 5900f3b01000cf542c50fec3 +challengeType: 5 +title: 'Problem 68: Magic 5-gon ring' +--- + +## Description +
+Considera el siguiente anillo "mágico" de 3 gones, lleno de los números del 1 al 6, y cada línea se suma a nueve. + + +Trabajando en el sentido de las agujas del reloj, y comenzando desde el grupo de tres con el nodo externo numéricamente más bajo (4,3,2 en este ejemplo), cada solución se puede describir de forma única. Por ejemplo, la solución anterior puede ser descrita por el conjunto: 4,3,2; 6,2,1; 5,1,3. +Es posible completar el anillo con cuatro totales diferentes: 9, 10, 11 y 12. Hay ocho soluciones en total. + +TotalSolution Set +94,2,3; 5,3,1; 6,1,2 +94,3,2; 6,2,1; 5,1,3 +102,3,5; 4,5,1; 6,1,3 +102,5,3; 6,3,1; 4,1,5 +111,4,6; 3,6,2; 5,2,4 +111,6,4; 5,4,2; 3,2,6 +121,5,6; 2,6,4; 3,4,5 +121,6,5; 3,5,4; 2,4,6 + +Al concatenar cada grupo es posible formar cadenas de 9 dígitos; la cadena máxima para un anillo de +gones es 432621513. +Usando los números del 1 al 10, y dependiendo de los arreglos, es posible formar cadenas de 16 y 17 dígitos. ¿Cuál es la cadena máxima de 16 dígitos para un anillo de 5 gones "mágico"? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler68() debe devolver 6531031914842725. + testString: 'assert.strictEqual(euler68(), 6531031914842725, "euler68() should return 6531031914842725.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler68() { + // Good luck! + return true; +} + +euler68(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-69-totient-maximum.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-69-totient-maximum.spanish.md new file mode 100644 index 0000000000..73388f5e23 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-69-totient-maximum.spanish.md @@ -0,0 +1,100 @@ +--- +id: 5 +localeTitle: 5900f3b11000cf542c50fec4 +challengeType: 5 +title: 'Problem 69: Totient maximum' +--- + +## Description +
+La función Totient de Euler, φ (n) [a veces llamada función phi], se usa para determinar el número de números menores que n que son primos relativos a n. Por ejemplo, como 1, 2, 4, 5, 7 y 8, son todos menos de nueve y son primos relativos de nueve, φ (9) = 6. + +n +Relativamente Prime +φ (n) +n / φ (n) +2 +1 +1 +2 +3 +1,2 +2 +1.5 +4 +1,3 +2 +2 +5 +1 , 2,3,4 +4 +1.25 +6 +1,5 +2 +3 +7 +1,2,3,4,5,6 +6 +1.1666 ... +8 +1,3,5, 7 +4 +2 +9 +1,2,4,5,7,8 +6 +1.5 +10 +1,3,7,9 +4 +2.5 + +Se puede ver que n = 6 produce un máximo n / φ (n) para n ≤ 10. +Encuentre el valor de n ≤ 1,000,000 para el cual n / φ (n) es un máximo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler69() debe devolver 510510. + testString: 'assert.strictEqual(euler69(), 510510, "euler69() should return 510510.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler69() { + // Good luck! + return true; +} + +euler69(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-7-10001st-prime.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-7-10001st-prime.spanish.md new file mode 100644 index 0000000000..e7b8c49748 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-7-10001st-prime.spanish.md @@ -0,0 +1,82 @@ +--- +id: 5 +localeTitle: 5900f3731000cf542c50fe86 +challengeType: 5 +title: 'Problem 7: 10001st prime' +--- + +## Description +
+Al enumerar los seis primeros números primos: 2, 3, 5, 7, 11 y 13, podemos ver que el primer sexto es 13. +¿Cuál es el n º número primo? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: nthPrime(6) debe devolver 13. + testString: 'assert.strictEqual(nthPrime(6), 13, "nthPrime(6) should return 13.");' + - text: nthPrime(10) debe devolver 29. + testString: 'assert.strictEqual(nthPrime(10), 29, "nthPrime(10) should return 29.");' + - text: nthPrime(100) debe devolver 541. + testString: 'assert.strictEqual(nthPrime(100), 541, "nthPrime(100) should return 541.");' + - text: nthPrime(1000) debe devolver 7919. + testString: 'assert.strictEqual(nthPrime(1000), 7919, "nthPrime(1000) should return 7919.");' + - text: nthPrime(10001) debe devolver 104743. + testString: 'assert.strictEqual(nthPrime(10001), 104743, "nthPrime(10001) should return 104743.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function nthPrime(n) { + // Good luck! + return true; +} + +nthPrime(10001); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const nthPrime = (number)=>{ + let pN = 2; + let step = 0; + while (step diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-70-totient-permutation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-70-totient-permutation.spanish.md new file mode 100644 index 0000000000..b7d369aa84 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-70-totient-permutation.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3b21000cf542c50fec5 +challengeType: 5 +title: 'Problem 70: Totient permutation' +--- + +## Description +
+La función de Totient de Euler, φ (n) [a veces llamada función phi], se usa para determinar el número de números positivos menores o iguales a n que son primos relativos a n. Por ejemplo, como 1, 2, 4, 5, 7 y 8, son todos menos de nueve y son relativamente primos a nueve, φ (9) = 6. El número 1 se considera relativamente primo a cada número positivo, por lo que φ (1) = 1. +Interesantemente, φ (87109) = 79180, y se puede ver que 87109 es una permutación de 79180. +Encuentre el valor de n, 1 <n <107, para el cual φ (n) es una permutación de n y la relación n / φ (n) produce un mínimo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler70() debe devolver 8319823. + testString: 'assert.strictEqual(euler70(), 8319823, "euler70() should return 8319823.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler70() { + // Good luck! + return true; +} + +euler70(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-72-counting-fractions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-72-counting-fractions.spanish.md new file mode 100644 index 0000000000..7fa7f42bca --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-72-counting-fractions.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3b41000cf542c50fec7 +challengeType: 5 +title: 'Problem 72: Counting fractions' +--- + +## Description +
+Considera la fracción, n / d, donde n y d son enteros positivos. Si n 0 Si enumeramos el conjunto de fracciones adecuadas reducidas para d ≤ 8 en orden ascendente de tamaño, obtenemos: +1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1 / 3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8 +Se puede ver que hay 21 elementos en este conjunto. +¿Cuántos elementos estarían contenidos en el conjunto de fracciones apropiadas reducidas para d ≤ 1,000,000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler72() debe devolver 303963552391. + testString: 'assert.strictEqual(euler72(), 303963552391, "euler72() should return 303963552391.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler72() { + // Good luck! + return true; +} + +euler72(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-73-counting-fractions-in-a-range.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-73-counting-fractions-in-a-range.spanish.md new file mode 100644 index 0000000000..3eb649994c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-73-counting-fractions-in-a-range.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3b61000cf542c50fec8 +challengeType: 5 +title: 'Problem 73: Counting fractions in a range' +--- + +## Description +
+Considera la fracción, n / d, donde n y d son enteros positivos. Si n 0 Si enumeramos el conjunto de fracciones adecuadas reducidas para d ≤ 8 en orden ascendente de tamaño, obtenemos: +1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1 / 3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8 +Se puede ver que hay 3 fracciones entre 1/3 y 1/2. +¿Cuántas fracciones hay entre 1/3 y 1/2 en el conjunto ordenado de fracciones apropiadas reducidas para d ≤ 12,000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler73() debe devolver 7295372. + testString: 'assert.strictEqual(euler73(), 7295372, "euler73() should return 7295372.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler73() { + // Good luck! + return true; +} + +euler73(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-74-digit-factorial-chains.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-74-digit-factorial-chains.spanish.md new file mode 100644 index 0000000000..0a10de6f3f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-74-digit-factorial-chains.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f3b61000cf542c50fec9 +challengeType: 5 +title: 'Problem 74: Digit factorial chains' +--- + +## Description +
+El número 145 es bien conocido por la propiedad de que la suma del factorial de sus dígitos es igual a 145: +1! + 4! + 5! = 1 + 24 + 120 = 145 +Quizás menos conocido sea 169, en el sentido de que produce la cadena más larga de números que se enlaza de nuevo a 169; Resulta que solo existen tres bucles de este tipo: +169 → 363601 → 1454 → 169 +871 → 45361 → 871 +872 → 45362 → 872 +No es difícil probar que CADA número inicial eventualmente se atascará en un lazo. Por ejemplo, +69 → 363600 → 1454 → 169 → 363601 (→ 1454) +78 → 45360 → 871 → 45361 (→ 871) +540 → 145 (→ 145) +Comenzando con 69 produce una cadena de cinco términos no repetitivos , pero la cadena no repetitiva más larga con un número inicial inferior a un millón es sesenta términos. +¿Cuántas cadenas, con un número inicial inferior a un millón, contienen exactamente sesenta términos no repetitivos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler74() debe devolver 402. + testString: 'assert.strictEqual(euler74(), 402, "euler74() should return 402.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler74() { + // Good luck! + return true; +} + +euler74(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-75-singular-integer-right-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-75-singular-integer-right-triangles.spanish.md new file mode 100644 index 0000000000..e4f0209500 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-75-singular-integer-right-triangles.spanish.md @@ -0,0 +1,60 @@ +--- +id: 5 +localeTitle: 5900f3b71000cf542c50feca +challengeType: 5 +title: 'Problem 75: Singular integer right triangles' +--- + +## Description +
+Resulta que 12 cm es la longitud más pequeña de cable que se puede doblar para formar un triángulo rectángulo de lado entero entero de una manera, pero hay muchos más ejemplos. +12 cm: (3,4,5) 24 cm: (6,8,10) 30 cm: (5,12,13) ​​36 cm: (9,12,15) 40 cm: (8,15,17 ) 48 cm: (12,16,20) +Por el contrario, algunas longitudes de cable, como 20 cm, no pueden doblarse para formar un triángulo rectángulo con lados enteros, y otras longitudes permiten encontrar más de una solución; por ejemplo, usando 120 cm es posible formar exactamente tres triángulos rectángulos de lados enteros diferentes. +120 cm: (30,40,50), (20,48,52), (24,45,51) +Dado que L es la longitud del cable, ¿cuántos valores de L ≤ 1,500,000 pueden ser exactamente un entero ¿Se formó un triángulo de ángulo recto? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler75() debe devolver 161667. + testString: 'assert.strictEqual(euler75(), 161667, "euler75() should return 161667.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler75() { + // Good luck! + return true; +} + +euler75(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-76-counting-summations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-76-counting-summations.spanish.md new file mode 100644 index 0000000000..30a83982e8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-76-counting-summations.spanish.md @@ -0,0 +1,63 @@ +--- +id: 5 +localeTitle: 5900f3b81000cf542c50fecb +challengeType: 5 +title: 'Problem 76: Counting summations' +--- + +## Description +
+Es posible escribir cinco como suma en exactamente seis formas diferentes: +4 + 1 +3 + 2 +3 + 1 + 1 +2 + 2 + 1 +2 + 1 + 1 + 1 +1 + 1 + 1 + 1 + 1 +¿De cuántas maneras diferentes se pueden escribir cien como una suma de al menos dos enteros positivos? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler76() debe devolver 190569291. + testString: 'assert.strictEqual(euler76(), 190569291, "euler76() should return 190569291.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler76() { + // Good luck! + return true; +} + +euler76(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-77-prime-summations.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-77-prime-summations.spanish.md new file mode 100644 index 0000000000..b2581717c9 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-77-prime-summations.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3b91000cf542c50fecc +challengeType: 5 +title: 'Problem 77: Prime summations' +--- + +## Description +
+Es posible escribir diez como la suma de números primos en exactamente cinco formas diferentes: +7 + 3 +5 + 5 +5 + 3 + 2 +3 + 3 + 2 + 2 +2 + 2 + 2 + 2 + 2 +¿Cuál es el primer valor que se puede escribir como la suma de números primos en más de cinco mil formas diferentes? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler77() debe devolver 71. + testString: 'assert.strictEqual(euler77(), 71, "euler77() should return 71.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler77() { + // Good luck! + return true; +} + +euler77(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-78-coin-partitions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-78-coin-partitions.spanish.md new file mode 100644 index 0000000000..a45dad784c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-78-coin-partitions.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f3ba1000cf542c50fecd +challengeType: 5 +title: 'Problem 78: Coin partitions' +--- + +## Description +
+Deje que p (n) represente el número de formas diferentes en las que n monedas se pueden separar en pilas. Por ejemplo, cinco monedas se pueden separar en pilas exactamente de siete maneras diferentes, por lo que p (5) = 7. + +OOOOO +OOOO O +OOO OO +OOO O O +OO OO O +OO O O O +O O O O O + +Encontrar el menor valor de n para el que p (n) es divisible por un millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler78() debe devolver 55374. + testString: 'assert.strictEqual(euler78(), 55374, "euler78() should return 55374.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler78() { + // Good luck! + return true; +} + +euler78(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-79-passcode-derivation.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-79-passcode-derivation.spanish.md new file mode 100644 index 0000000000..6b13886c11 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-79-passcode-derivation.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3bb1000cf542c50fece +challengeType: 5 +title: 'Problem 79: Passcode derivation' +--- + +## Description +
+Un método de seguridad común utilizado para la banca en línea es pedirle al usuario tres caracteres aleatorios de un código de acceso. Por ejemplo, si el código de acceso era 531278, pueden solicitar los caracteres segundo, tercero y quinto; la respuesta esperada sería: 317. +El archivo de texto, keylog.txt, contiene cincuenta intentos de inicio de sesión exitosos. +Dado que los tres caracteres siempre se solicitan en orden, analice el archivo para determinar el código de acceso secreto más corto posible de longitud desconocida. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler79() debe devolver 73162890. + testString: 'assert.strictEqual(euler79(), 73162890, "euler79() should return 73162890.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler79() { + // Good luck! + return true; +} + +euler79(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-8-largest-product-in-a-series.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-8-largest-product-in-a-series.spanish.md new file mode 100644 index 0000000000..06a653807c --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-8-largest-product-in-a-series.spanish.md @@ -0,0 +1,101 @@ +--- +id: 5 +localeTitle: 5900f3741000cf542c50fe87 +challengeType: 5 +title: 'Problem 8: Largest product in a series' +--- + +## Description +
+Los cuatro dígitos adyacentes en el número de 1000 dígitos que tienen el mayor producto son 9 × 9 × 8 × 9 = 5832. + +
73167176531330624919225119674426574742355349194934
+
96983520312774506326239578318016984801869478851843
+
85861560789112949495459501737958331952853208805511
+
12540698747158523863050715693290963295227443043557
+
66896648950445244523161731856403098711121722383113
+
62229893423380308135336276614282806444486645238749
+
30358907296290491560440772390713810515859307960866
+
70172427121883998797908792274921901699720888093776
+
65727333001053367881220235421809751254540594752243
+
52584907711670556013604839586446706324415722155397
+
53697817977846174064955149290862569321978468622482
+
83972241375657056057490261407972968652414535100474
+
82166370484403199890008895243450658541227588666881
+
16427171479924442928230863465674813919123162824586
+
17866458359124566529476545682848912883142607690042
+
24219022671055626321111109370544217506941658960408
+
07198403850962455444362981230987879927244284909188
+
84580156166097919133875499200524063689912560717606
+
05886116467109405077541002256983155200055935729725
+
71636269561882670428252483600823257530420752963450
+Encuentre los n dígitos adyacentes en el número de 1000 dígitos que tienen el mayor producto. ¿Cuál es el valor de este producto? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: largestProductinaSeries(4) debe devolver 5832. + testString: 'assert.strictEqual(largestProductinaSeries(4), 5832, "largestProductinaSeries(4) should return 5832.");' + - text: largestProductinaSeries(13) debe devolver 23514624000. + testString: 'assert.strictEqual(largestProductinaSeries(13), 23514624000, "largestProductinaSeries(13) should return 23514624000.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function largestProductinaSeries(n) { + // Good luck! + let thousandDigits = [7,3,1,6,7,1,7,6,5,3,1,3,3,0,6,2,4,9,1,9,2,2,5,1,1,9,6,7,4,4,2,6,5,7,4,7,4,2,3,5,5,3,4,9,1,9,4,9,3,4,9,6,9,8,3,5,2,0,3,1,2,7,7,4,5,0,6,3,2,6,2,3,9,5,7,8,3,1,8,0,1,6,9,8,4,8,0,1,8,6,9,4,7,8,8,5,1,8,4,3,8,5,8,6,1,5,6,0,7,8,9,1,1,2,9,4,9,4,9,5,4,5,9,5,0,1,7,3,7,9,5,8,3,3,1,9,5,2,8,5,3,2,0,8,8,0,5,5,1,1,1,2,5,4,0,6,9,8,7,4,7,1,5,8,5,2,3,8,6,3,0,5,0,7,1,5,6,9,3,2,9,0,9,6,3,2,9,5,2,2,7,4,4,3,0,4,3,5,5,7,6,6,8,9,6,6,4,8,9,5,0,4,4,5,2,4,4,5,2,3,1,6,1,7,3,1,8,5,6,4,0,3,0,9,8,7,1,1,1,2,1,7,2,2,3,8,3,1,1,3,6,2,2,2,9,8,9,3,4,2,3,3,8,0,3,0,8,1,3,5,3,3,6,2,7,6,6,1,4,2,8,2,8,0,6,4,4,4,4,8,6,6,4,5,2,3,8,7,4,9,3,0,3,5,8,9,0,7,2,9,6,2,9,0,4,9,1,5,6,0,4,4,0,7,7,2,3,9,0,7,1,3,8,1,0,5,1,5,8,5,9,3,0,7,9,6,0,8,6,6,7,0,1,7,2,4,2,7,1,2,1,8,8,3,9,9,8,7,9,7,9,0,8,7,9,2,2,7,4,9,2,1,9,0,1,6,9,9,7,2,0,8,8,8,0,9,3,7,7,6,6,5,7,2,7,3,3,3,0,0,1,0,5,3,3,6,7,8,8,1,2,2,0,2,3,5,4,2,1,8,0,9,7,5,1,2,5,4,5,4,0,5,9,4,7,5,2,2,4,3,5,2,5,8,4,9,0,7,7,1,1,6,7,0,5,5,6,0,1,3,6,0,4,8,3,9,5,8,6,4,4,6,7,0,6,3,2,4,4,1,5,7,2,2,1,5,5,3,9,7,5,3,6,9,7,8,1,7,9,7,7,8,4,6,1,7,4,0,6,4,9,5,5,1,4,9,2,9,0,8,6,2,5,6,9,3,2,1,9,7,8,4,6,8,6,2,2,4,8,2,8,3,9,7,2,2,4,1,3,7,5,6,5,7,0,5,6,0,5,7,4,9,0,2,6,1,4,0,7,9,7,2,9,6,8,6,5,2,4,1,4,5,3,5,1,0,0,4,7,4,8,2,1,6,6,3,7,0,4,8,4,4,0,3,1,9,9,8,9,0,0,0,8,8,9,5,2,4,3,4,5,0,6,5,8,5,4,1,2,2,7,5,8,8,6,6,6,8,8,1,1,6,4,2,7,1,7,1,4,7,9,9,2,4,4,4,2,9,2,8,2,3,0,8,6,3,4,6,5,6,7,4,8,1,3,9,1,9,1,2,3,1,6,2,8,2,4,5,8,6,1,7,8,6,6,4,5,8,3,5,9,1,2,4,5,6,6,5,2,9,4,7,6,5,4,5,6,8,2,8,4,8,9,1,2,8,8,3,1,4,2,6,0,7,6,9,0,0,4,2,2,4,2,1,9,0,2,2,6,7,1,0,5,5,6,2,6,3,2,1,1,1,1,1,0,9,3,7,0,5,4,4,2,1,7,5,0,6,9,4,1,6,5,8,9,6,0,4,0,8,0,7,1,9,8,4,0,3,8,5,0,9,6,2,4,5,5,4,4,4,3,6,2,9,8,1,2,3,0,9,8,7,8,7,9,9,2,7,2,4,4,2,8,4,9,0,9,1,8,8,8,4,5,8,0,1,5,6,1,6,6,0,9,7,9,1,9,1,3,3,8,7,5,4,9,9,2,0,0,5,2,4,0,6,3,6,8,9,9,1,2,5,6,0,7,1,7,6,0,6,0,5,8,8,6,1,1,6,4,6,7,1,0,9,4,0,5,0,7,7,5,4,1,0,0,2,2,5,6,9,8,3,1,5,5,2,0,0,0,5,5,9,3,5,7,2,9,7,2,5,7,1,6,3,6,2,6,9,5,6,1,8,8,2,6,7,0,4,2,8,2,5,2,4,8,3,6,0,0,8,2,3,2,5,7,5,3,0,4,2,0,7,5,2,9,6,3,4,5,0]; + return true; +} + +largestProductinaSeries(13); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const largestProductinaSeries = (number)=>{ + let thousandDigits = [7,3,1,6,7,1,7,6,5,3,1,3,3,0,6,2,4,9,1,9,2,2,5,1,1,9,6,7,4,4,2,6,5,7,4,7,4,2,3,5,5,3,4,9,1,9,4,9,3,4,9,6,9,8,3,5,2,0,3,1,2,7,7,4,5,0,6,3,2,6,2,3,9,5,7,8,3,1,8,0,1,6,9,8,4,8,0,1,8,6,9,4,7,8,8,5,1,8,4,3,8,5,8,6,1,5,6,0,7,8,9,1,1,2,9,4,9,4,9,5,4,5,9,5,0,1,7,3,7,9,5,8,3,3,1,9,5,2,8,5,3,2,0,8,8,0,5,5,1,1,1,2,5,4,0,6,9,8,7,4,7,1,5,8,5,2,3,8,6,3,0,5,0,7,1,5,6,9,3,2,9,0,9,6,3,2,9,5,2,2,7,4,4,3,0,4,3,5,5,7,6,6,8,9,6,6,4,8,9,5,0,4,4,5,2,4,4,5,2,3,1,6,1,7,3,1,8,5,6,4,0,3,0,9,8,7,1,1,1,2,1,7,2,2,3,8,3,1,1,3,6,2,2,2,9,8,9,3,4,2,3,3,8,0,3,0,8,1,3,5,3,3,6,2,7,6,6,1,4,2,8,2,8,0,6,4,4,4,4,8,6,6,4,5,2,3,8,7,4,9,3,0,3,5,8,9,0,7,2,9,6,2,9,0,4,9,1,5,6,0,4,4,0,7,7,2,3,9,0,7,1,3,8,1,0,5,1,5,8,5,9,3,0,7,9,6,0,8,6,6,7,0,1,7,2,4,2,7,1,2,1,8,8,3,9,9,8,7,9,7,9,0,8,7,9,2,2,7,4,9,2,1,9,0,1,6,9,9,7,2,0,8,8,8,0,9,3,7,7,6,6,5,7,2,7,3,3,3,0,0,1,0,5,3,3,6,7,8,8,1,2,2,0,2,3,5,4,2,1,8,0,9,7,5,1,2,5,4,5,4,0,5,9,4,7,5,2,2,4,3,5,2,5,8,4,9,0,7,7,1,1,6,7,0,5,5,6,0,1,3,6,0,4,8,3,9,5,8,6,4,4,6,7,0,6,3,2,4,4,1,5,7,2,2,1,5,5,3,9,7,5,3,6,9,7,8,1,7,9,7,7,8,4,6,1,7,4,0,6,4,9,5,5,1,4,9,2,9,0,8,6,2,5,6,9,3,2,1,9,7,8,4,6,8,6,2,2,4,8,2,8,3,9,7,2,2,4,1,3,7,5,6,5,7,0,5,6,0,5,7,4,9,0,2,6,1,4,0,7,9,7,2,9,6,8,6,5,2,4,1,4,5,3,5,1,0,0,4,7,4,8,2,1,6,6,3,7,0,4,8,4,4,0,3,1,9,9,8,9,0,0,0,8,8,9,5,2,4,3,4,5,0,6,5,8,5,4,1,2,2,7,5,8,8,6,6,6,8,8,1,1,6,4,2,7,1,7,1,4,7,9,9,2,4,4,4,2,9,2,8,2,3,0,8,6,3,4,6,5,6,7,4,8,1,3,9,1,9,1,2,3,1,6,2,8,2,4,5,8,6,1,7,8,6,6,4,5,8,3,5,9,1,2,4,5,6,6,5,2,9,4,7,6,5,4,5,6,8,2,8,4,8,9,1,2,8,8,3,1,4,2,6,0,7,6,9,0,0,4,2,2,4,2,1,9,0,2,2,6,7,1,0,5,5,6,2,6,3,2,1,1,1,1,1,0,9,3,7,0,5,4,4,2,1,7,5,0,6,9,4,1,6,5,8,9,6,0,4,0,8,0,7,1,9,8,4,0,3,8,5,0,9,6,2,4,5,5,4,4,4,3,6,2,9,8,1,2,3,0,9,8,7,8,7,9,9,2,7,2,4,4,2,8,4,9,0,9,1,8,8,8,4,5,8,0,1,5,6,1,6,6,0,9,7,9,1,9,1,3,3,8,7,5,4,9,9,2,0,0,5,2,4,0,6,3,6,8,9,9,1,2,5,6,0,7,1,7,6,0,6,0,5,8,8,6,1,1,6,4,6,7,1,0,9,4,0,5,0,7,7,5,4,1,0,0,2,2,5,6,9,8,3,1,5,5,2,0,0,0,5,5,9,3,5,7,2,9,7,2,5,7,1,6,3,6,2,6,9,5,6,1,8,8,2,6,7,0,4,2,8,2,5,2,4,8,3,6,0,0,8,2,3,2,5,7,5,3,0,4,2,0,7,5,2,9,6,3,4,5,0]; + let numberOfDigits = thousandDigits.length; + let currentIndex = 0; + let productOfAdjDigits = []; + + while(currentIndex<=(numberOfDigits-number)){ + let currentAdj = thousandDigits.slice(currentIndex,currentIndex+number); + let isAdjDigits = false; + + productOfAdjDigits.push(currentAdj.reduce((prev,cur)=>{ + return prev*cur; + })); + + currentIndex++; + } + + return Math.max(...productOfAdjDigits); +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-80-square-root-digital-expansion.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-80-square-root-digital-expansion.spanish.md new file mode 100644 index 0000000000..b22e61b4d0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-80-square-root-digital-expansion.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3bc1000cf542c50fecf +challengeType: 5 +title: 'Problem 80: Square root digital expansion' +--- + +## Description +
+Es bien sabido que si la raíz cuadrada de un número natural no es un número entero, entonces es irracional. La expansión decimal de tales raíces cuadradas es infinita sin ningún patrón repetitivo. +La raíz cuadrada de dos es 1.41421356237309504880 ..., y la suma digital de los primeros cien dígitos decimales es 475. +Para los primeros cien números naturales, encuentre el total de las sumas digitales de los primeros cien dígitos decimales para Todas las raíces cuadradas irracionales. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler80() debe devolver 40886. + testString: 'assert.strictEqual(euler80(), 40886, "euler80() should return 40886.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler80() { + // Good luck! + return true; +} + +euler80(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-81-path-sum-two-ways.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-81-path-sum-two-ways.spanish.md new file mode 100644 index 0000000000..e03ec3d3a2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-81-path-sum-two-ways.spanish.md @@ -0,0 +1,68 @@ +--- +id: 5 +localeTitle: 5900f3bd1000cf542c50fed0 +challengeType: 5 +title: 'Problem 81: Path sum: two ways' +--- + +## Description +
+En la matriz de 5 por 5 a continuación, la suma mínima de la ruta desde la parte superior izquierda hasta la parte inferior derecha, al moverse solo hacia la derecha y hacia abajo, se indica en negrita en rojo y es igual a 2427. + +$ +\ begin { pmatrix} +\ color {rojo} {131} y 673 y 234 y 103 y 18 \\ +\ color {rojo} {201} y \ color {rojo} {96} y \ color {rojo} {342} y 965 & 150 \\ +630 & 803 & \ color {rojo} {746} & \ color {rojo} {422} & 111 \\ +537 & 699 & 497 & \ color {rojo} {121} & 956 \\ +805 & 732 & 524 & \ color {red} {37} & \ color {red} {331} +\ end {pmatrix} +$ + +Encuentre la suma de ruta mínima, en matrix.txt (haga clic con el botón derecho y "Guardar Enlace / Destino como ... "), un archivo de texto de 31K que contiene una matriz de 80 por 80, desde la parte superior izquierda hasta la parte inferior derecha moviéndose solo hacia la derecha y hacia abajo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler81() debe devolver 427337. + testString: 'assert.strictEqual(euler81(), 427337, "euler81() should return 427337.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler81() { + // Good luck! + return true; +} + +euler81(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-82-path-sum-three-ways.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-82-path-sum-three-ways.spanish.md new file mode 100644 index 0000000000..78be8482b8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-82-path-sum-three-ways.spanish.md @@ -0,0 +1,69 @@ +--- +id: 5 +localeTitle: 5900f3be1000cf542c50fed1 +challengeType: 5 +title: 'Problem 82: Path sum: three ways' +--- + +## Description +
+NOTA: Este problema es una versión más desafiante del Problema 81. +La suma de la trayectoria mínima en la matriz de 5 por 5 a continuación, comenzando en cualquier celda en la columna izquierda y terminando en cualquier celda en la columna derecha, y solo subiendo , abajo, y derecha, se indica en rojo y en negrita; la suma es igual a 994. + +$ +\ begin {pmatrix} +131 & 673 & \ color {red} {234} & \ color {red} {103} & \ color {red} {18} \\ +\ color {rojo} {201} y \ color {rojo} {96} y \ color {rojo} {342} y 965 y 150 \\ +630 y 803 y 746 y 422 y 111 \\ +537 y 699 y 497 & 121 & 956 \\ +805 & 732 & 524 & 37 & 331 +\ end {pmatrix} +$ + +Encuentre la suma de ruta mínima, en matrix.txt (haga clic con el botón derecho y "Guardar enlace / Destinar como ... . "), un archivo de texto de 31K que contiene una matriz de 80 por 80, desde la columna de la izquierda hasta la columna de la derecha. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler82() debe devolver 260324. + testString: 'assert.strictEqual(euler82(), 260324, "euler82() should return 260324.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler82() { + // Good luck! + return true; +} + +euler82(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-83-path-sum-four-ways.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-83-path-sum-four-ways.spanish.md new file mode 100644 index 0000000000..a0184514b8 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-83-path-sum-four-ways.spanish.md @@ -0,0 +1,70 @@ +--- +id: 5 +localeTitle: 5900f3bf1000cf542c50fed2 +challengeType: 5 +title: 'Problem 83: Path sum: four ways' +--- + +## Description +
+NOTA: Este problema es una versión significativamente más desafiante del Problema 81. +En la matriz de 5 por 5 a continuación, se indica la suma mínima de la ruta desde la parte superior izquierda hasta la parte inferior derecha, al mover la izquierda, derecha, arriba y abajo. en negrita rojo y es igual a 2297. + +$ +\ begin {pmatrix} +\ color {red} {131} & 673 & \ color {red} {234} & \ color {red} {103} & \ color {rojo} {18} \\ +\ color {rojo} {201} & \ color {rojo} {96} y \ color {rojo} {342} y 965 y \ color {rojo} {150} \\ +630 y 803 y 746 y \ color {rojo} {422} y \ color {rojo} {111} \\ +537 y 699 y 497 y \ color {rojo} {121} y 956 \\ +805 y 732 y 524 & \ color {rojo} {37} & \ color {rojo} {331} +\ fin {pmatrix} +$ + +Encuentre la suma de ruta mínima, en matrix.txt (clic derecho y +"Guardar enlace / Destinar como ... "), un archivo de texto de 31K que contiene una matriz de 80 por 80, desde la parte superior izquierda hasta la parte inferior derecha moviéndose hacia la izquierda, hacia la derecha, hacia arriba y hacia abajo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler83() debe devolver 425185. + testString: 'assert.strictEqual(euler83(), 425185, "euler83() should return 425185.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler83() { + // Good luck! + return true; +} + +euler83(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-84-monopoly-odds.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-84-monopoly-odds.spanish.md new file mode 100644 index 0000000000..22e67af0ee --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-84-monopoly-odds.spanish.md @@ -0,0 +1,130 @@ +--- +id: 5 +localeTitle: 5900f3c11000cf542c50fed3 +challengeType: 5 +title: 'Problem 84: Monopoly odds' +--- + +## Description +
+En el juego, Monopoly, el tablero estándar se configura de la siguiente manera: + +GO +A1 +CC1 +A2 +T1 +R1 +B1 +CH1 +B2 +B3 +JAIL +H2 + +C1 +T2 + +U1 +H1 + +C2 +CH3 + +C3 +R4 + +R2 +G3 + +D1 +CC3 + +CC2 +G2 + +D2 +G1 + +D3 +G2J +F3 +U2 +F2 +F1 +R3 +E3 +E2 +CH2 +E1 +FP + +Un jugador comienza en la casilla GO y agrega las puntuaciones en dos dados de 6 lados para determinar la cantidad de casillas que avanzan en el sentido de las agujas del reloj. Sin más reglas, esperaríamos visitar cada cuadrado con la misma probabilidad: 2.5%. Sin embargo, aterrizar en G2J (Ir a la cárcel), CC (cofre de la comunidad) y CH (probabilidad) cambia esta distribución. +Además de G2J, y una tarjeta de cada uno de CC y CH, que ordena al jugador ir directamente a la cárcel, si un jugador saca tres dobles consecutivos, no adelanta el resultado de su tercera tirada. En su lugar, proceden directamente a la cárcel. +Al comienzo del juego, las cartas CC y CH se barajan. Cuando un jugador cae en CC o CH, toma una carta de la parte superior de la pila respectiva y, después de seguir las instrucciones, se devuelve a la parte inferior de la pila. Hay dieciséis cartas en cada pila, pero para el propósito de este problema solo nos interesan las cartas que ordenan un movimiento; cualquier instrucción que no esté relacionada con el movimiento será ignorada y el jugador permanecerá en la casilla CC / CH. +Cofre de la comunidad (2/16 tarjetas): +Avanzar a GO +Ir a CARRETERA + +Chance (10/16 tarjetas): +Avanzar a GO +Ir a JAIL +Ir a C1 +Ir a E3 +Ir a H2 +Ir a R1 +Ir a la siguiente R (compañía ferroviaria) +Ir a la siguiente R +Ir a la siguiente U (empresa de servicios) +Volver 3 casillas. + +El corazón de este problema se refiere a la probabilidad de visitar una plaza en particular. Es decir, la probabilidad de terminar en esa casilla después de una tirada. Por esta razón, debe quedar claro que, con la excepción de G2J para la cual la probabilidad de terminar es cero, los cuadrados CH tendrán las probabilidades más bajas, ya que 5/8 solicita un movimiento a otro cuadrado, y es el final cuadrada en la que el jugador termina en cada tirada en la que estamos interesados. No haremos distinción entre "Sólo visitar" y ser enviado a la CÁRCEL, y también ignoraremos la regla de exigir un doble para "salir de la cárcel", asumiendo que pagan para salir en su próximo turno. +Comenzando en GO y numerando los cuadrados secuencialmente de 00 a 39, podemos concatenar estos números de dos dígitos para producir cadenas que correspondan con conjuntos de cuadrados. +Estadísticamente se puede mostrar que los tres cuadrados más populares, en orden, son JAIL (6.24%) = Cuadrado 10, E3 (3.18%) = Cuadrado 24, y GO (3.09%) = Cuadrado 00. Entonces estos tres más populares los cuadrados se pueden enumerar con la cadena modal de seis dígitos: 102400. +Si, en lugar de usar dos dados de 6 lados, se usan dos dados de 4 lados, encuentre la cadena modal de seis dígitos. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler84() debe devolver 101524. + testString: 'assert.strictEqual(euler84(), 101524, "euler84() should return 101524.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler84() { + // Good luck! + return true; +} + +euler84(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-85-counting-rectangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-85-counting-rectangles.spanish.md new file mode 100644 index 0000000000..131b916917 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-85-counting-rectangles.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3c11000cf542c50fed4 +challengeType: 5 +title: 'Problem 85: Counting rectangles' +--- + +## Description +
+Al contar con cuidado, se puede ver que una cuadrícula rectangular que mide 3 por 2 contiene dieciocho rectángulos: + + +Aunque no existe una cuadrícula rectangular que contenga exactamente dos millones de rectángulos, encuentre el área de la cuadrícula con la solución más cercana. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler85() debe devolver 2772. + testString: 'assert.strictEqual(euler85(), 2772, "euler85() should return 2772.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler85() { + // Good luck! + return true; +} + +euler85(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-86-cuboid-route.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-86-cuboid-route.spanish.md new file mode 100644 index 0000000000..d7c9c9a34a --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-86-cuboid-route.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3c31000cf542c50fed5 +challengeType: 5 +title: 'Problem 86: Cuboid route' +--- + +## Description +
+Una araña, S, se sienta en una esquina de una habitación cuboide, mide 6 por 5 por 3, y una mosca, F, se sienta en la esquina opuesta. Al viajar por las superficies de la habitación, la distancia más corta en "línea recta" de S a F es 10 y la trayectoria se muestra en el diagrama. + + +Sin embargo, hay hasta tres candidatos de ruta "más cortos" para cualquier cuboide dado y la ruta más corta no siempre tiene una longitud entera. +Se puede mostrar que hay exactamente 2060 cuboides distintos, ignorando rotaciones, con dimensiones enteras, hasta un tamaño máximo de M por M por M, para las cuales la ruta más corta tiene una longitud entera cuando M = 100. Este es el valor mínimo de M para el cual el número de soluciones primero supera los dos mil; el número de soluciones cuando M = 99 es 1975. +Encuentre el menor valor de M, de manera que el número de soluciones primero supere el millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler86() debe devolver 1818. + testString: 'assert.strictEqual(euler86(), 1818, "euler86() should return 1818.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler86() { + // Good luck! + return true; +} + +euler86(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-87-prime-power-triples.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-87-prime-power-triples.spanish.md new file mode 100644 index 0000000000..51c22c46b0 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-87-prime-power-triples.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3c51000cf542c50fed8 +challengeType: 5 +title: 'Problem 87: Prime power triples' +--- + +## Description +
+El número más pequeño expresable como la suma de un cuadrado principal, un cubo principal y una cuarta potencia principal es 28. De hecho, hay exactamente cuatro números por debajo de cincuenta que se pueden expresar de tal manera: +28 = 22 + 23 + 24 +33 = 32 + 23 + 24 +49 = 52 + 23 + 24 +47 = 22 + 33 + 24 +¿Cuántos números por debajo de cincuenta millones se pueden expresar como la suma de un cuadrado primario, un cubo primario y una cuarta potencia principal? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler87() debe devolver 1097343. + testString: 'assert.strictEqual(euler87(), 1097343, "euler87() should return 1097343.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler87() { + // Good luck! + return true; +} + +euler87(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-88-product-sum-numbers.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-88-product-sum-numbers.spanish.md new file mode 100644 index 0000000000..aac9333b3d --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-88-product-sum-numbers.spanish.md @@ -0,0 +1,62 @@ +--- +id: 5 +localeTitle: 5900f3c51000cf542c50fed6 +challengeType: 5 +title: 'Problem 88: Product-sum numbers' +--- + +## Description +
+Un número natural, N, que se puede escribir como la suma y el producto de un conjunto dado de al menos dos números naturales, {a1, a2, ..., ak} se denomina número de la suma del producto: N = a1 + a2 + ... + ak = a1 × a2 × ... × ak. +Por ejemplo, 6 = 1 + 2 + 3 = 1 × 2 × 3. +Para un conjunto dado de tamaño, k, llamaremos a la N más pequeña con esta propiedad un número mínimo de producto. Los números mínimos de suma de producto para conjuntos de tamaño, k = 2, 3, 4, 5 y 6 son los siguientes. +k = 2: 4 = 2 × 2 = 2 + 2k = 3: 6 = 1 × 2 × 3 = 1 + 2 + 3k = 4: 8 = 1 × 1 × 2 × 4 = 1 + 1 + 2 + 4k = 5: 8 = 1 × 1 × 2 × 2 × 2 = 1 + 1 + 2 + 2 + 2k = 6: 12 = 1 × 1 × 1 × 1 × 2 × 6 = 1 + 1 + 1 + 1 + 2 + 6 +Por lo tanto, para 2≤k≤6, la suma de todos los números mínimos de sumas de productos es 4 + 6 + 8 + 12 = 30; tenga en cuenta que 8 solo se cuenta una vez en la suma. +De hecho, como el conjunto completo de números mínimos de suma de producto para 2≤k≤12 es {4, 6, 8, 12, 15, 16}, la suma es 61. +¿Cuál es la suma de todo el producto mínimo? -sumeros de 2≤k≤12000? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler88() debe devolver 7587457. + testString: 'assert.strictEqual(euler88(), 7587457, "euler88() should return 7587457.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler88() { + // Good luck! + return true; +} + +euler88(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-89-roman-numerals.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-89-roman-numerals.spanish.md new file mode 100644 index 0000000000..db1ca41f06 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-89-roman-numerals.spanish.md @@ -0,0 +1,67 @@ +--- +id: 5 +localeTitle: 5900f3c51000cf542c50fed7 +challengeType: 5 +title: 'Problem 89: Roman numerals' +--- + +## Description +
+Para que un número escrito en números romanos se considere válido, hay reglas básicas que deben seguirse. Aunque las reglas permiten que algunos números se expresen de más de una manera, siempre hay una "mejor" forma de escribir un número en particular. +Por ejemplo, parece que hay al menos seis formas de escribir el número dieciséis: +IIIIIIIIIIIIIII +VIIIIIIIIIII +VVIIIIII +XIIIIII +VVVI +XVI +Sin embargo, de acuerdo con las reglas solo son válidas XIIIIII y XVI, y el último ejemplo se considera el más eficiente, ya que utiliza el menor número de números. +El archivo de texto de 11K, roman.txt (clic con el botón derecho y 'Guardar enlace / Destinar como ...'), contiene mil números escritos en números romanos válidos, pero no necesariamente mínimos; vea Acerca de ... Números romanos para las reglas definitivas para este problema. +Encuentre el número de caracteres guardados escribiendo cada uno de estos en su forma mínima. +Nota: Puede asumir que todos los números romanos en el archivo no contienen más de cuatro unidades idénticas consecutivas. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler89() debe devolver 743. + testString: 'assert.strictEqual(euler89(), 743, "euler89() should return 743.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler89() { + // Good luck! + return true; +} + +euler89(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-9-special-pythagorean-triplet.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-9-special-pythagorean-triplet.spanish.md new file mode 100644 index 0000000000..d7b053a32f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-9-special-pythagorean-triplet.spanish.md @@ -0,0 +1,77 @@ +--- +id: 5 +localeTitle: 5900f3761000cf542c50fe88 +challengeType: 5 +title: 'Problem 9: Special Pythagorean triplet' +--- + +## Description +
+Un triplete pitagórico es un conjunto de tres números naturales, a < b < c , para lo cual, +
a 2 + b 2 = c 2
+Por ejemplo, 3 2 + 4 2 = 9 + 16 = 25 = 5 2 . +Existe exactamente un triplete de Pitágoras para el cual a + b + c = 1000. Encuentre el producto abc tal que a + b + c = n . +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: specialPythagoreanTriplet(1000) debe devolver 31875000. + testString: 'assert.strictEqual(specialPythagoreanTriplet(1000), 31875000, "specialPythagoreanTriplet(1000) should return 31875000.");' + - text: specialPythagoreanTriplet(24) debe devolver 480. + testString: 'assert.strictEqual(specialPythagoreanTriplet(24), 480, "specialPythagoreanTriplet(24) should return 480.");' + - text: specialPythagoreanTriplet(120) debe devolver 49920. + testString: 'assert.strictEqual(specialPythagoreanTriplet(120), 49920, "specialPythagoreanTriplet(120) should return 49920.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function specialPythagoreanTriplet(n) { + let sumOfabc = n; + // Good luck! + return true; +} + +specialPythagoreanTriplet(1000); +``` + +
+ + + +
+ +## Solution +
+ + +```js +const specialPythagoreanTriplet = (n)=>{ + let sumOfabc = n; + let a,b,c; + for(a = 1; a<=sumOfabc/3; a++){ + for(b = a+1; b<=sumOfabc/2; b++){ + c = Math.sqrt(a*a+b*b); + if((a+b+c) == sumOfabc){ + return a*b*c; + } + } + } +} +``` + +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-90-cube-digit-pairs.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-90-cube-digit-pairs.spanish.md new file mode 100644 index 0000000000..11c70d311f --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-90-cube-digit-pairs.spanish.md @@ -0,0 +1,76 @@ +--- +id: 5 +localeTitle: 5900f3c61000cf542c50fed9 +challengeType: 5 +title: 'Problem 90: Cube digit pairs' +--- + +## Description +
+Cada una de las seis caras en un cubo tiene un dígito diferente (0 a 9) escrito en él; Lo mismo se hace con un segundo cubo. Al colocar los dos cubos uno al lado del otro en diferentes posiciones, podemos formar una variedad de números de 2 dígitos. + +Por ejemplo, el número cuadrado 64 podría formarse: + + + + +De hecho, al elegir cuidadosamente los dígitos en ambos cubos es posible mostrar todos los números cuadrados debajo de cien: 01, 04, 09, 16, 25, 36, 49, 64 y 81. + +Por ejemplo, una forma de lograrlo es colocando {0, 5, 6, 7, 8, 9} en un cubo y {1, 2, 3 , 4, 8, 9} en el otro cubo. + +Sin embargo, para este problema, permitiremos que el 6 o el 9 se inviertan de manera que una disposición como {0, 5, 6, 7, 8, 9} y {1, 2, 3, 4, 6, 7} permite que se muestren los nueve números cuadrados; de lo contrario, sería imposible obtener 09. + +Al determinar un arreglo distinto, nos interesan los dígitos de cada cubo, no el orden. + +{1, 2, 3, 4, 5, 6} es equivalente a {3, 6, 4, 1, 2, 5} +{1, 2, 3, 4, 5, 6} es distinto de {1 , 2, 3, 4, 5, 9} + +Pero como estamos permitiendo que se inviertan 6 y 9, los dos conjuntos distintos en el último ejemplo representan el conjunto extendido {1, 2, 3, 4, 5, 6 , 9} con el propósito de formar números de 2 dígitos. + +¿Cuántos arreglos distintos de los dos cubos permiten que se muestren todos los números cuadrados? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler90() debe devolver 1217. + testString: 'assert.strictEqual(euler90(), 1217, "euler90() should return 1217.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler90() { + // Good luck! + return true; +} + +euler90(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.spanish.md new file mode 100644 index 0000000000..69fdef4883 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-91-right-triangles-with-integer-coordinates.spanish.md @@ -0,0 +1,66 @@ +--- +id: 5 +localeTitle: 5900f3c71000cf542c50feda +challengeType: 5 +title: 'Problem 91: Right triangles with integer coordinates' +--- + +## Description +
+Los puntos P (x1, y1) y Q (x2, y2) se trazan en coordenadas de enteros y se unen al origen, O (0,0), para formar ΔOPQ. + + + + +Hay exactamente catorce triángulos que contienen un ángulo recto que pueden formarse cuando cada coordenada se encuentra entre 0 y 2 inclusive; es decir, 0 ≤ x1, y1, x2, y2 ≤ 2. + + + + +Dado que 0 ≤ x1, y1, x2, y2 ≤ 50, ¿cuántos triángulos rectos pueden formarse? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler91() debe devolver 14234. + testString: 'assert.strictEqual(euler91(), 14234, "euler91() should return 14234.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler91() { + // Good luck! + return true; +} + +euler91(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-92-square-digit-chains.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-92-square-digit-chains.spanish.md new file mode 100644 index 0000000000..8c77144d86 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-92-square-digit-chains.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3c81000cf542c50fedb +challengeType: 5 +title: 'Problem 92: Square digit chains' +--- + +## Description +
+Se crea una cadena de números agregando continuamente el cuadrado de los dígitos en un número para formar un nuevo número hasta que se haya visto antes. +Por ejemplo, +44 → 32 → 13 → 10 → 1 → 1 +85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89 +Por lo tanto cualquier cadena que llega a 1 o 89 se convertirá en atascado en un bucle sin fin Lo más sorprendente es que CADA número inicial llegará eventualmente a 1 u 89. +¿Cuántos números iniciales por debajo de diez millones llegarán a 89? +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler92() debe devolver 8581146. + testString: 'assert.strictEqual(euler92(), 8581146, "euler92() should return 8581146.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler92() { + // Good luck! + return true; +} + +euler92(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-93-arithmetic-expressions.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-93-arithmetic-expressions.spanish.md new file mode 100644 index 0000000000..0deb070760 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-93-arithmetic-expressions.spanish.md @@ -0,0 +1,64 @@ +--- +id: 5 +localeTitle: 5900f3ca1000cf542c50fedc +challengeType: 5 +title: 'Problem 93: Arithmetic expressions' +--- + +## Description +
+Al usar cada uno de los dígitos del conjunto, {1, 2, 3, 4}, exactamente una vez, y haciendo uso de las cuatro operaciones aritméticas (+, -, *, /) y paréntesis / paréntesis, es posible formar diferentes objetivos enteros positivos. +Por ejemplo, +8 = (4 * (1 + 3)) / 2 +14 = 4 * (3 + 1/2) +19 = 4 * (2 + 3) - 1 +36 = 3 * 4 * ( 2 + 1) +Tenga en cuenta que no se permiten las concatenaciones de los dígitos, como 12 + 34. +Usando el conjunto, {1, 2, 3, 4}, es posible obtener treinta y un números objetivo diferentes, de los cuales 36 es el máximo, y cada uno de los números 1 a 28 se puede obtener antes de encontrar el primer número numero expresable. +Encuentre el conjunto de cuatro dígitos distintos, a <b <c <d, para el cual se puede obtener el conjunto más largo de enteros positivos consecutivos, 1 a n, dando su respuesta como una cadena: abcd. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler93() debe devolver 1258. + testString: 'assert.strictEqual(euler93(), 1258, "euler93() should return 1258.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler93() { + // Good luck! + return true; +} + +euler93(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-94-almost-equilateral-triangles.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-94-almost-equilateral-triangles.spanish.md new file mode 100644 index 0000000000..49c2060a77 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-94-almost-equilateral-triangles.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3ca1000cf542c50fedd +challengeType: 5 +title: 'Problem 94: Almost equilateral triangles' +--- + +## Description +
+Es fácil demostrar que no existe un triángulo equilátero con lados de longitud integral y área integral. Sin embargo, el triángulo casi equilátero 5-5-6 tiene un área de 12 unidades cuadradas. +Definiremos que un triángulo casi equilátero es un triángulo para el que dos lados son iguales y el tercero no difiere en más de una unidad. +Encuentre la suma de los perímetros de todos los triángulos casi equiláteros con longitudes laterales integrales y área y cuyos perímetros no excedan los mil millones (1,000,000,000). +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler94() debe devolver 518408346. + testString: 'assert.strictEqual(euler94(), 518408346, "euler94() should return 518408346.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler94() { + // Good luck! + return true; +} + +euler94(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-95-amicable-chains.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-95-amicable-chains.spanish.md new file mode 100644 index 0000000000..b2ccc7012b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-95-amicable-chains.spanish.md @@ -0,0 +1,61 @@ +--- +id: 5 +localeTitle: 5900f3cc1000cf542c50fede +challengeType: 5 +title: 'Problem 95: Amicable chains' +--- + +## Description +
+Los divisores adecuados de un número son todos los divisores que excluyen el propio número. Por ejemplo, los divisores adecuados de 28 son 1, 2, 4, 7 y 14. Como la suma de estos divisores es igual a 28, lo llamamos un número perfecto. +Interesantemente, la suma de los divisores propios de 220 es 284 y la suma de los divisores propios de 284 es 220, formando una cadena de dos números. Por esta razón, 220 y 284 se llaman un par amistoso. +Quizás menos conocidas sean las cadenas más largas. Por ejemplo, comenzando con 12496, formamos una cadena de cinco números: +12496 → 14288 → 15472 → 14536 → 14264 (→ 12496 → ...) +Dado que esta cadena vuelve a su punto de inicio, se llama cadena amistosa. +Encuentre el miembro más pequeño de la cadena amistosa más larga sin ningún elemento que exceda un millón. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler95() debe devolver 14316. + testString: 'assert.strictEqual(euler95(), 14316, "euler95() should return 14316.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler95() { + // Good luck! + return true; +} + +euler95(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-96-su-doku.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-96-su-doku.spanish.md new file mode 100644 index 0000000000..3883b716d2 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-96-su-doku.spanish.md @@ -0,0 +1,86 @@ +--- +id: 5 +localeTitle: 5900f3cc1000cf542c50fedf +challengeType: 5 +title: 'Problem 96: Su Doku' +--- + +## Description +
+Su Doku (lugar que significa japonés) es el nombre que recibe un concepto de rompecabezas popular. Su origen no está claro, pero se debe atribuir el crédito a Leonhard Euler, quien inventó una enigmática similar, mucho más difícil, llamada Latin Squares. El objetivo de los rompecabezas de Su Doku, sin embargo, es reemplazar los espacios en blanco (o ceros) en una cuadrícula de 9 por 9, de modo que cada fila, columna y cuadro de 3 por 3 contenga cada uno de los dígitos del 1 al 9. A continuación se muestra un ejemplo de una cuadrícula de rompecabezas de partida típica y su cuadrícula de solución. + + + + +0 0 0 +0 2 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 28 0 00 0 5 +6 0 92 0 30 1 0 +5 0 00 0 93 0 0 + + + +4 8 39 6 72 5 1 +9 2 13 4 58 7 6 +6 5 78 2 14 9 3 +5 4 87 2 91 3 6 +1 3 25 6 47 9 8 +9 7 61 3 82 4 5 +3 7 28 1 46 9 5 +6 8 92 5 34 1 7 +5 1 47 6 93 8 2 + + +Un rompecabezas Su Doku bien construido tiene una solución única y puede ser resuelto por la lógica, aunque puede ser necesario emplear métodos de "adivinar y probar" para eliminar opciones (hay mucha opinión cuestionada sobre esto). La complejidad de la búsqueda determina la dificultad del rompecabezas; el ejemplo anterior se considera fácil porque puede resolverse mediante una deducción directa directa. +El archivo de texto 6K, sudoku.txt (haga clic con el botón derecho y 'Guardar enlace / Destinar como ...'), contiene cincuenta rompecabezas Su Doku diferentes en dificultad, pero todos con soluciones únicas (el primer enigma del archivo es el ejemplo encima). +Al resolver los cincuenta rompecabezas, encuentre la suma de los números de 3 dígitos que se encuentran en la esquina superior izquierda de cada cuadrícula de soluciones; por ejemplo, 483 es ​​el número de 3 dígitos que se encuentra en la esquina superior izquierda de la cuadrícula de soluciones de arriba. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler96() debe devolver 24702. + testString: 'assert.strictEqual(euler96(), 24702, "euler96() should return 24702.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler96() { + // Good luck! + return true; +} + +euler96(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-97-large-non-mersenne-prime.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-97-large-non-mersenne-prime.spanish.md new file mode 100644 index 0000000000..138c7b9c9b --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-97-large-non-mersenne-prime.spanish.md @@ -0,0 +1,58 @@ +--- +id: 5 +localeTitle: 5900f3ce1000cf542c50fee0 +challengeType: 5 +title: 'Problem 97: Large non-Mersenne prime' +--- + +## Description +
+La primera prima conocida que supera el millón de dígitos se descubrió en 1999, y es una prima de Mersenne de la forma 26972593−1; Contiene exactamente 2,098,960 dígitos. Posteriormente, se han encontrado otros números primos de Mersenne, de la forma 2p-1, que contienen más dígitos. +Sin embargo, en 2004 se encontró un cebado no Mersenne masivo que contiene 2,357,207 dígitos: 28433 × 27830457 + 1. +Encuentra los últimos diez dígitos de este número primo. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler97() debe devolver 8739992577. + testString: 'assert.strictEqual(euler97(), 8739992577, "euler97() should return 8739992577.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler97() { + // Good luck! + return true; +} + +euler97(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-98-anagramic-squares.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-98-anagramic-squares.spanish.md new file mode 100644 index 0000000000..d16389cba1 --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-98-anagramic-squares.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3cf1000cf542c50fee1 +challengeType: 5 +title: 'Problem 98: Anagramic squares' +--- + +## Description +
+Al reemplazar cada una de las letras en la palabra CARE con 1, 2, 9 y 6 respectivamente, formamos un número cuadrado: 1296 = 362. Lo que es notable es que, al usar las mismas sustituciones digitales, el anagrama, RACE, también forma un número cuadrado: 9216 = 962. Llamaremos a CARE (y RACE) un par de palabras de anagrama cuadrado y especificamos además que no se permiten los ceros iniciales, ni puede una letra diferente tener el mismo valor digital que otra letra. +Utilizando words.txt (haga clic con el botón derecho y 'Guardar enlace / destino como ...'), un archivo de texto de 16K que contiene casi dos mil palabras comunes en inglés, encuentre todos los pares de palabras del anagrama cuadrado (una palabra palindrómica NO se considera un anagrama de sí mismo). +¿Cuál es el número cuadrado más grande formado por cualquier miembro de tal par? +NOTA: Todos los anagramas formados deben estar contenidos en el archivo de texto dado. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler98() debe devolver 18769. + testString: 'assert.strictEqual(euler98(), 18769, "euler98() should return 18769.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler98() { + // Good luck! + return true; +} + +euler98(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-99-largest-exponential.spanish.md b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-99-largest-exponential.spanish.md new file mode 100644 index 0000000000..c012fa84ed --- /dev/null +++ b/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-99-largest-exponential.spanish.md @@ -0,0 +1,59 @@ +--- +id: 5 +localeTitle: 5900f3d01000cf542c50fee2 +challengeType: 5 +title: 'Problem 99: Largest exponential' +--- + +## Description +
+Comparar dos números escritos en forma de índice como 211 y 37 no es difícil, ya que cualquier calculadora confirmaría que 211 = 2048 <37 = 2187. +Sin embargo, confirmar que 632382518061> 519432525806 sería mucho más difícil, ya que ambos números contienen más de tres millones de dígitos. +Utilizando base_exp.txt (clic con el botón derecho y 'Guardar enlace / destino como ...'), un archivo de texto de 22K que contiene mil líneas con un par de base / exponente en cada línea, determina qué número de línea tiene el mayor valor numérico. +NOTA: Las dos primeras líneas en el archivo representan los números en el ejemplo dado arriba. +
+ +## Instructions +
+ +
+ +## Tests +
+ +```yml +tests: + - text: euler99() debe devolver 709. + testString: 'assert.strictEqual(euler99(), 709, "euler99() should return 709.");' + +``` + +
+ +## Challenge Seed +
+ +
+ +```js +function euler99() { + // Good luck! + return true; +} + +euler99(); +``` + +
+ + + +
+ +## Solution +
+ +```js +// solution required +``` +
diff --git a/curriculum/challenges/translatemd.js b/curriculum/challenges/translatemd.js index 06019ba114..d8f901dfc5 100644 --- a/curriculum/challenges/translatemd.js +++ b/curriculum/challenges/translatemd.js @@ -17,8 +17,8 @@ var langFull = 'spanish'; // } // }); -var dir1 = fs.readdirSync('./english')[7]; -var dir2 = fs.readdirSync('./english/' + dir1)[9]; +var dir1 = fs.readdirSync('./english')[6]; +var dir2 = fs.readdirSync('./english/' + dir1)[3]; var dir = dir1 + '/' + dir2; fs.readdirSync('./english/' + dir).forEach(file => { if (file.includes('.md') && dir) { @@ -43,7 +43,7 @@ fs.readdirSync('./english/' + dir).forEach(file => { // if (file.includes('.md') && dir) {getFile(file, dir)} // }); -//getFile('add-a-text-alternative-to-images-for-visually-impaired-accessibility.english.md', '01-responsive-web-design/applied-accessibility') +//getFile('problem-2-even-fibonacci-numbers.english.md', '08-coding-interview-prep/project-euler') // Load in full text, description, instructions, and title function getFile(file, dir) {