Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

BURGERS2 codechef 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 :: how to make python into exe 
Python :: chatbot using python github 
Python :: python primes 
Python :: create django project 
Python :: append to set python 
Python :: how to declare np datetime 
Python :: all the symbols on a keyboard python list 
Python :: get array dimension numpy 
Python :: opencv black white image 
Python :: python new date 
Python :: combine dictionaries, values to list 
Python :: pickle example 
Python :: vscode python multiline comment 
Python :: python urlparse get domain 
Python :: double quotes in python dictionary 
Python :: how to get wikipedia photos using wikipedia module ip python 
Python :: python dict sortieren 
Python :: np ln 
Python :: r named chr to dataframe 
Python :: python fibonacci function 
Python :: python sleep 
Python :: python elapsed time in milliseconds 
Python :: python input string 
Python :: convert string to float python 
Python :: python list of dictionaries 
Python :: python if condition 
Python :: sum of prime numbers python 
Python :: convex hull python 
Python :: pyspark add_months 
Python :: python chat 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =