Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

hungry chef codechef

for _ in range(int(input())):
    x,y,n,r = map(int,input().split())
    if r//y >= n:
        print(0,n)
    elif r//x < n:
        print(-1)
    else:
        c = (r-(y*n))//(x-y)
        if ((r-(y*n))%(x-y)) != 0:
            c += 1
        print(c,n-c)
Comment

PREVIOUS NEXT
Code Example
Python :: python plot arrays from matrix 
Python :: how to get size of list in python 
Python :: python function with two parameters 
Python :: np.eye 
Python :: parallel loops in python 
Python :: numpy timedelta object has no attribute days 
Python :: ForeignKey on delete django 
Python :: is python object oriented language 
Python :: print string elements in list python 
Python :: python append list 
Python :: how to get what type of file a file is in python 
Python :: rename keys in dictionary python 
Python :: python plot label value 
Python :: django orm group by month and year 
Python :: python anonymous function 
Python :: how to get the index of the first integer in a string python 
Python :: Using a list with index and column names to Convert List to Dataframe 
Python :: how to add space in st.write streamlit 
Python :: arrayfield django example 
Python :: how to install package offline 
Python :: A Python Class Constructor 
Python :: numpy savetxt list of strings 
Python :: postgresql backup using python 
Python :: train dev test split sklearn 
Python :: how to rename columns in pandas dataframe 
Python :: torch tensor to pandas dataframe 
Python :: matplotlib remove duplicate legend entries from plotting loop 
Python :: use proxy to connect smtp python 
Python :: Replace all the empty rows in the column with the value that you have identified 
Python :: how to take a column from dataset in python 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =