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:
a = int(input())
b = a+(a**2)+(a**3)
print(b)

Submission status: Accepted

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

a = int(readline())

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

Submission status: Accepted

Solution code:
## necessary imports
import sys
input = sys.stdin.readline
#from math import ceil, floor, factorial;

# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp

## gcd function
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);

## nCr function efficient using Binomial Cofficient
def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0):
    hi = len(a)
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;


# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e7 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
# spf = [0 for i in range(MAXN)]
# spf_sieve() 
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()))
## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

n = int(input());
ans = n * (1 + n * (1 + n));
print(ans);

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    a = II()
    print(a + a ** 2 + a ** 3)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import heapq
import queue
import itertools
import functools
import operator
import time

readline = sys.stdin.readline
 
IPS = lambda: readline().rstrip()
IP = lambda: int(readline().rstrip())
MP = lambda: map(int, readline().split())
LS = lambda: list(map(int, readline().split()))

def solve():
    for _ in range(1):
        n = IP()
        print(n + n**2 + n**3)
       
       
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
a = int(input())

calc = (a) + (a**2) + (a**3)

print(calc)

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc172/tasks/abc172_a
a = int(input())
print(a + a**2 + a**3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

# check
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:
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
    return int(input())

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


def solve():
    a = ri()
    print (a + a*a + a*a*a)





mode = 's'

if mode == 'T':
    t = ri()
    for i in range(t):
        solve()
else:
    solve()

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
// Author : snape_here - Susanta Mukherjee
     
 """
 
from __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
 
def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())
 
 
def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 

def isPrime(n):
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

mod=1000000007

from math import *

import bisect

from decimal import *

getcontext().prec = 50

abc="abcdefghijklmnopqrstuvwxyz"

pi=3.141592653589793238

def main():

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


# region fastio
 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
 
if __name__ == "__main__":
    #read()
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/python3
 
cmdvar_N=int(input())
tmp=cmdvar_N
for i in 2,3:
    tmp=tmp+cmdvar_N**i

print(tmp)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))


a = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
#atcoder template
def main():
    import sys
    imput = sys.stdin.readline
    #文字列入力の時は上記はerrorとなる。
    #ここにコード
    #input
    a = int(input())

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

    #N = 1のときなどcorner caseを確認！
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    a = II()



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

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
a = int(input())
ans = 0
if 1 <= a <= 10:
    ans =  a + a*a + a**3
print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(a: int) -> int:
    return a+a**2+a**3

if __name__ == "__main__":
    a = int(input())
    print(calc(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print((a:=int(input()))-~a*a*a)

Submission status: Accepted

Solution code:
a = int(input())
ans = int(0)
for num in range(1,4):
	ans += a**num
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
a2 = a*a
a3 = a2 * a

print(a + a2 + a3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
input = lambda: stdin.readline().rstrip("\r\n")
from collections import defaultdict as vector, deque as que
inin = lambda: int(input())
inar = lambda: list(map(int,input().split()))
from heapq import heappush as hpush,heappop as hpop

a=inin()
print(a+a*a+a*a*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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:
n = int(input())
k = n+n**2+n**3

print(k)

Submission status: Accepted

Solution code:
from sys import stdin
input = lambda: stdin.readline().rstrip("\r\n")
from collections import defaultdict as vector
from collections import deque as que
inin = lambda: int(input())
inar = lambda: list(map(int,input().split()))
from heapq import heappush as hpush,heappop as hpop

a=inin()
print(a+a*a+a*a*a)

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re


a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

out = pow(a,1)+pow(a,2)+pow(a,3)

print(out)

Submission status: Accepted

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

print(A)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
print(a[0] + a[0]**2 + a[0]**3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
 
N=s+s*s+s*s*s
 
print (N)

Submission status: Accepted

Solution code:
a=int(input())

sum=0
for i in range(1,4):
    sum+=a**i

print(sum)

Submission status: Accepted

Solution code:
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:
n = int(input())
print(n+(n*n)+(n*n*n))

Submission status: Accepted

Solution code:
a = int(input())

ans = a + pow(a,2) + pow(a,3)

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc172_a.py
N = int(input())
print(N+N**2+N**3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=int(input())
sums=0
for i in range(1,4):
  sums += A**i
  
print(sums)

Submission status: Accepted

Solution code:
a = int(input())

answer = 0
for i in range(3):
  answer += a ** (i+1)
  
print(answer)

Submission status: Accepted

Solution code:
a = int( input() )

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a = int(sys.stdin.readline().rstrip())

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

Submission status: Accepted

Solution code:
a = int(input())
print(sum((a ** i) for i in range(1,4)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
if (int(a)>=1) and (int(a)<=10):
  print(int(a) + int(a)*int(a) + int(a)*int(a)*int(a))

Submission status: Accepted

Solution code:
N = int(input())

print(N+N**2+N**3)

Submission status: Accepted

Solution code:
a=int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def adj(n): return [[] for _ in range(n)]

class unionfind():
    def __init__(self, n):
        self.n = n
        # 中身が負の数なら根であり、数字の絶対値はグループ数
        self.parents = [-1] * n
    def find(self, x):
        if self.parents[x] < 0: return x
        self.parents[x] = self.find(self.parents[x])
        return self.parents[x]
    def union(self, x, y):
        x,y = self.find(x), self.find(y)
        if x == y: return
        if self.parents[x] > self.parents[y]: x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    def size(self, x): return -self.parents[self.find(x)]
    def same(self, x, y): return self.find(x) == self.find(y)
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    def roots(self): return [i for i, x in enumerate(self.parents) if x < 0]
    def group_count(self): return len(self.roots())

a = iinput()
ans = a + a**2 + a**3
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# from collections import Counter, deque
# from collections import defaultdict
# from itertools import combinations, permutations, accumulate, groupby, product
# from bisect import bisect_left,bisect_right
# from heapq import heapify, heappop, heappush
# from math import floor, ceil,pi,factorial
# from operator import itemgetter
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
inf = 10**17
mod = 10**9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a = I()
print(a+a**2+a**3)

Submission status: Accepted

Solution code:
import sys


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


sys.setrecursionlimit(20000000)

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


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


if __name__ == "__main__":
    main()

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:
# A - Calc

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))
##########

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = 0
for i in range(1,4):
  s += n**i
print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	a = inputInt()

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



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

a = int(sys.stdin.readline())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = [0,0,0]
b[0] = a
b[1] = b[0]*a
b[2] = b[1]*a
total = sum(b)
print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = [3, 14, 39, 84, 155, 258, 399, 584, 819, 1110]
print(b[a-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


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

    return a + a**2 + a**3


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

a = int(input())

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

ans = a + pow(a, 2) + pow(a, 3)

print(str(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_data = []
input_pointer = 0

output_data = []

def input_scan():
    global input_data
    input_data = sys.stdin.readlines()
    input_data = [x[:-1] for x in input_data]

def next_line():
    global input_pointer
    global input_data
    if input_pointer < len(input_data):
        input_pointer += 1
        return input_data[input_pointer - 1]
    else:
        return ""

def append_output(string):
    global output_data
    output_data.append(string)

def print_output():
    global output_data
    output_data.append("")
    sys.stdout.write("\n".join(output_data))

a = int(input())
append_output(str(a + a * a + a * a * a))
print_output()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
print(sum(a**i for i in range(1, 4)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 28 13:26:25 2020

@author: NEC-PCuser
"""
a = int(input())
print(a + a ** 2 + a ** 3)

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

a = I()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

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

solve()

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:
print((a := int(input())) + a * a + a * a * a)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

main()