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 :: BURGERS2 
Python :: format column from string to numeric in python 
Python :: reshape python 
Python :: csv to python dictionary 
Python :: pygame.events 
Python :: python open directory and read files 
Python :: ipaddress in python 
Python :: floating point python 
Python :: add values of two columns pandas 
Python :: keep tkinter window below others 
Python :: python dataframe replace in all dataframe 
Python :: functools reduce python 
Python :: sum along axis python 
Python :: python csv reader cast to float 
Python :: hover show all Y values in Bokeh 
Python :: getsizeof python 
Python :: vscode python workding directory 
Python :: Python round to only two decimal 
Python :: win64pyinstaller 
Python :: filter foreign fileds django_filters 
Python :: python turn off garbage collection 
Python :: how to remove time in datetime in python 
Python :: scrapy shell 
Python :: how to get all index of a char of a string in python 
Python :: how to use dictionary in python 
Python :: run multiple test cases pytest 
Python :: python string remove whitespace 
Python :: autopytoexe 
Python :: how to plot kmeans centroids 
Python :: what is django 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =