Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. public class Main {
  2.     public static void main(String[] args) {
  3.  
  4.     }
  5.  
  6.     static long fib1(int n)
  7.     {
  8.         double phi = (Math.sqrt(5)+1)/2; // ~1.618 - tzw. Golden Ratio
  9.         return (int)Math.round(Math.pow(phi, n) / Math.sqrt(5)); //Wzrór Bineta
  10.     }
  11.  
  12.     static long fib2(int n)
  13.     {
  14.  
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement