wojiaocbj

Untitled

May 20th, 2022
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. typedef long long LL;
  2. LL recur(LL x,LL y){
  3.     if(x == 0 || y == 0){
  4.         return 0;
  5.     }
  6.     else{
  7.         if(x > y){
  8.             return recur(y,x);
  9.         }
  10.         else{
  11.             return 4 * x * (y / x) + recur(x,y % x);
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment