Help me in solving GYMDAY problem

My issue

I dont know neither do i understand whats going wrong in my approach

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

int main()
{
// your code goes here
int tc;
cin>>tc;
while(tc–)
{
int d,x,y;
cin>>d;
cin>>x;
cin>>y;
int ct=0;
while(x>y && x>0 && y>0)
{
ct++;
y–;
x=x-((xctd)/100);
}
if(x>y)
cout<<“-1”<<endl;
else
cout<<ct<<endl;
}
}
Can someone kindly help me out

My code

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

int main()
{
	// your code goes here
	int tc;
	cin>>tc;
	while(tc--)
	{
	    int d,x,y;
	    cin>>d;
	    cin>>x;
	    cin>>y;
	    int ct=0;
	    while(x>y && x>0 && y>0)
	    {
	        ct++;
	        y--;
	        x=x-((x*ct*d)/100);
	    }
	    if(x>y)
	    cout<<"-1"<<endl;
	    else
	    cout<<ct<<endl;
	}
}

Problem Link: International Gym Day Practice Coding Problem

discount will be from overall not from leftover
if discount is 10 % and price =100
you are doing {
after one operation price=90;
after second operation price=81;
}
actual{
after one operation price=90;
after second operation price=80;
}

ya thanks

No problem