$A$:

nt题,不说了。

Codeforces Global Round 8
#include<bits/stdc++.h>
#define maxn 200005
#define maxm 500005
#define inf 0x7fffffff
#define ll long long
#define rint register ll
#define debug(x) cerr<<#x<<": "<<x<<endl
#define fgx cerr<<"--------------"<<endl
#define dgx cerr<<"=============="<<endl
 
using namespace std;
 
inline ll read(){
    ll x=0,f=1; char c=getchar();
    for(;!isdigit(c);c=getchar()) if(c=='-') f=-1;
    for(;isdigit(c);c=getchar()) x=x*10+c-'0';
    return x*f;
}
 
int main(){
    ll T=read();
    while(T--){
        ll a=read(),b=read(),n=read(),ans=0;
        while(1){
            if(a<b) swap(a,b);
            if(a>n) break;
            b+=a,ans++;
        }
        printf("%lld\n",ans);
    }
    return 0;
}
A

相关文章:

  • 2022-01-13
  • 2021-08-27
猜你喜欢
  • 2021-06-12
  • 2021-07-04
  • 2021-08-21
  • 2021-10-17
相关资源
相似解决方案