AtCoder Beginner Contest 072 - Sandglass2

We have a sandglass that runs for X seconds. The sand drops from the upper bulb at a rate of 1 gram per second. That is, the upper bulb initially contains X grams of sand.
How many grams of sand will the upper bulb contains after t seconds?

-----Constraints-----
 - 1≤X≤10^9
 - 1≤t≤10^9
 - X and t are integers.

-----Input-----
The input is given from Standard Input in the following format:
X t

-----Output-----
Print the number of sand in the upper bulb after t second.

-----Sample Input-----
100 17

-----Sample Output-----
83

17 out of the initial 100 grams of sand will be consumed, resulting in 83 grams.

Source: atcoder | Difficulty: EASY


Solutions:
(x, t) = map(int, input().split())
print(max(x - t, 0))


(x, t) = map(int, input().split())
print(0 if t >= x else x - t)


(X, t) = [int(x) for x in input().split()]
print(max(0, X - t))


print(max(eval(input().replace(' ', '-')), 0))


(X, T) = map(int, input().split())
print(max(X - T, 0))


(X, t) = map(int, input().split())
print(max([0, X - t]))


(X, t) = map(int, input().split())
print(X - t if t < X else 0)


(n, m) = map(int, input().split())
print(max(n - m, 0))


(a, b) = map(int, input().split())
x = max(a - b, 0)
print(x)


(a, b) = list(map(int, input().split()))
print(max([a - b, 0]))


(n, t) = map(int, input().split())
print(max(0, n - t))


(a, b) = map(int, input().split())
print(a - b if a - b > 0 else 0)


(x, t) = map(int, input().split())
f = lambda x: x if x > 0 else 0
print(f(x - t))


(X, Time) = (int(T) for T in input().split())
print(max(X - Time, 0))


(X, t) = [int(_) for _ in input().split()]
print(max(X - t, 0))


(x, t) = [int(v) for v in input().split()]
print(max(0, x - t))


(A, B) = list(map(int, input().split()))
print(A - B if A - B > 0 else 0)


(X, t) = [int(n) for n in input().split()]
print(max(0, X - t))


(x, t) = map(int, input().split())
print(x - min(x, t))


(X, T) = [int(s) for s in input().split()]
print(max([X - T, 0]))


(x, t) = map(int, input().split())
a = x - t
if a < 0:
	a = 0
print(a)


(A, B) = [int(x) for x in input().split()]
print(max(A - B, 0))


lst = input().split()
d = int(lst[0]) - int(lst[1])
if 0 <= d:
	print(d)
else:
	print(0)


(a, b) = map(int, input().split())
print((a - b, 0)[a < b])


(s, t) = map(int, input().split())
print(max(s - t, 0))


(x, t) = map(int, input().split())
print('0' * (x < t) or x - t)


(X, x) = list(map(int, input().split()))
if X - x < 0:
	print(0)
else:
	print(X - x)


(X, t) = list(map(int, input().split()))
result = X - t
if result < 0:
	result = 0
print(result)


(a, b) = (int(x) for x in input().split())
print(max(0, a - b))


(x, t) = [int(i) for i in input().split()]
print(max(x - t, 0))


(x, t) = list(map(int, input().split()))

def answer(x: int, t: int) -> int:
	if x > t:
		return x - t
	else:
		return 0
print(answer(x, t))


(a, b) = (int(i) for i in input().split())
print(max(a - b, 0))


(x, y) = map(int, input().split())
print(max([x - y, 0]))


(x, t) = map(int, input().split())
answer = x - t
if answer <= -1:
	print(0)
else:
	print(answer)


(b, c) = map(int, input().split())
print(max(b - c, 0))


(x, t) = [int(i) for i in input().split()]
print(x - t if x >= t else 0)


def LI():
	return list(map(int, input().split()))
(X, t) = LI()
ans = max(X - t, 0)
print(ans)


from math import gcd
from itertools import combinations, permutations, accumulate, product
from collections import deque, defaultdict, Counter
import decimal
import re
import math
import bisect
import heapq
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7
INF = float('inf')
from sys import stdin
readline = stdin.readline

