{"raw_statement":[{"iden":"statement","content":"Ken Ken is a number puzzle created in 2004 by Tetsuya Miyamoto.\n\nYou're solving Ken Ken puzzles from a puzzle book. Each puzzle is an $n$ by $n$ grid, and you have to fill in all of the spaces in the grid.\n\nThere are also $k$ \"freebie\" spaces, which have already been filled in.\n\nGiven $n$, the size of the grid, figure out how many total spaces you have to fill in. For example, to solve a 4 by 4 puzzle with two freebies, you would have to fill in 14 spaces.\n\nThe first line of input consists of a single positive integer $n$: the size of the puzzle, indicating that the puzzle is an $n$ by $n$ grid.\n\nThe second line of input consists of a single positive integer $k$: the number of freebie spaces in the grid that have already been filled in.\n\nOutput a single integer $k$: the number of spaces in the puzzle that you have to fill in.\n\nIf you like Ken Ken, you should look at the hardest problem in this contest, which asks you to write a program to solve a Ken Ken puzzle.\n\n"},{"iden":"input","content":"The first line of input consists of a single positive integer $n$: the size of the puzzle, indicating that the puzzle is an $n$ by $n$ grid.The second line of input consists of a single positive integer $k$: the number of freebie spaces in the grid that have already been filled in."},{"iden":"output","content":"Output a single integer $k$: the number of spaces in the puzzle that you have to fill in."},{"iden":"examples","content":"Input4\n2\nOutput14\nInput6\n3\nOutput33\n"},{"iden":"note","content":"If you like Ken Ken, you should look at the hardest problem in this contest, which asks you to write a program to solve a Ken Ken puzzle."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the size of the grid (an $ n \\times n $ grid).  \nLet $ k \\in \\mathbb{Z}^+ $ be the number of pre-filled (freebie) spaces.\n\n**Constraints**  \n1. $ n \\geq 1 $  \n2. $ 0 \\leq k \\leq n^2 $\n\n**Objective**  \nCompute the number of spaces to fill in:  \n$$\nn^2 - k\n$$","simple_statement":"You are given an n by n grid for a KenKen puzzle, and k cells are already filled. Calculate how many cells you need to fill.","has_page_source":false}