5 kyu
Diophantine Equation
118 of 4,837g964
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 | 31723 |
Total Skips | 12378 |
Total Code Submissions | 49149 |
Total Times Completed | 4837 |
Ruby Completions | 118 |
Python Completions | 1605 |
Clojure Completions | 22 |
Java Completions | 526 |
C# Completions | 241 |
Haskell Completions | 111 |
JavaScript Completions | 697 |
CoffeeScript Completions | 11 |
TypeScript Completions | 138 |
C++ Completions | 435 |
Elixir Completions | 44 |
PHP Completions | 103 |
Crystal Completions | 5 |
F# Completions | 26 |
C Completions | 188 |
Rust Completions | 176 |
Swift Completions | 80 |
Go Completions | 179 |
Shell Completions | 10 |
OCaml Completions | 18 |
Kotlin Completions | 102 |
Fortran Completions | 8 |
Julia Completions | 24 |
Scala Completions | 61 |
R Completions | 32 |
PowerShell Completions | 13 |
Nim Completions | 8 |
Racket Completions | 15 |
Reason Completions | 3 |
Prolog Completions | 10 |
Dart Completions | 77 |
Pascal Completions | 4 |
Factor Completions | 7 |
Raku Completions | 4 |
Lua Completions | 32 |
Perl Completions | 8 |
Elm Completions | 4 |
D Completions | 5 |
COBOL Completions | 5 |
Erlang Completions | 5 |
Total Stars | 863 |
% of votes with a positive feedback rating | 89% of 688 |
Total "Very Satisfied" Votes | 565 |
Total "Somewhat Satisfied" Votes | 92 |
Total "Not Satisfied" Votes | 31 |