def readInts():
	return list(map(int, readline().split()))

def readTuples():
	return tuple(map(int, readline().split()))

def I():
	return int(readline())
(X, t) = readInts()
print(0 if X <= t else X - t)


import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):

	def assertIO(self, input, output):
		(stdout, stdin) = (sys.stdout, sys.stdin)
		(sys.stdout, sys.stdin) = (StringIO(), StringIO(input))
		resolve()
		sys.stdout.seek(0)
		out = sys.stdout.read()[:-1]
		(sys.stdout, sys.stdin) = (stdout, stdin)
		self.assertEqual(out, output)

	def test_入力例_1(self):
		input = '100 17'
		output = '83'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '48 58'
		output = '0'
		self.assertIO(input, output)

	def test_入力例_3(self):
		input = '1000000000 1000000000'
		output = '0'
		self.assertIO(input, output)

def resolve():
	(X, t) = list(map(int, input().split()))
	print(max(X - t, 0))

def __starting_point():
	resolve()
__starting_point()


Xt = list(map(int, input().split()))
print(max(Xt[0] - Xt[1], 0))


S = list(map(int, input().split()))
print(max(0, S[0] - S[1]))


(s, t) = [int(a) for a in input().split()]
print(max(0, s - t))


x = [int(x) for x in input().split()]
print(max(0, x[0] - x[1]))


import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7

def resolve():
	(x, t) = list(map(int, input().split()))
	print(max(0, x - t))

def __starting_point():
	resolve()
__starting_point()


def iroha():
	(x, t) = list(map(int, input().split()))
	print(0 if t >= x else x - t)

def __starting_point():
	iroha()
__starting_point()


(A, t) = [int(x) for x in input().split()]
print(max(A - t, 0))


(s, t) = map(int, input().split())
ans = s - t
if ans < 0:
	print(0)
else:
	print(ans)


(x, y) = map(int, input().split())
print(x - y if x - y >= 0 else 0)


A = list(map(int, input().split()))
print(max(0, A[0] - A[1]))


(X, t) = [int(i) for i in input().split()]
print(max(X - t, 0))


a = list(map(int, input().split()))
print(max(a[0] - a[1], 0))


(a, b) = input().split()
(a, b) = (int(a), int(b))
print(max(0, a - b))


(A, B) = map(int, input().split())
print(max(A - B, 0))


(X, t) = map(int, input().split())
ans = X - min(X, t)
print(ans)


def main():
	(X, t) = list(map(int, input().split()))
	tmp = X - t
	if tmp < 0:
		return 0
	else:
		return tmp
print(main())


import sys
(X, t) = map(int, sys.stdin.readline().split())
print(max(0, X - t))


(x, t) = list(map(int, input().split()))
result = 0
if x > t:
	result = x - t
else:
	result = 0
print(result)


(a, t) = map(int, input().split())
print(max(0, a - t))


a = int(eval(input().replace(' ', '-')))
print(a if a > 0 else 0)


(X, t) = map(int, input().split())
print((X - t) * (X > t))


(x, y) = [int(s) for s in input().split()]
print(max([x - y, 0]))


from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, fractions
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
(x, t) = inpl()
print(max(x - t, 0))


(x, y) = (int(i) for i in input().split())
print(max(0, x - y))


(x, a) = map(int, input().split())
print(x - a if x >= a else 0)


(X, t) = map(int, input().split())
r = max(0, X - 1 * t)
print(r)


(X, t) = map(int, input().split())
if (1 <= X and X <= 10 ** 9) and (1 <= t and t <= 10 ** 9):
	if X <= t:
		print(0)
	else:
		print(X - t)


(x, t) = [int(m) for m in input().split(' ')]
print(max(0, x - t))


(x, t) = map(int, input().split())
p = x - t
if x - t < 0:
	p = 0
print(p)


(x, t) = [int(s) for s in input().split()]
print(max(x - t, 0))


(a, t) = map(int, input().split())
print(a - t if a - t > 0 else '0')


(x, t) = [int(_) for _ in input().split()]
print(max(x - t, 0))


x = list(map(int, input().split()))
print(max(x[0] - x[1], 0))