Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

BURGERS2 solution

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 :: format column from string to numeric in python 
Python :: size array python 
Python :: virtual environments for python 
Python :: how to change character in string python 
Python :: .split python 
Python :: get the list of column names whose data type is float python 
Python :: stutter function in python 
Python :: create file in a specific directory python 
Python :: flask url_for 
Python :: discord.py clear status 
Python :: plt.hist using bins 
Python :: python string to list new line 
Python :: how to get the last value in a list python 
Python :: numpy array serialize to string 
Python :: install poetry on linux 
Python :: pandas description of dataframe renaming column values 
Python :: SyntaxError: positional argument follows keyword argument 
Python :: closedxml hide column 
Python :: what does % do in python 
Python :: pip offline package install 
Python :: python remove duplicates from list of dict 
Python :: python time limit for input 
Python :: return max value in list python 
Python :: how to count specific element in a list python 
Python :: pip --version 
Python :: python discord embed link 
Python :: tkinter canvas text size 
Python :: creating a bar plot bar | creating a bar chart 
Python :: calculer un temps en python 
Python :: pygame examples 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =