PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: notsoloud
Tester: abhidot
Editorialist: iceknight1093
DIFFICULTY:
305
PREREQUISITES:
None
PROBLEM:
Chef earned X rupees and Chefina earned Y rupees. It is known that X \lt Y.
The difference between their incomes is donated to charity. How much is donated?
EXPLANATION:
The difference between their incomes is exactly Y - X, and hence this is the answer.
TIME COMPLEXITY
\mathcal{O}(1) per test case.
CODE:
Editorialist's code (Python)
for _ in range(int(input())):
x, y = map(int, input().split())
print(y - x)