Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

hungry chef

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 solution 
Python :: python plot arrays from matrix 
Python :: variable in regex python 
Python :: ram clear in python 
Python :: how to import and use keyboard with pygame 
Python :: read part of file pandas 
Python :: multiprocessing pool pass additional arguments 
Python :: change key of dictionary python 
Python :: turn columns into one column as list python 
Python :: df insert 
Python :: random.randint 
Python :: python save variable to file pickle 
Python :: dict keys to list in python 
Python :: how to vonvert 1 d list to 2d list in pytohn 
Python :: regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory 
Python :: pandas check if any of the values in one column exist in another 
Python :: make virtual environment wrapper python 3 
Python :: python find string in list 
Python :: pyaduio 
Python :: how to compare values in dictionary with same key python 
Python :: input function in python 
Python :: append data to column in pan 
Python :: flatten a list 
Python :: groupby where only 
Python :: sort dictionary by key 
Python :: python dict keys to string 
Python :: send serial commands in python 
Python :: python command line start server 
Python :: Get request using python requests-html module 
Python :: how to convert integer to binary string python 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =