Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Sudan-function/Java/sudan-function.java
Normal file
20
Task/Sudan-function/Java/sudan-function.java
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//Aamrun, 11th July 2022
|
||||
|
||||
public class Main {
|
||||
|
||||
private static int F(int n,int x,int y) {
|
||||
if (n == 0) {
|
||||
return x + y;
|
||||
}
|
||||
|
||||
else if (y == 0) {
|
||||
return x;
|
||||
}
|
||||
|
||||
return F(n - 1, F(n, x, y - 1), F(n, x, y - 1) + y);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("F(1,3,3) = " + F(1,3,3));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue