1 条题解

  • 6
    @ 2024-12-19 19:27:24
    #include<bits/stdc++.h>
    using namespace std;
    #define int long long
    const int M=1e16+10;
     int a,b,c;
     int axx(int mad)
     {
     	int x=0,y=mad*60,ss=0;
     	while(y>=80)
     	{
    	 int t=y/80;
    	 y%=80;
    	 x=x+t;
    	 ss=ss+t;
    	 y=y+((int)(ss/a))*b;
    	 ss%=a;
    	}
     	if(x<=c)return 0;
     	return 1;
     }
    signed main()
    {
      int t;
      cin>>t;
      while(t--)
      {
       cin>>a>>b>>c;
       int l=0,r=M;
       while(l<r)
       {
       	int mad=(l+r)/2;
       	if(axx(mad))r=mad;
       	else l=mad+1;
       }
       cout<<l<<'\n';
      }
    }
    

    信息

    ID
    1102
    时间
    1000ms
    内存
    256MiB
    难度
    9
    标签
    (无)
    递交数
    209
    已通过
    22
    上传者