AtCoder Beginner Contest 074 - Bichrome Cells

We have an N \times N square grid.
We will paint each square in the grid either black or white.
If we paint exactly A squares white, how many squares will be painted black?

-----Constraints-----
 - 1 \leq N \leq 100
 - 0 \leq A \leq N^2

-----Inputs-----
Input is given from Standard Input in the following format:
N
A

-----Outputs-----
Print the number of squares that will be painted black.

-----Sample Input-----
3
4

-----Sample Output-----
5

There are nine squares in a 3 \times 3 square grid.
Four of them will be painted white, so the remaining five squares will be painted black.

Source: atcoder | Difficulty: EASY


Solutions:
n = int(input())
a = int(input())
print(n * n - a)


(a, b) = (int(input()) for _ in range(2))
print(pow(a, 2) - b)


n = int(input())
m = int(input())
print(n ** 2 - m)


n = int(input())
m = int(input())
print(int(n * n - m))


N = int(input())
A = int(input())
print(N * N - A)


n = int(input())
a = int(input())
answer = n ** 2 - a
print(answer)


N = int(input())
M = int(input())
print(N ** 2 - M)


x = int(input()) ** 2
y = int(input())
print(x - y)


N = int(input())
A = int(input())
print(str(N ** 2 - A))


n = int(input()) ** 2
print(n - int(input()))


N = int(input())
A = int(input())
Y = N ** 2 - A
print(Y)


print('{}'.format(int(input()) ** 2 - int(input())))


print(int(input()) ** 2 - int(input()))


(N, A) = eval('int(input()),' * 2)
print(N * N - A)


(n, a) = map(int, open(0))
print(n * n - a)


def get_colored_cells():
	N = int(input())
	A = int(input())
	print(N ** 2 - A)
get_colored_cells()


N = int(input())
A = int(input())
ans = N ** 2 - A
print(ans)


n = int(input())
k = int(input())
print(n * n - k)


N = int(input())
A = int(input())
answer = N ** 2 - A
print(answer)


N = int(input())
A = int(input())
print(pow(N, 2) - A)


a = int(input())
b = int(input())
print(a * a - b)


a = int(input())
b = int(input())
ans = a * a - b
print(ans)


(x, y) = [int(input()) for i in range(2)]
print(x * x - y)


n = int(input())
a = int(input())
x = n ** 2
print(x - a)


n = int(input())
a = int(input())
y = n * n
x = y - a
print(x)


n = int(input())
a = int(input())
result = n * n - a
print(result)


(n, a) = eval('int(input()),' * 2)
print(n ** 2 - a)


n = [int(input()) for i in range(2)]
print(n[0] ** 2 - n[1])


(n, a) = [int(input()) for i in range(2)]
print(n ** 2 - a)


print(eval(input() + '**2-' + input()))


(n, a) = map(int, open(0).read().split())
print(n * n - a)


N = int(input())
A = int(input())
M = N * N
print(M - A)


n = int(input())
N = n * n
a = int(input())
print(N - a)


N = int(input())
A = int(input())
X = N ** 2 - A
print(X)


N = int(input())
print(N * N - int(input()))


n = int(input())
a = int(input())
ans = n * n - a
print(ans)


(n, a) = [int(input()) for _ in range(2)]
print(n * n - a)


n = int(input())
white = int(input())
black = n ** 2 - white
print(black)


(N, A) = [int(input()) for _ in range(2)]
print(N * N - A)


N = int(input())
A = int(input())
N_all = N * N
print(N_all - A)


n = int(input())
x = int(input())
print(n * n - x)


import math
n = int(input())
a = int(input())
print(n * n - a)


n = int(input())
print(n * n - int(input()))


(N, A) = map(int, open(0))
print(N ** 2 - A)


(a, b) = map(int, open(0))
print(a ** 2 - b)


N = int(input())
A = int(input())
N *= N
B = N - A
print(B)


n = int(input())
s = int(input())
print(n ** 2 - s)


n = int(input())
a = int(input())
pixel = n ** 2
print(pixel - a)


a = int(input()) ** 2
print(a - int(input()))


(a, b) = [int(input()) for i in range(2)]
print(a * a - b)


(N, A) = map(int, [input(), input()])
print(N ** 2 - A)


n = int(input())
s = n * n
x = int(input())
s = s - x
print(s)


n = int(input())
a = int(input())
n1 = n * n
b = n1 - a
print(b)


n = [int(input()) for _ in range(2)]
print(n[0] ** 2 - n[1])


(N, A) = [int(input()) for i in range(2)]
print(pow(N, 2) - A)


S_list = [int(input()) for i in range(2)]
print(S_list[0] ** 2 - S_list[1])


