Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- }
- static long fib1(int n)
- {
- double phi = (Math.sqrt(5)+1)/2; // ~1.618 - tzw. Golden Ratio
- return (int)Math.round(Math.pow(phi, n) / Math.sqrt(5)); //Wzrór Bineta
- }
- static long fib2(int n)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement