buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename Arg1> void pn(Arg1 &&arg1) { cout << arg1 << "\n"; } template <typename Arg1, typename... Args> void pn(Arg1 &&arg1, Args &&...args) { cout << arg1 << "\n"; pn(args...); } template <typename Arg1> void ps(Arg1 &&arg1) { cout <<...
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename Arg1> void pn(Arg1 &&arg1) { cout << arg1 << "\n"; } template <typename Arg1, typename... Args> void pn(Arg1 &&arg1, Args &&...args) { cout << arg1 << "\n"; pn(args...); } template <typename Arg1> void ps(Arg1 &&arg1) { cout <<...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
738
a = int(input()) output = a + a^2 + a^3 print(output)
a = int(input()) output = a + a**2 + a**3 print(output)
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 140], ["+", 0, 662, 12, 657, 31, 657, 12, 657, 17, 578], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 140], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 578]]
5
23
a = int(input()) print(a+a*a)+(a*a*a)
a = int(input()) print(a+(a*a)+(a*a*a))
[["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]]
5
24
a = input() print(a+(a*a)+(a*a*a))
a = int(input()) print(a+(a*a)+(a*a*a))
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
23
$a=fgets(STDIN); $result=$a+$a**2+$a**3; echo $result;
<?php $a=fgets(STDIN); $result=$a+$a**2+$a**3; echo $result; ?>
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 611]]
6
28
a=int(input()) ans=a+a*a+a**2 print(ans)
a=int(input()) ans=a+a*a+a**3 print(ans)
[["-", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]]
5
23
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 1 + n * n + n * n * n; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << n + n * n + n * n * n; }
[["-", 0, 1, 0, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 31, 22]]
1
33
a = int(intput()) ans = a*(1+a*(1+a)) print(ans)
a = int(input()) ans = a*(1+a*(1+a)) print(ans)
[["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22]]
5
27
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #inc...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #inc...
[["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["-", 0, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 16, 12, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 16, 12, 16, 12, 23, 0, 16, 12, 22]]
1
161
#include <bits/stdc++.h> using namespace std; int main() { int a; cout << (a * (1 + a * (1 + a))) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << (a * (1 + a * (1 + a))) << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
38
num = input() answer = num + num * num + num * num * num print(answer)
num = int(input()) answer = num + num * num + num * num * num print(answer)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
22
/*The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep.*/ // PRABHJOT SINGH A.K.A. PRABHI //~~~~~conquizztador~~~~~ #include <bits/stdc++.h> using namespace std; using lli = long long int; #define pb push_back #define eb emplace_back #define ...
/*The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep.*/ // PRABHJOT SINGH A.K.A. PRABHI //~~~~~conquizztador~~~~~ #include <bits/stdc++.h> using namespace std; using lli = long long int; #define pb push_back #define eb emplace_back #define ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
96
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define ll long long int main() { int a; cout << a + a * a + a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define ll long long int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
40
A = int(input()) print(a+a**2+a**3)
a = int(input()) print(a+a**2+a**3)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
20
a = input() print(a+(a**2)+(a**3))
a = int(input()) print(a+(a**2)+(a**3))
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
21
from sys import stdin a = stdin.readline().rstrip() print(a+a**2+a**3)
from sys import stdin a = int(stdin.readline().rstrip()) print(a+a**2+a**3)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
27
#include <algorithm> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric...
#include <algorithm> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric...
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48]]
1
2,368
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define F first #define S second #define mod 1000000007 #define pb push_back #define FOR(i, a, n) for (ll i = a; i < n; i++) #define all(a) a.begin(), a.end() #define UB upper_bound #define LB lower_bound const int NUM = 2e5 + 5; ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define F first #define S second #define mod 1000000007 #define pb push_back #define FOR(i, a, n) for (ll i = a; i < n; i++) #define all(a) a.begin(), a.end() #define UB upper_bound #define LB lower_bound const int NUM = 2e5 + 5; ...
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
113
#include <stdio.h> int main() { int a; scanf("%d", &a); a = a + a * a + a * a * a; printf("%d", &a); }
#include <stdio.h> int main() { int a; scanf("%d", &a); a = a + a * a + a * a * a; printf("%d", a); }
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
45
a=int(input()) print(round((a*(a-(-1+math.sqrt(3)*(1j))/2)*(a-(-1-math.sqrt(3)*(1j))/2)).real))
import math a=int(input()) print(round((a*(a-(-1+math.sqrt(3)*(1j))/2)*(a-(-1-math.sqrt(3)*(1j))/2)).real))
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
63
#include <bits/stdc++.h> using namespace std; #define ll long long #define mk make_pair #define pb push_back #define fi first #define se second #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() ll sum(int n); void go() { int n; cin >> n; cout << n * (n * n) * (n * n * n); } int main() { ios_b...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mk make_pair #define pb push_back #define fi first #define se second #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() ll sum(int n); void go() { int n; cin >> n; cout << n + (n * n) + (n * n * n); } int main() { ios_b...
[["-", 0, 1, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 72]]
1
139
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); System.out.println(n + Math.pow(n, 2) + Math....
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); System.out.println((int)(n + Math.pow(n, 2) +...
[["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25], ["+", 0, 492, 3, 4, 0, 74, 51, 23, 0, 24], ["+", 51, 23, 0, 16, 12, 492, 3, 4, 0, 25]]
3
89
A=int(input()) sums=0 for i in range(1,4): sums += A**i print(sums) print(sums)
A=int(input()) sums=0 for i in range(1,4): sums += A**i print(sums)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
34
$a = trim(fgets(STDIN)); echo $a + $a*$a + $a*$a*$a;
<?php // Your code here! $a = trim(fgets(STDIN)); echo $a + $a*$a + $a*$a*$a; ?>
[["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 611]]
6
30
n = int(input()) s = 0 for i in range(1,4): s += n**i
n = int(input()) s = 0 for i in range(1,4): s += n**i print(s)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
26
a = int(input()) print(a^3 + a^2 + a)
a = int(input()) print(a**3 + a**2 + a)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 140], ["+", 3, 4, 0, 657, 31, 657, 31, 657, 17, 578], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 140], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578]]
5
20
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); long res = a; res = a * a + a * a * a; System.out.println(res); } }
import java.util.Scanner; /** * * @author HP */ public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); long res = a; res += a * a + a * a * a; System.out.println(res); } }
[["-", 0, 195, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 17, 107]]
3
70
# -*- 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, in...
# -*- 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, in...
[["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 25], ["-", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]]
5
148
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
[["-", 31, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72]]
1
285
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a; cout << (a + (a * a) + (a * a * a)) << endl; return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a; cin >> a; cout << (a + (a * a) + (a * a * a)) << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
42
n = gets.to_i a = n + n**2 + n*3 puts a
n = gets.to_i a = n + n**2 + n**3 puts a
[["-", 0, 493, 0, 662, 12, 738, 12, 738, 17, 48], ["+", 0, 493, 0, 662, 12, 738, 12, 738, 17, 578]]
4
18
#include <cstdio> long long n, x; int main() { scanf("%lld", &n); x += n + n * n + n * n * n; printf("%lld", n); return 0; }
#include <cstdio> long long n, x; int main() { scanf("%lld", &n); x += n + n * n + n * n * n; printf("%lld", x); return 0; }
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
50
#include <stdio.h> int main() { int a; scanf("%d", a); printf("%d", a * a * a + a * a + a); }
#include <stdio.h> int main() { int a; scanf("%d", &a); printf("%d", a * a * a + a * a + a); }
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
39
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int result = a + a ^ 2 + a ^ 3; System.out.print(result); } }
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int result = a + a * a + a * a * a; System.out.print(result); } }
[["-", 0, 503, 49, 200, 51, 16, 31, 16, 17, 140], ["-", 49, 200, 51, 16, 31, 16, 12, 16, 31, 499], ["+", 49, 200, 51, 16, 31, 16, 12, 16, 17, 48], ["+", 49, 200, 51, 16, 31, 16, 12, 16, 12, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 17, 140], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499], ["+", 49, 200, 51, 16, 12, ...
3
66
#include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define si(x) scanf("%d", &x) #define sl(x) scanf("%lld", &x) #define ss(s) scanf("%s", s) #define p...
#include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define si(x) scanf("%d", &x) #define sl(x) scanf("%lld", &x) #define ss(s) scanf("%s", s) #define p...
[["+", 0, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 16, 12, 23, 0, 25], ["-", 12, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 12, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]]
1
542
#include <stdio.h> int main(void) { int a, b, c, e; scanf("%d", a); printf("%d", a + (a * a) + (a * a * a)); }
#include <stdio.h> int main(void) { int a, b, c, e; scanf("%d", &a); printf("%d", a + (a * a) + (a * a * a)); }
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
50
a=int(input()) l = [a**i for i in range(4)] print(l) print(sum(l)-1)
a=int(input()) l = [a**i for i in range(4)] print(sum(l)-1)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
5
35
import java.lang.*; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println(a + Math.pow(a, 2) + Math.pow(a, 3)); } }
import java.lang.*; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println((int)(a + Math.pow(a, 2) + Math.pow(a, 3))); } }
[["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25], ["+", 0, 492, 3, 4, 0, 74, 51, 23, 0, 24], ["+", 51, 23, 0, 16, 12, 492, 3, 4, 0, 25]]
3
85
a = input() n = 2 m = 3 print(a + a ** n + a ** m)
a = int(input()) n = 2 m = 3 print(a + a ** n + a ** m)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
23
#include <iostream> using namespace std; int main() { int a, b, c = 0; cin >> a; b = a * a; c = a * a * a; return a + b + c; }
#include <iostream> using namespace std; int main() { int a, b, c = 0; cin >> a; b = a * a; c = a * a * a; cout << a + b + c; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
46
i = int(input()) print(i + i*2 + i*3)
i = int(input()) print(i + i**2 + i**3)
[["-", 3, 4, 0, 657, 31, 657, 12, 657, 17, 48], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578], ["-", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 578]]
5
20
#include <bits/stdc++.h> using namespace std; int main() { int a; cout << a + a * a + a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
31
// A - Calc // Hiia #include <stdio.h> #include <stdlib.h> //rannsuu, zettaichi(absolute) #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu #define max(p, q) ((p) > (q) ? (p) : (q)) #define min(p, q) ((p) < (q) ? (p) : (q)) //#define N 998244353 in...
// A - Calc // Hiia #include <stdio.h> #include <stdlib.h> //rannsuu, zettaichi(absolute) #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu #define max(p, q) ((p) > (q) ? (p) : (q)) #define min(p, q) ((p) < (q) ? (p) : (q)) //#define N 998244353 in...
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 17, 48]]
0
442
a=int(input()) b=a**a print(int(a+b+a*b))
a=int(input()) b=a*a print(int(a+b+a*b))
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 578], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 48]]
5
26
a = int(input()) print(a(1+a+a*a))
a = int(input()) print(a*(1+a+a*a))
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
21
#include <stdio.h> int main() { int a, ans; scanf("%d", &a); ans = a + a * a + a * a * a; printf("%d", a); }
#include <stdio.h> int main() { int a, ans; scanf("%d", &a); ans = a + a * a + a * a * a; printf("%d", ans); }
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
0
46
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); System.out.println(n + Math.pow(n, 2) + Math.pow(n, 3)); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); System.out.println(n + (int)Math.pow(n, 2) + (int)Math.pow(n, 3)); } }
[["+", 3, 4, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 506, 0, 507], ["+", 3, 4, 0, 16, 31, 16, 12, 74, 0, 25], ["+", 0, 492, 3, 4, 0, 16, 12, 74, 0, 24], ["+", 3, 4, 0, 16, 12, 74, 39, 506, 0, 507], ["+", 0, 492, 3, 4, 0, 16, 12, 74, 0, 25]]
3
71
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
260
import sys if __name__ == '__main__': a = int(sys.stdin.readline()) print(a*(a**2)*(a**3))
import sys if __name__ == '__main__': a = int(sys.stdin.readline()) print(a+(a**2)+(a**3))
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72]]
5
37
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int res = n + (n * n) + (n * n * n); cout << n; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int res = n + (n * n) + (n * n * n); cout << res; }
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
42
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); System.out.println(Math.ceil(n + Math.pow(n, 2) + Math.pow(n, 3))); } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); System.out.println((int)Math.ceil(n + Math.pow(n, 2) + Math.pow(n, 3))); } }
[["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25]]
3
76
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <stdio.h> using namespace std; using ll = long long; ll gcd(ll a, ll b); int main() { cin.tie(0); int a; cout << a + a * a + a * a * a; return 0; } ll gcd(ll a, ll b) { if (a % b == 0) { return (b); } else { return (gcd(b...
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <stdio.h> using namespace std; using ll = long long; ll gcd(ll a, ll b); int main() { cin.tie(0); int a; cin >> a; cout << a + a * a + a * a * a; return 0; } ll gcd(ll a, ll b) { if (a % b == 0) { return (b); } else { r...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
102
"""everything has a cost!""" from math import * import random, functools, collections, sys __author__ = 'p7x' # sys.stdin = open('in.txt', 'r') # sys.stdout = open('out.txt', 'w') # sys.stderr = open('err.txt', 'w') if __name__ == '__main__': n = int(input()) print(a + a**2 + a**3)
"""everything has a cost!""" from math import * import random, functools, collections, sys __author__ = 'p7x' # sys.stdin = open('in.txt', 'r') # sys.stdout = open('out.txt', 'w') # sys.stderr = open('err.txt', 'w') if __name__ == '__main__': n = int(input()) print(n + n**2 + n**3)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["-", 3, 4, 0, 657, 31, 657, 12, 657, 31, 22], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 31, 22], ["-", 0, 652, 3, 4, 0, 657, 12, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 22]]
5
50
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; /*bool compare_function(const pair<int, int> a, const pair<int, int> b) { return a.first ...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; /*bool compare_function(const pair<int, int> a, const pair<int, int> b) { return a.first ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
89
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int a; cin >> a; cout << a * a * a + a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int a; cin >> a; cout << a * a * a + a * a + a << endl; }
[["-", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
49
#include <bits/stdc++.h> #define ll long long using namespace std; const long long MAXVAL = (long long)1e18 + 1; const long long MOD = 1000000007ll; // const long long MOD = 998244353ll; const int INF = 1000000001; long long poww(int x, long long pow) { if (pow == 0ll) return 1; if (pow == 1ll) return x %...
#include <bits/stdc++.h> #define ll long long using namespace std; const long long MAXVAL = (long long)1e18 + 1; const long long MOD = 1000000007ll; // const long long MOD = 998244353ll; const int INF = 1000000001; long long poww(int x, long long pow) { if (pow == 0ll) return 1; if (pow == 1ll) return x %...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
229
import java.util.Scanner; public class Main { public static void main(String args[]) throws Exception { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int ans = a + a * a + a * a * a; System.out.print(a); } }
import java.util.Scanner; public class Main { public static void main(String args[]) throws Exception { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int ans = a + a * a + a * a * a; System.out.print(ans); } }
[["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22]]
3
70
a = int(input()) x = a + a**2 + a**3 print(a)
a = int(input()) x = a + a**2 + a**3 print(x)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
23
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) const int INF = 1001001001; using ll = long long; using P = pair<int, int>; using Graph = vector<string>; Graph field; queue<P> q; int main() { ll a; cout << a + a * a + a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) const int INF = 1001001001; using ll = long long; using P = pair<int, int>; using Graph = vector<string>; Graph field; queue<P> q; int main() { ll a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
78
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { ll a; cin >> a; return a + (a * a) + (a * a * a); }
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { ll a; cin >> a; cout << a + (a * a) + (a * a * a) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
42
n = input().rstrip() print(int(n+n**2+n**3))
n = int(input().rstrip()) print(int(n+n**2+n**3))
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
24
/// mAAria... #include <bits/stdc++.h> using namespace std; #define int long long #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
/// mAAria... #include <bits/stdc++.h> using namespace std; #define int long long #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
260
// Own template #include <bits/stdc++.h> using namespace std; #define fo(i, n) \ for (int i = 0; i < n; i++) \ ; #define T \ int ...
// Own template #include <bits/stdc++.h> using namespace std; #define fo(i, n) \ for (int i = 0; i < n; i++) \ ; #define T \ int ...
[["-", 31, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["+", 31, 16, 12, 23, 0, 16, 31, 16, 17, 72], ["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 72]]
1
68
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using p = pair<int, int>; int main() { int a; cin >> a; cout << (a + a * a + a * a * a * a) << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using p = pair<int, int>; int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 23, 0, 24], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 23, 0, 25]]
1
66
#include <bits/stdc++.h> using namespace std; int main() { int a; cout << (1 + a + a * a) * a << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << (1 + a + a * a) * a << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
34
a = input() ans = a + (a ** 2) + (a ** 3) print(ans)
a = int(input()) ans = a + (a ** 2) + (a ** 3) print(ans)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
24
a=int(input()) print(a*+a*a+a**3)
a=int(input()) print(a+a*a+a**3)
[["-", 3, 4, 0, 657, 31, 657, 31, 657, 17, 48]]
5
21
// ABHISHEK AGRAWAL// // Newbie......You have to be odd to be no. ONE :)// #include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define fl float #define lcm(a, b) (a * (b / __gcd(a, b))) #define vs vector<string> #define vc vector<char> #define vll vector<ll> #define sll set<ll>...
// ABHISHEK AGRAWAL// // Newbie......You have to be odd to be no. ONE :)// #include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define fl float #define lcm(a, b) (a * (b / __gcd(a, b))) #define vs vector<string> #define vc vector<char> #define vll vector<ll> #define sll set<ll>...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 72]]
1
1,250
#include <iostream> using namespace std; int main() { long long a; cout << a + a * a + a * a * a << endl; return 0; }
#include <iostream> using namespace std; int main() { long long a; cin >> a; cout << a + a * a + a * a * a << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
35
#include <iostream> int main() { using namespace std; long long a; cout << a + a * a + a * a * a << endl; }
#include <iostream> int main() { using namespace std; long long a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
32
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int a; cin >> a; cout << a + a * a + a * a * a << '/n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int a; cin >> a; cout << a + a * a + a * a * a << '\n'; return 0; }
[["-", 8, 9, 0, 1, 0, 16, 12, 103, 0, 125], ["-", 0, 1, 0, 16, 12, 103, 0, 42, 0, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 103, 0, 44]]
1
55
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1010000000000000017LL; const ll MOD = 1000000007LL; #define REP(i, n) for (ll i = 0; i < n; i++) //#define DEBUG(fmt, ...) #define DEBUG(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) int main() { std::cout << std::fixed << std...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1010000000000000017LL; const ll MOD = 1000000007LL; #define REP(i, n) for (ll i = 0; i < n; i++) //#define DEBUG(fmt, ...) #define DEBUG(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) int main() { std::cout << std::fixed << std...
[["-", 0, 1, 0, 16, 31, 16, 12, 23, 0, 24], ["-", 31, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["-", 31, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
1
90
a=int(input()) B=0 C=0 D=0 B=A C=a*a D=a*a*a print(B+C+D)
a=int(input()) B=0 C=0 D=0 B=a C=a*a D=a*a*a print(B+C+D)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22]]
5
40
import java.util.*; class Main { public void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int total = 0; total = a + a * a + a * a * a; System.out.println(total); } }
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int total = 0; total = a + a * a + a * a * a; System.out.println(total); } }
[["+", 0, 235, 8, 498, 0, 195, 0, 494, 0, 115]]
3
70
#include <ctype.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define STR 10 int main() { int a; scanf("%d", &a); printf("%f", a + a * a + a * a * a); return 0; }
#include <ctype.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define STR 10 int main() { int a; scanf("%d", &a); printf("%d", a + a * a + a * a * a); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
54
// aabc172_a #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #includ...
// aabc172_a #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #includ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
304
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define RREP(i, n) for (int i = (int)(n)-1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < b; i++) typedef long long ll; int main() { int a; cout << a + a...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP1(i, n) for (int i = 1; i <= (int)(n); i++) #define RREP(i, n) for (int i = (int)(n)-1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < b; i++) typedef long long ll; int main() { int a; cin >> a; c...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
70
#include <bits/stdc++.h> using namespace std; #pragma optimise("-O3") /*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; // x^y≡x^(y%(p-1))mod p // but there is a condition that x needs to be coprime to p ///assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for sp...
#include <bits/stdc++.h> using namespace std; #pragma optimise("-O3") /*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; // x^y≡x^(y%(p-1))mod p // but there is a condition that x needs to be coprime to p ///assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for sp...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
576
def main(): import sys def input(): return sys.stdin.readline().rstrip() a = int(input()) for i in range(3): ans += a**(i+1) print(ans) if __name__ == '__main__': main()
def main(): import sys def input(): return sys.stdin.readline().rstrip() a = int(input()) ans = 0 for i in range(3): ans += a**(i+1) print(ans) if __name__ == '__main__': main()
[["+", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]]
5
63
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; return (a + a * a + a * a * a); }
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (a + a * a + a * a * a) << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
35
#include <bits/stdc++.h> using namespace std; main() { int a; cout << a + a * a + a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
30
#include <bits/stdc++.h> using namespace std; int main() { int a; cout << a + a * a + a * a * a << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
34
def main(a): return a + a**2 + a**3 if __name__ == "__main__": a = input() print(main(a))
def main(a): return a + a**2 + a**3 if __name__ == "__main__": a = int(input()) print(int(main(a)))
[["+", 64, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
35
a=input() b=a**3+a**2+a print(b)
a = int(input()) b = a ** 3 + a ** 2 + a print(b)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
20
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll gcdEx(ll a, ll b, ll *x, ll *y) { if (!a) { *x = 0; *y = 1; return b; } ll x1, y1, gcd = gcdEx(b % a, a, &x1, &y1); *x = y1 - (b / a) * x1; *y = x1; return gcd; } ll modI(ll b, ll m) { ll x, y; gcdEx(b, m, &x, &y); retu...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll gcdEx(ll a, ll b, ll *x, ll *y) { if (!a) { *x = 0; *y = 1; return b; } ll x1, y1, gcd = gcdEx(b % a, a, &x1, &y1); *x = y1 - (b / a) * x1; *y = x1; return gcd; } ll modI(ll b, ll m) { ll x, y; gcdEx(b, m, &x, &y); retu...
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
605
#include <bits/stdc++.h> using namespace std; #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ c i) { sim > ...
#include <bits/stdc++.h> using namespace std; #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ c i) { sim > ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 42, 0, 14, 8, 9, 0, 1, 0, 35]]
1
384
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistic...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ tree_order_statistic...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
1,280
a=int(input()) print(int(a+a**2*a**3))
a=int(input()) print(int(a+a**2+a**3))
[["-", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72]]
5
23
n=int(inpput()) print(int((n+n**2+n**3)))
n=int(input()) print(int(n+n**2+n**3))
[["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 652, 3, 4, 0, 23, 0, 25]]
5
25
#include <iostream> using namespace std; int main(void) { int a; cin >> a; cout << a * (a * a) * (a * a * a) << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int a; cin >> a; cout << a + (a * a) + (a * a * a) << endl; return 0; }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
43
#include <bits/stdc++.h> using namespace std; int main() { int a; cout << ((a) + (a * a) + (a * a * a)) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << ((a) + (a * a) + (a * a * a)) << endl; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
39
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a + a * a * a * a * a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; }
[["-", 12, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
35
import sys, re, os from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians # from fractions import gcd from itertools import permutations, combinations, product, accumulate from operator import itemgetter, mul from copy import deepcopy from string import ...
import sys, re, os from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians # from fractions import gcd from itertools import permutations, combinations, product, accumulate from operator import itemgetter, mul from copy import deepcopy from string import ...
[["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
247
#include <bits/stdc++.h> using namespace std; int main() { long long n, i; cin >> n; i = n + n * n + n * n * n; cout << n; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, i; cin >> n; i = n + n * n + n * n * n; cout << i; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
43
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define PI 3.14159265358979323846 #define lp(i, n) for (int i = 0; i < n; i++) #define range1(i, a, b, c) for (int i = int(a); i <= int(b); i += int(c)) #define range(i...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define PI 3.14159265358979323846 #define lp(i, n) for (int i = 0; i < n; i++) #define range1(i, a, b, c) for (int i = int(a); i <= int(b); i += int(c)) #define range(i...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
313
#include <bits/stdc++.h> using namespace std; using ll = long long int; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using vs = vector<string>; using vvi = vector<vector<int>>; using vvl = vector<vector<ll>>; using...
#include <bits/stdc++.h> using namespace std; using ll = long long int; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using vs = vector<string>; using vvi = vector<vector<int>>; using vvl = vector<vector<ll>>; using...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
696
n=int(input()) print((a)+(a*a)+(a**3))
a=int(input()) print((a)+(a*a)+(a**3))
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
26
#include <bits/stdc++.h> using namespace std; #define present(container, element) (container.find(element) != container.end()) #define cpresent(container, element) \ (find(all(container), element) != container.end()) #define INF 0x3f3f3f3f #define f1(n) for (int i = 0; i < ...
#include <bits/stdc++.h> using namespace std; #define present(container, element) (container.find(element) != container.end()) #define cpresent(container, element) \ (find(all(container), element) != container.end()) #define INF 0x3f3f3f3f #define f1(n) for (int i = 0; i < ...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
102
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define pb pu...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define pb pu...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
142
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a * a * a * a * a * a << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a << endl; return 0; }
[["-", 31, 16, 31, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["-", 31, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72]]
1
38