5 kyu
Diophantine Equation
529 of 4,874g964
Description:
In mathematics, a Diophantine equation is a polynomial equation, usually with two or more unknowns, such that only the integer solutions are sought or studied.
In this kata we want to find all integers x, y
(x >= 0, y >= 0
) solutions of a diophantine equation of the form:
(where the unknowns are x
and y
; and n
is a given positive number)
in decreasing order of the positive .
If there is no solution return []
or "[]"
or ""
. (See "RUN SAMPLE TESTS" for examples of returns).
Examples:
90005 --> [[45003, 22501], [9003, 4499], [981, 467], [309, 37]]
90002 --> []
Hint:
Fundamentals
Mathematics
Algebra
Similar Kata:
Stats:
Created | May 10, 2015 |
Published | May 10, 2015 |
Warriors Trained | 31897 |
Total Skips | 12411 |
Total Code Submissions | 49326 |
Total Times Completed | 4874 |
Ruby Completions | 119 |
Python Completions | 1615 |
Clojure Completions | 23 |
Java Completions | 529 |
C# Completions | 242 |
Haskell Completions | 112 |
JavaScript Completions | 701 |
CoffeeScript Completions | 12 |
TypeScript Completions | 146 |
C++ Completions | 441 |
Elixir Completions | 45 |
PHP Completions | 106 |
Crystal Completions | 6 |
F# Completions | 27 |
C Completions | 189 |
Rust Completions | 177 |
Swift Completions | 84 |
Go Completions | 181 |
Shell Completions | 10 |
OCaml Completions | 19 |
Kotlin Completions | 103 |
Fortran Completions | 9 |
Julia Completions | 25 |
Scala Completions | 62 |
R Completions | 33 |
PowerShell Completions | 14 |
Nim Completions | 9 |
Racket Completions | 16 |
Reason Completions | 4 |
Prolog Completions | 11 |
Dart Completions | 82 |
Pascal Completions | 5 |
Factor Completions | 8 |
Raku Completions | 5 |
Lua Completions | 35 |
Perl Completions | 9 |
Elm Completions | 5 |
D Completions | 6 |
COBOL Completions | 6 |
Erlang Completions | 6 |
Total Stars | 865 |
% of votes with a positive feedback rating | 89% of 689 |
Total "Very Satisfied" Votes | 565 |
Total "Somewhat Satisfied" Votes | 93 |
Total "Not Satisfied" Votes | 31 |