(n, a) = [int(input()) for s in range(2)]
print(n * n - a)


N = int(input())
A = int(input())
re = N * N - A
print(re)


n = int(input())
a = int(input())
print(pow(n, 2) - a)


N = int(input())
A = int(input())
Black_area = N ** 2 - A
print(Black_area)


n = int(input())
a = int(input())
if n ** 2 - a < 0:
	print(0)
else:
	print(n ** 2 - a)


a = int(input())
print(a * a - int(input()))


n = int(input())
a = int(input())
print(int(n ** 2.0 - a))


N = int(input())
A = int(input())
print(max(0, N ** 2 - A))


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 = '3\n4'
		output = '5'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '19\n100'
		output = '261'
		self.assertIO(input, output)

	def test_入力例_3(self):
		input = '10\n0'
		output = '100'
		self.assertIO(input, output)

def resolve():
	N = int(input())
	A = int(input())
	print(N * N - A)

def __starting_point():
	resolve()
__starting_point()


i = int(input())
s = int(input())
print(i * i - s)


a = int(input())
b = int(input())
print(a ** 2 - b)


def main():
	n = int(input())
	a = int(input())
	print(n * n - a)

def __starting_point():
	main()
__starting_point()


n = int(input())
k = int(input())
print(n ** 2 - k)


N = int(input().strip())
A = int(input().strip())
print(N * N - A)


a = input()
b = input()
A = int(a)
B = int(b)
c = A ** 2 - B
print(c)


n = int(input())
a = int(input())
print(abs(n ** 2 - a))


(N, A) = (int(input()) for T in range(0, 2))
print(N ** 2 - A)


N = int(input())
A = int(input())
Total = N ** 2
Black = Total - A
print(Black)


N = int(input())
A = int(input())
t = N ** 2 - A
print(t)


A = int(input())
B = int(input())
print(A ** 2 - B)


N = int(input())
A = int(input())
r = N * N - A
print(r)


N = int(input())
A = int(input())
s = N * N - A
print(str(s))


N = int(input())
A = int(input())
ans = 0
ans = N * N - A
print(ans)


print(pow(int(input()), 2) - int(input()))


N = int(input())
a = int(input())
print(N * N - a)


(a, b) = [int(input()) for n in range(2)]
print(a * a - b)


N = int(input())
A = int(input())
RE = N * N - A
print(RE)


n = int(input())
s = int(input())
print(n * n - s)


n = int(input())
A = int(input())
print(n ** 2 - A)


n = input()
a = input()
j = int(n) * int(n) - int(a)
print(j)


n = int(input())
a = int(input())
t = n ** 2 - a
print(t)


n = int(input())
w = int(input())
print(n ** 2 - w)


N = int(input())
A = int(input())
sum = N * N
if (1 <= N and N <= 100) and (0 <= A and A <= N ** N):
	print(sum - A)


n = int(input())
A = int(input())
print(n * n - A)


with open(0) as f:
	(n, a) = map(int, f.read().split())
print(n ** 2 - a)


n = int(input())
paint = int(input())
print(n ** 2 - paint)


def iroha():
	a = [int(input()) for i in range(2)]
	print(a[0] * a[0] - a[1])

def __starting_point():
	iroha()
__starting_point()


N = int(input())
K = int(input())
print(N ** 2 - K)


N = int(input())
A = int(input())
masunum = N * N
print(masunum - A)


a = open(0).read().split()
print(int(a[0]) ** 2 - int(a[1]))


i1 = int(input())
i2 = int(input())
print(i1 ** 2 - i2)


(N, A) = map(int, open(0).read().split())
print(N ** 2 - A)


N = int(input())
print(N ** 2 - int(input()))


N = int(input())
x = int(input())
print(N * N - x)


n = int(input())
b = int(input())
print(n * n - b)


def main():
	(n, a) = (int(input()) for _ in range(2))
	print(n ** 2 - a)
main()


a = int(input())
b = int(input())
s = a * a
tp = s - b
print(tp)


n = input()
x = int(input())
m = int(n) * int(n)
print(m - x)


N = int(input())
M = int(input())
print(N * N - M)


A = int(input())
B = int(input())
print(A * A - B)


N = int(input())
A = int(input())
i = N * N
result = i - A
print(result)


a = [int(input()) for i in range(2)]
print(a[0] ** 2 - a[1])


N = int(input())
a = int(input())
print(N ** 2 - a)


N = int(input())
w = int(input())
print(N ** 2 - w)


n = int(input())
a = int(input())
i = n * n
print(i - a)


x = int(input())
y = int(input())
print(x * x - y)


import math
N = int(input())
A = int(input())
print(N * N - A)