jakaria_hossain

codeforces - c+=

Jun 19th, 2020
1,228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
  5. int main()
  6. {
  7.     fast()
  8.     ll t ;
  9.     cin>>t;
  10.     while(t--)
  11.     {
  12.         ll ara[2],k,cnt=0;
  13.         cin>>ara[0]>>ara[1]>>k;
  14.         sort(ara,ara+2);
  15.         while(ara[1]<=k)
  16.         {
  17.             cnt++;
  18.             ara[0]+=ara[1];
  19.             sort(ara,ara+2);
  20.         }
  21.         cout<<cnt<<endl;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment