Problem:


Score : 100 points

Problem Statement

Given an integer a as input, print the value a + a^2 + a^3.

Constraints

1 \leq a \leq 10

a is an integer.

Input

Input is given from Standard Input in the following format:

a

Output

Print the value a + a^2 + a^3 as an integer.

Sample Input 1

2

Sample Output 1

14

When a = 2, we have a + a^2 + a^3 = 2 + 2^2 + 2^3 = 2 + 4 + 8 = 14.

Print the answer as an input. Outputs such as 14.0 will be judged as incorrect.

Sample Input 2

10

Sample Output 2

1110



Sample input:
2


Sample output:
14

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def get_input() -> int:
    """
    標準入力を取得.

    Returns:\n
        int: 標準入力
    """
    a = int(input())

    return a


def main(a: int) -> None:
    """
    メイン処理.

    Args:\n
        a (int): 整数（1 <= a <= 10）
    """
    # 求解処理
    ans = a + a**2 + a**3

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    a = get_input()

    # メイン処理
    main(a)

Submission status: Accepted

Solution code:
a = int(input())
ans = a**3 + a**2 + a
print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce, lru_cache  # @lru_cache(None)
from fractions import gcd
import sys  # def input(): return sys.stdin.readline().rstrip() # sys.setrecursionlimit(10**6)

a = int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())

ans = a + a * a + a * a * a
print(ans)

Submission status: Accepted

Solution code:
#abc172a
a=int(input())
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print(n+n**2+n**3)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))


INF = float("inf")
MOD = 10**9 + 7


def main():
    a = INT()
    print(a + a**2 + a**3)

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
print(int(n+n**2+n**3))

Submission status: Accepted

Solution code:
a = int(input())

print(a+pow(a,2)+pow(a,3))

Submission status: Accepted

Solution code:
a=int(input())

print(a+a*a+a**3)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))

def main():
    sys.setrecursionlimit(10**8)
    INF = float("inf")

    a = INT()
    print(a + a**2 + a**3)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def input():
    return sys.stdin.readline().strip()


def INT():
    return int(input())


def MAP():
    return map(int, input().split())


def LIST():
    return list(map(int, input().split()))


def ZIP(n):
    return zip(*(MAP() for _ in range(n)))


def main():
    a = INT()
    print(a+a**2+a**3)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans = 0

for i in range(1,4):
  ans += n**i
else:
  print(ans)

Submission status: Accepted

Solution code:
a=int(input())
print(a*(1+a*(1+a)))

Submission status: Accepted

Solution code:
from sys import stdin
a = int(stdin.readline().rstrip())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
def main():
    a = int(input())

    print(a + (a ** 2) + (a ** 3))
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
t=int(input())
print(t+(t**2)+(t**3))

Submission status: Accepted

Solution code:
# A - Calc
def main():
    A = int(input())
    print(A + A ** 2 + A ** 3)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import math
import collections

def set_debug(debug_mode=False):
    if debug_mode:
        fin = open('input.txt', 'r')
        sys.stdin = fin


def int_split_input():
    return list(map(int, input().split()))


if __name__ == '__main__':
    # set_debug(True)

    # t = int(input())
    t = 1

    for ti in range(1, t + 1):
        n = int(input())
        print(n + n * n + n * n * n)

Submission status: Accepted

Solution code:
def solve():
    a = int(input())
    print(a+a**2+a**3)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def II(): return int(input())
def MII(): return map(int, input().split())
def LII(): return list(map(int, input().split()))

def main():
    a = II()
    print(a + a**2 + a**3)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a= int(input())
eq= a+(a**2)+(a**3)
print(eq)

Submission status: Accepted

Solution code:
a = int(input())
r = a + a ** 2 + a ** 3
print(r)

Submission status: Accepted

Solution code:
a = int(input())
print(pow(a,3)+pow(a,2)+a)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


a = I()
print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a = int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())
ans = a**3 + a**2 + a
print(int(ans))

Submission status: Accepted

Solution code:
import math
a=int(input())
print(round((a*(a-(-1+math.sqrt(3)*(1j))/2)*(a-(-1-math.sqrt(3)*(1j))/2)).real))

Submission status: Accepted

Solution code:
a = int(input())
print(int(a+(a**2)+(a**3)))

Submission status: Accepted

Solution code:
num = int(input())
print(int(num + num**2 + num**3))

Submission status: Accepted

Solution code:
# Author: S Mahesh Raju
# Username: maheshraju2020
# Date: 27/06/2020

from sys import stdin,stdout
from math import gcd, ceil, sqrt
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

a = ii1()
print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
a = int(input())
res = a*(1+a*(1+a))
print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int):
    print(a+a*a+a*a*a)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    solve(a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a = I()
print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(a: int):
    ret = a + a ** 2 + a ** 3
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    solve(a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
#a = [int(z) for z in input().split()]
print(n+n**2 + n**3)

Submission status: Accepted

Solution code:
a = int(input())
if a == 1:
  print(3)
elif a == 2:
  print(14)
elif a == 3:
  print(39)
elif a == 4:
  print(84)
elif a == 5:
  print(155)
elif a == 6:
  print(258)
elif a == 7:
  print(399)
elif a == 8:
  print(584)
elif a == 9:
  print(819)
elif a == 10:
  print(1110)

Submission status: Accepted

Solution code:
a = int(input())
print(a+a**2 + a**3)

Submission status: Accepted

Solution code:
print((lambda x:x+x*x+x*x*x)(x:=int(input())))

Submission status: Accepted

Solution code:
A = int(input())
print(A+(A**2)+(A**3))

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    ret = a
    ret += a * a
    ret += a * a * a
    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
r = a+a**2+a**3
print(r)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    a = int(rl())
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
INF = 10**18


if __name__ == "__main__":
    a = int(input())
    print(a+a**2+a**3)

Submission status: Accepted

Solution code:
def main():
    import sys
    input=sys.stdin.readline
    a=int(input())
    print(a+a**2+a**3)       
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache

#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b: a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
a = I()
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
print((lambda x:x+x*x+x*x*x)(int(input())))

Submission status: Accepted

Solution code:
import sys

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


def resolve():
    a = int(input())
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
a = int(input())
print(a + a*a + a**3)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# input
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a = int(input())
print(a + a * a + a * a * a)

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())

a = I()

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
N = int(input())


ans = 0
for i in range(1, 4):
  ans += N**i
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce
from math import gcd


def lcm(a, b):
    # 最小公倍数
    g = gcd(a, b)
    return a // g * b


a = a_int()
print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
a = int(input())
sum = a*(1+a*(1+a))
print(sum)

Submission status: Accepted

Solution code:
a=int(input())
b=a**2
c=a**3
print(a+b+c)

Submission status: Accepted

Solution code:
x = int(input())

a = x + x*x + x*x*x
print(a)

Submission status: Accepted

Solution code:
a = int(input())

n = a + a*a + a*a*a

print(n)

Submission status: Accepted

Solution code:
a = input()
a = int(a)
  
print( a + a**2 + a**3)

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a = ii()

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a=input()
a=int(a)
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
suu = int(input())

ans = suu+ suu**2+suu**3
print(ans)

Submission status: Accepted

Solution code:
a = input()
a = int(a)
print(a + a**2 + a**3)

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    answer = solve(a)
    print(answer)


def solve(a):
    return a + a**2 + a**3


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())
X = a + (a ** 2) + (a ** 3)
print(X)

Submission status: Accepted

Solution code:
a = (int)(input())
ret = a * a
ret += ret * a
ret += a
print("{}".format(ret))

Submission status: Accepted

Solution code:
a= int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int):
    print(a + a**2 + a**3)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    solve(a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gcd, sqrt
from operator import mul
from functools import reduce
from operator import mul
from pprint import pprint



sys.setrecursionlimit(2147483647)
INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


a = I()
print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
A=int(input())
ans=A+A**2+A**3
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
n1 = int(pow(a,1))
n2 = int(pow(a,2))
n3 = int(pow(a,3))
print (n1+n2+n3)

Submission status: Accepted

Solution code:
a = int(input())
b = (a) + (a * a) + (a * a * a)
print(b)

Submission status: Accepted

Solution code:
a=int(input())

ans=a+a**2+a**3

print(ans)

Submission status: Accepted

Solution code:
N, = map(int, input().split())
print(N+N**2+N**3)

Submission status: Accepted

Solution code:
def calculate(n):
  n3 = n**3
  n2 = n**2
  return n+n2+n3

n = int(raw_input())
print(calculate(n))

Submission status: Accepted

Solution code:


a = int(input("\n"))

if 1 <= a <= 10:
    print(int(a + (a**2) + (a**3)))

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
a = int(input())
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
a = int(input())
b = a + pow(a,2) + pow(a,3)
print(b)

Submission status: Accepted

Solution code:
# A - Calc
def main():
    a = int(input())
    print(a+(a**2)+(a**3))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def calc(a):
    k = a**2
    j = a**3
    l = a+k+j
    return l

a = int(input())
m = calc(a)
print(m)

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    a = input_number()
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=int(input())
print(a + a*a + a*a*a)

Submission status: Accepted

Solution code:
n = int(input())

print(int(n+n**2+n**3))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
# スペース区切りの整数の入力
1<=a<=10
print(a*a*a+a*a+a)

Submission status: Accepted

Solution code:
import sys
def input():return sys.stdin.readline()[:-1]
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
a=N()
print(a+a*a+a**3)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a = int(input())

    print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())
A = a + (a**2) + (a**3)
print(A)

Submission status: Accepted

Solution code:

a=int(input())

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())
dos = a * a
tres = a * a * a	
print(a + dos + tres)

Submission status: Accepted

Solution code:
a = int(input())
print (a + (a ** 2) + (a ** 3))

Submission status: Accepted

