Baby Step, Giant Step

  • + 1 comment

    Can anyone tell what's wrong with my code ?

    include

    include

    include

    include

    include

    using namespace std;

    long long a,b,d,ans; int main() { int t; cin >> t; while(t--) { ans =0; cin >> a >> b >> d; if(d>0) { if(d==min(a,b)||d==max(a,b)) {cout<<"1\n";continue;} ans = d/max(a,b); if(d%max(a,b)==min(a,b)) { ans++; } else if(d%max(a,b)!=0) ans+=2; } cout< return 0; }