想问下我这个代码错在哪啊,自测都过了

#include <bits/stdc .h>
using namespace std;

int main(){
int T;
scanf("%d",&T);
int m,a1,h1,a2,b2,h2,c1,c2,c;
while(T--){
scanf("%d",&m);
scanf("%d%d",&a1,&h1);
scanf("%d%d%d",&a2,&b2,&h2);
scanf("%d%d%d",&c1,&c2,&c);
int ans=0;
if(m>c){
if((m-c)/c2 b2>=a1) ans=h1;
else{
for(int i=b2;i<a1;i ){
if(m-c-(i-b2)*c2>0){
int a = m - c - (i - b2)*c2;
a=a2 a/c1;
int t=h2/(a1-b2);
if(h2%(a1-b2)) t ;
ans=max(min(h1,t*a),ans);
}
else break;
}
}
}
printf("%d\n",ans);
}
}