Solution code:
a=int(input())
l = [a**i for i in range(4)]
print(sum(l)-1)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print(n+n*n+n*n*n)
 
 
if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))


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

Submission status: Accepted

Solution code:
a = int(input())
n = 2
m = 3
print(a + a ** n + a ** m)

Submission status: Accepted

Solution code:
a = int(input())
 
print(str(a + (a ** 2) + (a ** 3)))

Submission status: Accepted

Solution code:
a = int(input())
print(a**1 + a**2 + a**3)

Submission status: Accepted

Solution code:
def calc(a):
    return a+a**2+a**3
n = int(input())
print(calc(n))

Submission status: Accepted

Solution code:
a = int(input())
sum_a = a + a ** 2 + a ** 3
print(sum_a)

Submission status: Accepted

Solution code:
A = int(input())
C = A*A
D = C*A
print(A+C+D)

Submission status: Accepted

Solution code:
a=int(input())
ans=a+a*a+a**3
print(ans)

Submission status: Accepted

Solution code:
def binpow(a, b):
    res=1
    while b>0:
        if b&1:
            res=res*a
        a=a*a
        b>>=1
    
    return res


def main():
    a=int(input())
    print(a+binpow(a, 2)+binpow(a, 3))


if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
a = input()
b = int(a)
print(b+b**2+b**3)

Submission status: Accepted

Solution code:
a = int(input())

print( a*a*a + a*a +a )

Submission status: Accepted

Solution code:
a = int(input())
res = a + a *a + a * a * a
print(res)

Submission status: Accepted

Solution code:
x = int(input(""))

print(x + x*x + x*x*x)

Submission status: Accepted

Solution code:
a = int(input())
a_2 = a**2
a_3 = a**3
print(a+a_2+a_3)

Submission status: Accepted

Solution code:

def calc(a):
    c=0
    for i in range (1,4):
        c += a**i
    return c

print(calc(int(input())))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

a = int(input())
print(int(a+a**2+a**3))

Submission status: Accepted

Solution code:
a = int(input())
ans = a+a*a+a*a*a

print(ans)

Submission status: Accepted

Solution code:
a = int(input())
sum = 0
for i in range(3):
    sum += a ** (i+1)
print(int(sum))

Submission status: Accepted

Solution code:
a = int(input())
print (a + a **2 + a **3)

Submission status: Accepted

Solution code:
num = int(input())
total = num + num**2 + num **3
print(total)

Submission status: Accepted

Solution code:
a = eval(input())
print(int(a+(a**2)+(a**3)))

Submission status: Accepted

Solution code:
a = int(input())
print(a**1 + a**2 +a**3)

Submission status: Accepted

Solution code:
n = int(input())
print(n + pow(n,2) + pow(n,3))

Submission status: Accepted

Solution code:
n=int(input().strip())
result=n*(1+n+(n**2))
print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a = int(input())

print(a + a ** 2 + a * a * a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
val_1 = int(input())
val_2 = val_1 * val_1
val_3 = val_1 * val_1 * val_1

answer = val_1 + val_2 + val_3
print(answer)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a = int(input())
print(a + a ** 2 + a ** 3)

Submission status: Accepted

Solution code:
a = int(input())
# a = 5

print(a+a**2+a**3)

Submission status: Accepted

Solution code:
m = int(input())
re = 0

for i in range(1,4):
    kai = m**i
    re += kai

print(re)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a=int(input())
print((a)+(a*a)+(a*a*a))

Submission status: Accepted

Solution code:
#Calc
a = int(input())
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
a = int(input())
re = a + a**2 + a**3
print(re)

Submission status: Accepted

Solution code:
a = int(input())

print(str(a + (a ** 2) + (a ** 3)))

Submission status: Accepted

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')



def solve():
    
    

    # for _ in range(ii()):
        
        
    a=ii()
    print(a+a*a+a*a*a)
        














        
if __name__ =="__main__":

    if path.exists('input.txt'):
        sys.stdin=open('input.txt', 'r')
        sys.stdout=open('output.txt','w')
    else:
        input=sys.stdin.readline
    solve()

Submission status: Accepted

Solution code:
from sys import stdin
#, setrecursionlimit, stdout
#setrecursionlimit(1000000)
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
#from heapq import heapify, heappop, heappush, heappushpop, heapreplace
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def si(): return stdin.readline().rstrip()
def lsi(): return list(si())
#mod=1000000007
res=['NET', 'DA']
############# CODE STARTS HERE #############


test_case=1
while test_case:
    test_case-=1


    n=ii()
    print(n+n**2+n**3)

Submission status: Accepted

Solution code:

def main():
    X =int(input())
    print(int(X + X**2 + X**3))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a=int(input())
print(int(a+a*a+a*a*a))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np

def main():
	a=II()
	print(a+a**2+a**3)





if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
a = int(input())
n = a + a**2 + a**3
print(n)

Submission status: Accepted

Solution code:
x = int(input())

print(x+x*x+x*x*x)

Submission status: Accepted

Solution code:
int = int(input()) 

print(int+int**2+int**3)