Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

BURGERS2

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 generate set of random numbers 
Python :: how to take two space separated int in python 
Python :: sentence transformers 
Python :: serialize keras model 
Python :: numpy sqrt 
Python :: django cleanup settings 
Python :: how to get user input python 
Python :: how to open folder in python 
Python :: split and only grab first part of string 
Python :: how to combine strings python 
Python :: how to merge two dictionaries with same keys in python 
Python :: pandas apply check for string length in column 
Python :: sqlite operational error no such column 
Python :: hugingface ner 
Python :: python to make video 
Python :: delete outliers in pandas 
Python :: string acharacters count in python without using len 
Python :: pandas add thousands separator 
Python :: 2d array in python 
Python :: How to install packages offline? Ask Question 
Python :: map python 3 
Python :: get file parent directory python 
Python :: max of a list python 
Python :: read ms word with python 
Python :: python line break inside string 
Python :: python get last element of array 
Python :: tkinter include svg in script 
Python :: how to install httplib in python 
Python :: how to define functions in python 
Python :: how to define a class in python 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =