Help me in solving SUGARCANE problem

My issue

what is problem of my code

My code

#include <stdio.h>
int main() {int t,n,total,p,q;
scanf("%d",&t);
while(t--){
    scanf("%d",&n);
     total=n*50;
     p=((70*total)/100);
    q=total-p;
    printf("%d\n",q);
}}


Learning course: 500 to 1000 difficulty problems
Problem Link: Sugarcane Juice Business Practice Problem in - CodeChef

@sobujchandra
plzz refer the following solution for better understanding

#include <stdio.h>

int main(void) {
	int n,a,c;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
	    scanf("%d",&a);
	    printf("%d\n",(a*15));
	}
}

@sobujchandra
Check This
My Solution

# cook your dish here
for i in range(int(input())):
    a=int(input())
    p=a*50
    x=(p*.20)+(p*.20)+(p*.30)
    y=p-x
    print(int(y))