The egg roll is certainly Calcutta’s most recognizable and popular street food. But what makes a good roll? It should be served hot. So the assembly process, once the paratha has been fried, needs to be quick and efficient. The outer shell, the paratha itself, must be flaky yet soft…


Solution in Python:

for _ in range(int(input())):
D,d,P,Q = map(int,input().split())
s=0
n=D//d
s=((P*n) + (Q*(n-1)*n)//2)*d
if(D%d!=0):
s=s+(D%d)*(P+n*Q)
print(s)

Input :-

1

5 2 1 2

Output :-

13


Director: Alexandre Aja

Language: French

Alexandre Aja made a very different kind of confined spaces thriller “Oxygen” premiered May 12 on Netflix.

It’s almost as if the French filmmaker Alexandre Aja knew what the situation in India would be like during the second wave of COVID-19. His latest film revolves…

Subhadip Nandy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store