pranjal1805

template

May 27th, 2021
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <fstream>
  3. using namespace std;
  4. typedef long long ll;
  5. typedef long double ld;
  6. #define MOD 1000000007
  7. #define endl "\n";
  8. #define pi 3.14159265
  9. int add(int x, int y){return x+y;}
  10. int gcd(int a, int b)
  11. {
  12.     // Everything divides 0
  13.     if (a == 0)
  14.        return b;
  15.     if (b == 0)
  16.        return a;
  17.  
  18.     // base case
  19.     if (a == b)
  20.         return a;
  21.  
  22.     // a is greater
  23.     if (a > b)
  24.         return gcd(a-b, b);
  25.     return gcd(a, b-a);
  26. }
  27. int main()
  28. {
  29.     ios::sync_with_stdio(false);
  30.     cin.tie(0);
  31.    
  32.     ll t;
  33.     cin>>t;
  34.  
  35.     while(t--)
  36.  {
  37.     //code here
  38.  }
  39.     return 0;  
  40. }
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment