Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Sudan-function/JavaScript/sudan-function.js
Normal file
17
Task/Sudan-function/JavaScript/sudan-function.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @param {bigint} n
|
||||
* @param {bigint} x
|
||||
* @param {bigint} y
|
||||
* @returns {bigint}
|
||||
*/
|
||||
function F(n, x, y) {
|
||||
if (n === 0) {
|
||||
return x + y;
|
||||
}
|
||||
|
||||
if (y === 0) {
|
||||
return x;
|
||||
}
|
||||
|
||||
return F(n - 1, F(n, x, y - 1), F(n, x, y - 1) + y);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue