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;
int main() {
clock_t start = clock();
int D;
cin >> D;
vector<int> c(26);
vector<vector<int>> s(D, vector<int>(26));
vector<int> t(D);
vector<vector<int>> last(D, vector<int>(26, 0));
vector<int> sat(D);
vector<int> sat_tmp(26);
for (int i = 0; i < 26... | #include <bits/stdc++.h>
using namespace std;
int main() {
clock_t start = clock();
int D;
cin >> D;
vector<int> c(26);
vector<vector<int>> s(D, vector<int>(26));
vector<int> t(D);
vector<vector<int>> last(D, vector<int>(26, 0));
vector<int> sat(D);
vector<int> sat_tmp(26);
for (int i = 0; i < 26... | [["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13], ["-", 12, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 889 |
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26
def score_down(d):
ans = 0
for i in range(26):
ans += c[i]*(d - last[i])
return ans
for d in range(D):
score = [(s[d][i] - score_down(d+1)) for i in range(D)]
t = score... | D = int(input())
c = list(map(int,input().split()))
s = [list(map(int, input().split())) for l in range(D)]
last = [0]*26
def score_down(d):
ans = 0
for i in range(26):
ans += c[i]*(d - last[i])
return ans
for d in range(D):
score = [(s[d][i] - score_down(d+1)) for i in range(26)]
t = scor... | [["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612]] | 5 | 152 |
from collections import Counter
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
temp_s = list(map(int, input().split()))
s.append(temp_s)
my_count = Counter()
for i in range(D):
for j in range(26):
my_count[j] = s[i][j]
print(max(my_count, key=my_count.get)) | from collections import Counter
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
temp_s = list(map(int, input().split()))
s.append(temp_s)
my_count = Counter()
for i in range(D):
for j in range(26):
my_count[j + 1] = s[i][j]
print(max(my_count, key=my_count.get)) | [["+", 0, 1, 0, 662, 31, 206, 206, 657, 17, 72], ["+", 0, 1, 0, 662, 31, 206, 206, 657, 12, 612]] | 5 | 110 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
using VB = vector<bool>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
using TI3 = std::tuple<int, int, int>;
u... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
using VB = vector<bool>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
using TI3 = std::tuple<int, int, int>;
u... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 1,615 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define P pair<ll,ll>
#define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I)
#define FORR(I, A, B) for (ll I = ll((B)-1); I >= ll(A); --I)
#define TO(x, t, f) ((x) ? (t) : (f))
#define SORT(x) (sort(x.begin(), x.end())) // 0 2 2 3 4 5 8 9
#define PO... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define P pair<ll,ll>
#define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I)
#define FORR(I, A, B) for (ll I = ll((B)-1); I >= ll(A); --I)
#define TO(x, t, f) ((x) ? (t) : (f))
#define SORT(x) (sort(x.begin(), x.end())) // 0 2 2 3 4 5 8 9
#define PO... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 1,043 |
import time
t0 =time.time()
D=int(input())
c = list(map(int,input().split()))
s=[None]*D
for i in range(D):
s[i] = list(map(int,input().split()))
def maxarg(l):
nl=len(l)
ma=-10**20
idx=-1
for i in range(nl):
if l[i]>ma:
ma=l[i]
idx=i
return (idx,ma)
last=[0]*2... | import time
t0 =time.time()
D=int(input())
c = list(map(int,input().split()))
s=[None]*D
for i in range(D):
s[i] = list(map(int,input().split()))
def maxarg(l):
nl=len(l)
ma=-10**20
idx=-1
for i in range(nl):
if l[i]>ma:
ma=l[i]
idx=i
return (idx,ma)
last=[0]*2... | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 379 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<int> c(26);
for (int i = 0; i < 26; i++) {
cin >> c.at(i);
}
vector<vector<int>> S(D, vector<int>(26));
for (int i = 0; i < D; i++) {
for (int j = 0; j < 26; j++) {
cin >> S.at(i).at(j);
}
}
for (int ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<int> c(26);
for (int i = 0; i < 26; i++) {
cin >> c.at(i);
}
vector<vector<int>> S(D, vector<int>(26));
for (int i = 0; i < D; i++) {
for (int j = 0; j < 26; j++) {
cin >> S.at(i).at(j);
}
}
for (int ... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 213 |
import sys
from random import randint
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)
def inpl():
return list(map(int, input().split()))
def count_v(last_d, C, S, t, d):
ret = S[t - 1]
last_d[t - 1] = d
for i in range(len(last_d)):
ret -= C[i] * (d - last_d[i])
return ret
d... | import sys
from random import randint
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)
def inpl():
return list(map(int, input().split()))
def count_v(last_d, C, S, t, d):
ret = S[t - 1]
last_d[t - 1] = d
for i in range(len(last_d)):
ret -= C[i] * (d - last_d[i])
return ret
d... | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 587 |
import numpy as np
D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])
l_opt = s.argmax(axis=1)
for l in l_opt:
print(l) | import numpy as np
D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])
l_opt = s.argmax(axis=1)
for l in l_opt:
print(l + 1) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 84 |
import sys
input = sys.stdin.readline
def scoring():
last = [0] * 26
res = 0
penalty = 0
for i in range(D):
t = out[i]
res += S[i][t]
penalty += SC - (i + 1 - last[t]) * C[t]
res -= penalty
last[t] = i
return res
D = int(input())
C = list(map(int, input().sp... | import sys
input = sys.stdin.readline
def scoring(sc):
last = [0] * 26
res = 0
penalty = 0
for i in range(D):
t = out[i]
res += S[i][t]
penalty += sc - (i + 1 - last[t]) * C[t]
res -= penalty
last[t] = i + 1
return res
D = int(input())
C = list(map(int, inpu... | [["+", 36, 36, 0, 656, 0, 14, 54, 54, 0, 22], ["-", 8, 196, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22],... | 5 | 204 |
#include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
//#include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<lon... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
//#include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<lon... | [["-", 0, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 28, 22]] | 1 | 691 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;
constexpr int N = 26;
constexpr int D = 365;
signed main() {
int D;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;
constexpr int N = 26;
constexpr int D = 365;
signed main() {
int D;
... | [["-", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22]] | 1 | 520 |
from bisect import bisect_left
D = int(input())
C = [0]+list(map(int, input().split()))
S = [0]+[[0] + list(map(int, input().split())) for _ in range(D)]
contest = [[0] for _ in range(27)]
#SL:満足度、sch:スケジュール
SL, sch = 0, [0]
#tの日程でコンテストを行った時の満足度を計算
for d in range(1, D+1):
t = int(input())
sch.append(t)
... | from bisect import bisect_left
D = int(input())
C = [0]+list(map(int, input().split()))
S = [0]+[[0] + list(map(int, input().split())) for _ in range(D)]
contest = [[0] for _ in range(27)]
#SL:満足度、sch:スケジュール
SL, sch = 0, [0]
#tの日程でコンテストを行った時の満足度を計算
for d in range(1, D+1):
t = int(input())
sch.append(t)
... | [["+", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 379 |
//#define DBG
#include <bits/stdc++.h>
using namespace std;
const int N_CNTST = 26;
int D;
vector<long long> C;
vector<vector<long long>> S;
long long CSum = 0;
vector<int> LAST(26, 0);
vector<int> T;
int main() {
cin >> D;
cin.ignore();
long long tmp;
for (int i = 0; i < N_CNTST; i++) {
cin >> tmp;
... | //#define DBG
#include <bits/stdc++.h>
using namespace std;
const int N_CNTST = 26;
int D;
vector<long long> C;
vector<vector<long long>> S;
long long CSum = 0;
vector<int> LAST(26, 0);
vector<int> T;
int main() {
cin >> D;
cin.ignore();
long long tmp;
for (int i = 0; i < N_CNTST; i++) {
cin >> tmp;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 91, 28, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 91, 28, 22]] | 1 | 852 |
/*
マラソン用 テンプレート
*/
/*力が欲しいか…?
#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
//Optimization flags #pragma GCC
option("arch=native","tune=native","no-zero-upper") //Enable AVX #pragma GCC
target("avx") //Enable AVX
*/
//#include <x86intrin.h>
#include <algorithm>
#include <bitset>
#include <... | /*
マラソン用 テンプレート
*/
/*力が欲しいか…?
#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
//Optimization flags #pragma GCC
option("arch=native","tune=native","no-zero-upper") //Enable AVX #pragma GCC
target("avx") //Enable AVX
*/
//#include <x86intrin.h>
#include <algorithm>
#include <bitset>
#include <... | [["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 1,356 |
import sys
sys.setrecursionlimit(300000)
from collections import defaultdict
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 LMI... | import sys
sys.setrecursionlimit(300000)
from collections import defaultdict
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 LMI... | [["-", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["-", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 565 |
NTEST = 26
D=int(input())
C=list(map(int,input().split()))
SL=list()
SL.append([0 for i in range(NTEST)])
for d in range(D):
S=list(map(int,input().split()))
SL.append(S)
tests=list()
tests.append(0)
for d in range(D):
tests.append(int(input()))
def calcSat(test_applied):
lastDay = [0 for i in rang... | NTEST = 26
D=int(input())
C=list(map(int,input().split()))
SL=list()
SL.append([0 for i in range(NTEST)])
for d in range(D):
S=list(map(int,input().split()))
SL.append(S)
tests=list()
tests.append(0)
for d in range(D):
tests.append(int(input()))
def calcSat(test_applied):
lastDay = [0 for i in rang... | [["-", 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 | 692 |
import sys
input=sys.stdin.readline
D=int(input())
c=list(map(int,input().split()))
s=[]
for i in range(D):
sub=list(map(int,input().split()))
s.append(sub)
t=[]
for i in range(D):
t.append(int(input()))
h=0
last=[-1]*26
for i in range(D):
h+=s[i][t[i]-1]
last[t[i]-1]=i
for j in range(26):
... | import sys
input=sys.stdin.readline
D=int(input())
c=list(map(int,input().split()))
s=[]
for i in range(D):
sub=list(map(int,input().split()))
s.append(sub)
t=[]
for i in range(D):
t.append(int(input()))
h=0
last=[-1]*26
for i in range(D):
h+=s[i][t[i]-1]
last[t[i]-1]=i
for j in range(26):
... | [["-", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22]] | 5 | 377 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
using ll = long long int;
const int C_NUM = 26;
const int D_MAX = 366;
int D;
ll c[C_NUM + 5];
ll s[D_MAX][C_NUM + 5];
int t[D_MAX];
multiset<int> last[C_NUM + 5];
const int M_MAX = 1E+05 + 5;
int d[M_MA... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
using ll = long long int;
const int C_NUM = 26;
const int D_MAX = 366;
int D;
ll c[C_NUM + 5];
ll s[D_MAX][C_NUM + 5];
int t[D_MAX];
set<int> last[C_NUM + 5];
const int M_MAX = 1E+05 + 5;
int d[M_MAX];
i... | [["-", 36, 36, 0, 30, 0, 43, 39, 344, 141, 78], ["+", 36, 36, 0, 30, 0, 43, 39, 344, 141, 78], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22]] | 1 | 557 |
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for i in range(D)]
t = [int(input()) for i in range(D)]
last = [[-1] for i in range(26)]
# before query
ans = 0
for i in range(D):
op = t[i]-1
ans += s[i][op]
last[op].append(i)
for j in range(26):
ans -= c... | D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for i in range(D)]
t = [int(input()) for i in range(D)]
last = [[-1] for i in range(26)]
# before query
ans = 0
for i in range(D):
op = t[i]-1
ans += s[i][op]
last[op].append(i)
for j in range(26):
ans -= c... | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 662, 12, 657, 31, 206, 51, 206, 206, 22], ["+", 0, 662, 12, 657, 31, 206, 51, 206, 206, 22], ["-", 12, 657, 31, 657, 12, 206, 51, 206, 206, 22], ["+", 12, 657, 31, 657, 12, 206, 51, 206, 206, 22], ["-", 12, 657, 31,... | 5 | 507 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int d;
cin >> d;
const int n = 26;
vector<int> c(n);
vector<vector<int>> s(d, vector<int>(n));
rep(i, n) cin >> c[i];
rep(i, d) rep(j, n) cin ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int d;
cin >> d;
const int n = 26;
vector<int> c(n);
vector<vector<int>> s(d, vector<int>(n));
rep(i, n) cin >> c[i];
rep(i, d) rep(j, n) cin ... | [["-", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 316 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < n; i++)
#define Rep(i, m, n) for (long long i = m; i < n; i++)
#define REP(i, m, n, p) for (long long i = m; i < n; i += p)
#define all(v) v.begin(), v.end()
#define pq priority_queue
#define bcnt(n) __builtin_popcountll(n)
const... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < n; i++)
#define Rep(i, m, n) for (long long i = m; i < n; i++)
#define REP(i, m, n, p) for (long long i = m; i < n; i += p)
#define all(v) v.begin(), v.end()
#define pq priority_queue
#define bcnt(n) __builtin_popcountll(n)
const... | [["-", 8, 9, 0, 1, 0, 11, 12, 11, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 6,019 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
constexpr int N = 26;
int D;
cin >> D;
int c[N];
for (auto &c_ : c) {
cin >> c_;
}
int s[D][N];
for (auto &s_ : s) {
for (auto &s__ : s_) {
cin >> s__;
}
}
int t[D];
for (auto &t_ : t) {
cin >> t_;
}
{
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
constexpr int N = 26;
int D;
cin >> D;
int c[N];
for (auto &c_ : c) {
cin >> c_;
}
int s[D][N];
for (auto &s_ : s) {
for (auto &s__ : s_) {
cin >> s__;
}
}
int t[D];
for (auto &t_ : t) {
cin >> t_;
}
{
... | [["-", 8, 9, 0, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 9, 0, 7, 8, 9, 0, 9, 0, 46]] | 1 | 247 |
a = int(input())
print(a*(1+a(1+a))) | a = int(input())
print( a*(1+a*(1+a)) ) | [["+", 0, 657, 12, 23, 0, 657, 12, 657, 17, 48]] | 5 | 23 |
#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;
}
| [["-", 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 | 35 |
#include <iostream>
int main() {
int a = 0;
int Calc = 0;
std::cin >> a;
Calc = a * (a * a) + (a * a * a);
std::cout << Calc;
return 0;
} | #include <iostream>
int main() {
int a = 0;
int Calc = 0;
std::cin >> a;
Calc = a + (a * a) + (a * a * a);
std::cout << Calc;
return 0;
} | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72]] | 1 | 51 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int a = sc.nextInt();
System.out.println(a * (a * (a + 1)));
}
}
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int a = sc.nextInt();
System.out.println(a * (a * (a + 1) + 1));
}
}
| [["+", 3, 4, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 12, 499]] | 3 | 64 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48]] | 1 | 812 |
num = int(input())
print(num + num * mum + num ** 3) | num = int(input())
print(num + num ** 2 + num ** 3) | [["-", 3, 4, 0, 657, 31, 657, 12, 657, 17, 48], ["-", 3, 4, 0, 657, 31, 657, 12, 657, 12, 22], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 12, 612]] | 5 | 20 |
#if __has_include("debug.h")
#include "debug.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define d(...) 2;
#endif
#define int long long int
#define fast \
ios_base::sync_with_stdio(0); \
cin... | #if __has_include("debug.h")
#include "debug.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define d(...) 2;
#endif
#define int long long int
#define fast \
ios_base::sync_with_stdio(0); \
cin... | [["+", 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 | 161 |
a = int(input())
ans = a+a*2+a*3
print(ans)
| a = int(input())
ans = a+a**2+a**3
print(ans)
| [["-", 0, 662, 12, 657, 31, 657, 12, 657, 17, 48], ["+", 0, 662, 12, 657, 31, 657, 12, 657, 17, 578], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 578]] | 5 | 23 |
#include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
const int INF = 0x7fffffff;
us... | #include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
const int INF = 0x7fffffff;
us... | [["+", 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 | 103 |
a=gets.to_i
p a+a+a*a+a*a*a | a=gets.to_i
p a+a*a+a*a*a | [["-", 0, 652, 3, 4, 0, 738, 31, 738, 17, 72], ["-", 3, 4, 0, 738, 31, 738, 12, 738, 31, 22]] | 4 | 19 |
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, 31, 657, 17, 140], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 140], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 578]] | 5 | 23 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int ans = a + (int)Math.pow(a, 2) + (int)Math.pow(10, 3);
System.out.println(ans);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int ans = a + (int)Math.pow(a, 2) + (int)Math.pow(a, 3);
System.out.println(ans);
}
} | [["-", 51, 16, 12, 74, 51, 492, 3, 4, 0, 499], ["+", 51, 16, 12, 74, 51, 492, 3, 4, 0, 22]] | 3 | 82 |
#include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d", &a);
b = 1;
for (int i = 0; i < a; i++) {
b = b * a;
c = b * a;
}
printf("%d\n", a + b + c);
return 0;
}
| #include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d", &a);
b = 1;
for (int i = 0; i < 2; i++) {
b = b * a;
c = b * a;
}
printf("%d\n", a + b + c);
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 75 |
num=int(input())
print(a+a*a+a*a*a) | a=int(input())
print(a+a*a+a*a*a) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 22 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int ans, n, m;
cin >> n;
m = n * n;
ans = n + m + m * n;
cout << n << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans, n, m;
cin >> n;
m = n * n;
ans = n + m + m * n;
cout << ans << endl;
} | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 45 |
#include <stdio.h>
int main(void) {
int s;
scanf("%d", s);
printf("%d", s * s * s + s * s + s);
return 0;
} | #include <stdio.h>
int main(void) {
int s;
scanf("%d", &s);
printf("%d", s * s * s + s * s + s);
return 0;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 43 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(v) v.begin(), v.end()
int main() {
ll a;
cin >> a;
cout << a * (1 + a + a ^ 2) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(v) v.begin(), v.end()
int main() {
ll a;
cin >> a;
cout << a * (1 + a + a * a) << endl;
}
| [["-", 31, 16, 12, 16, 12, 23, 0, 16, 17, 140], ["-", 31, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 12, 23, 0, 16, 12, 16, 12, 22]] | 1 | 47 |
#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
using Int = long long;
const char newl = '\n';
// INSERT ABOVE HERE
signed main() {... | #include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
using Int = long long;
const char newl = '\n';
// INSERT ABOVE HERE
signed main() {... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13]] | 1 | 389 |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
System.out.println(x + x * x + Math.pow(x, 3));
}
}
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
System.out.println(x + x * x + (int)Math.pow(x, 3));
}
}
| [["+", 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 | 69 |
#include <stdio.h>
int main() {
int a;
scanf("%d", a);
printf("%d\n", a + a * a + a * a * a);
return 0;
} | #include <stdio.h>
int main() {
int a;
scanf("%d", &a);
printf("%d", a + a * a + a * a * a);
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 43 |
def sep():
return map(int,input().strip().split(" "))
def lis():
return list(sep())
n=int(input())
print(n* n*n + n*n*n)
| def sep():
return map(int,input().strip().split(" "))
def lis():
return list(sep())
n=int(input())
print(n + n*n + n*n*n)
| [["-", 3, 4, 0, 657, 31, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72]] | 5 | 59 |
import sys
a = int(input())
print('hello')
print(a + a * a + a * a * a)
| import sys
a = int(input())
print('hello', file=sys.stderr)
print(a + a * a + a * a * a)
| [["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 319, 500, 22], ["+", 0, 652, 3, 4, 0, 653, 51, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 653, 51, 319, 319, 22]] | 5 | 30 |
#include <bits/stdc++.h>
using namespace std;
#define pb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define ll long long
#define pii pair<int, int>
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int a;
cin >> a;
cout << 1 + a * a + a * a * a... | #include <bits/stdc++.h>
using namespace std;
#define pb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define ll long long
#define pii pair<int, int>
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int a;
cin >> a;
cout << a + a * a + a * a * a... | [["-", 0, 1, 0, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 31, 22]] | 1 | 78 |
a=int(input())
print(a+a*2+a**3) | a=int(input())
print(a+a**2+a**3) | [["-", 3, 4, 0, 657, 31, 657, 12, 657, 17, 48], ["+", 3, 4, 0, 657, 31, 657, 12, 657, 17, 578]] | 5 | 20 |
$a = fgets(STDIN);
echo $a+$a*$a+$a*$a*$a; | <?php
$a = 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 | 27 |
a = input()
my_result = a + a**2 + a**3
print(my_result) | a = int(input())
my_result = a + a**2 + a**3
print(my_result) | [["+", 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 <stdio.h>
int main() {
int a, b;
scanf("%d", &a);
b = a + a * a + a * a * a;
printf("%d", a);
return 0;
} | #include <stdio.h>
int main() {
int a, b;
scanf("%d", &a);
b = a + a * a + a * a * a;
printf("%d", b);
return 0;
} | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 49 |
#include <math.h>
#include <stdio.h>
#define ll long long
int main() {
ll int a;
// ll int b;
scanf("%lld", &a);
printf("lld", a + (a * a) + (a * a * a));
return 0;
} | #include <math.h>
#include <stdio.h>
#define ll long long
int main() {
ll int a;
// ll int b;
scanf("%lld", &a);
printf("%lld", 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]] | 0 | 54 |
a =int(input())
print(a+a**2+2**3) | a = int(input())
print(a+a**2+a**3) | [["-", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 22]] | 5 | 20 |
va = gets.chomp.to_i
puts a + a**2 + a**3 | a = gets.chomp.to_i
puts a + a**2 + a**3 | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22]] | 4 | 17 |
#include <stdio.h>
int main(void) {
int a;
printf("a");
scanf("%d", &a);
printf("%d\n", a + a * a + a * a * a);
return 0;
} | #include <stdio.h>
int main(void) {
int a;
printf("");
scanf("%d", &a);
printf("%d\n", a + a * a + a * a * a);
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 52 |
a = gets
puts a + a*a + a*a*a | a = gets.to_i
puts a + a*a + a*a*a | [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 15 |
ソースコード
Copy
Copy
def a172(a):
return a + a**2 + a**3
def main():
a = int(input())
print(a172(a))
if __name__ == '__main__':
main() | def a172(a):
return a + a**2 + a**3
def main():
a = int(input())
print(a172(a))
if __name__ == '__main__':
main() | [["-", 36, 36, 36, 36, 0, 656, 0, 1, 0, 22]] | 5 | 49 |
#include <stdio.h>
int main(void) {
int a;
scanf("%d", a);
printf("%d", a + a * a + a * a * a);
return 0;
} | #include <stdio.h>
int main(void) {
int a;
scanf("%d", &a);
printf("%d", a + a * a + a * a * a);
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 43 |
a = gets.to_i
p (a + a ** 2 + a ** 32).to_i
| a = gets.to_i
p (a + a ** 2 + a ** 3).to_i
| [["-", 0, 652, 486, 739, 0, 738, 12, 738, 12, 612], ["+", 0, 652, 486, 739, 0, 738, 12, 738, 12, 612]] | 4 | 19 |
a = int(input())
class calculate:
def __init__(self,a):
self.check = a
def get_ans(self,a):
return a + a**2 + a**3
valuable = calculate(a)
#Sprint(valuable.check)
ans = valuable.get_ans(10)
print(ans) | a = int(input())
class calculate:
def __init__(self,a):
self.check = a
def get_ans(self,a):
return a + a**2 + a**3
valuable = calculate(a)
#Sprint(valuable.check)
ans = valuable.get_ans(a)
print(ans) | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 61 |
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int sum = 0;
sum = sum + pow(n, 2) + pow(n, 3);
cout << sum << "\n";
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int sum = 0;
sum = n + pow(n, 2) + pow(n, 3);
cout << sum << "\n";
} | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22]] | 1 | 52 |
#include <stdio.h>
int main(void) {
int a, b;
scanf("%d", &a);
b = a + a * a + a * a * a;
printf("%d", &b);
} | #include <stdio.h>
int main(void) {
int a, b;
scanf("%d", &a);
b = a + a * a + a * a * a;
printf("%d", b);
} | [["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 48 |
#include <stdio.h>
int main(void) {
int a, sum;
scanf("%d", a);
sum = a + a * a + a * a * a;
printf("%d", sum);
}
| #include <stdio.h>
int main(void) {
int a, sum;
scanf("%d", &a);
sum = a + a * a + a * a * a;
printf("%d", sum);
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 0 | 46 |
a = int(input)
ans = a + a*a + a*a*a
print(ans) | a = int(input())
ans = a + a*a + a*a*a
print(ans) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 23 |
#include <bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) {
return b > a && (a = b, true);
}
template <class A, class B> inline bool chmin(A &a, const B &b) {
return b < a && (a = b, true);
}
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> p... | #include <bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) {
return b > a && (a = b, true);
}
template <class A, class B> inline bool chmin(A &a, const B &b) {
return b < a && (a = b, true);
}
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> p... | [["+", 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 | 257 |
#https://atcoder.jp/contests/abc172/tasks/abc172_a
a= int(input("a::"))
print(a+ pow(a, 2)+ pow(a, 3))
| #https://atcoder.jp/contests/abc172/tasks/abc172_a
a= int(input("\n"))
print(a+ pow(a, 2)+ pow(a, 3))
| [["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 557, 0, 6, 0, 44]] | 5 | 30 |
import sys
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)]
de... | import sys
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)]
de... | [["+", 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 | 258 |
#include <stdio.h>
int main() {
int x, y;
scanf("%d", &x);
y = (x * x) + (x * x * x) + (x);
printf("%d/n", y);
return 0;
} |
#include <stdio.h>
int main() {
int x, y;
scanf("%d", &x);
y = (x * x) + (x * x * x) + (x);
printf("%d", y);
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 55 |
/*
ID: samarth10
LANG: C++11
TASK:
*/
#include <bits/stdc++.h>
using namespace std;
void setIO(string name) {
ios_base::sync_with_stdio(0);
cin.tie(0);
freopen((name + ".in").c_str(), "r", stdin);
freopen((name + ".out").c_str(), "w", stdout);
}
int main() {
// setIO();
int t;
cin >> t;
cout << t * (... | /*
ID: samarth10
LANG: C++11
TASK:
*/
#include <bits/stdc++.h>
using namespace std;
void setIO(string name) {
ios_base::sync_with_stdio(0);
cin.tie(0);
freopen((name + ".in").c_str(), "r", stdin);
freopen((name + ".out").c_str(), "w", stdout);
}
int main() {
// setIO();
int t;
cin >> t;
cout << t * (... | [["-", 0, 16, 12, 16, 12, 23, 0, 16, 17, 140], ["-", 0, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 12, 23, 0, 16, 12, 16, 12, 22]] | 1 | 99 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
double i = Double.parseDouble(a);
int sum = 0;
for (double j = 1; j <= 3; j++) {
sum = (int)Math.pow(i, j);
}
System.out.println(sum);... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
double i = Double.parseDouble(a);
int sum = 0;
for (double j = 1; j <= 3; j++) {
sum += (int)Math.pow(i, j);
}
System.out.println(sum)... | [["-", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 107]] | 3 | 98 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
System.out.println((int)a + Math.pow(a, 2) + Math.pow(a, 3));
}
}
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
System.out.println((int)(a + Math.pow(a, 2) + Math.pow(a, 3)));
}
}
| [["+", 0, 492, 3, 4, 0, 74, 51, 23, 0, 24], ["+", 51, 23, 0, 16, 12, 492, 3, 4, 0, 25]] | 3 | 74 |
<?php
fscanf(STDIN, "%d", $a);
$ans = $a + pow(2, 2) + pow(2, 3);
echo $ans; | <?php
fscanf(STDIN, "%d", $a);
$ans = $a + pow($a, 2) + pow($a, 3);
echo $ans; | [["-", 31, 16, 12, 613, 3, 3, 0, 28, 0, 612], ["+", 12, 613, 3, 3, 0, 28, 0, 606, 0, 607], ["+", 12, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["-", 12, 16, 12, 613, 3, 3, 0, 28, 0, 612]] | 6 | 37 |
a = int(input())
ans = a+a*a+a*a*a
return ans
| a = int(input())
ans = a+a*a+a*a*a
print(ans) | [["-", 36, 36, 36, 36, 0, 656, 0, 37, 0, 38], ["+", 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, 25]] | 5 | 23 |
#include <stdio.h>
int calc(int a) { return a + a ^ 2 + a ^ 3; }
int main(void) {
int a, ans;
scanf("%d", &a);
ans = calc(a);
printf("%d", ans);
return 0;
} | #include <stdio.h>
int calc(int a) { return a + a * a + a * a * a; }
int main(void) {
int a, ans;
scanf("%d", &a);
ans = calc(a);
printf("%d", ans);
return 0;
} | [["-", 8, 9, 0, 37, 0, 16, 31, 16, 17, 140], ["-", 0, 37, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 37, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 37, 0, 16, 31, 16, 12, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 140], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 12, 13], ["+", 0, 37, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 3... | 0 | 62 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
int rpta = a++;
rpta *= a;
rpta++;
rpta *= a;
cout << rpta << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
int rpta = a + 1;
rpta *= a;
rpta++;
rpta *= a;
cout << rpta << endl;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 27, 17, 29], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 42 |
function main(input) {
var a = Number(input[0]);
console.log(a + a ** 2 + a ** 3);
}
main(require("fs").readFileSync("/dev/stdin", "utf8")); | function main(input) {
var a = Number(input);
console.log(a + a ** 2 + a ** 3);
}
main(require("fs").readFileSync("/dev/stdin", "utf8")); | [["-", 0, 200, 51, 2, 3, 3, 0, 69, 0, 70], ["-", 0, 200, 51, 2, 3, 3, 0, 69, 71, 555], ["-", 0, 200, 51, 2, 3, 3, 0, 69, 0, 73]] | 2 | 54 |
#include <stdio.h>
int main(void) {
int a, s;
scanf("%d", &a);
s = a + a + a + a + a + a;
printf("%d", s);
return 0;
} | #include <stdio.h>
int main(void) {
int a, s;
scanf("%d", &a);
s = a + a * a + a * a * a;
printf("%d", s);
return 0;
} | [["-", 12, 16, 31, 16, 31, 16, 31, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 16, 12, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72], ["+", 0, 11, 12, 16, 12, 16, 31, 16, 17, 48], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48]] | 0 | 50 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;
int main() {
ll a;
cout << a + a * a + a * a * a << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;
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 | 50 |
#include <stdio.h>
int main(void) {
int a;
scanf("%d", &a);
if (1 <= a <= 10) {
printf("%d\n", a + a ^ 2 + a ^ 3);
} else {
printf("%s\n", "Error!");
}
}
| #include <stdio.h>
int main(void) {
int a;
scanf("%d", &a);
if (1 <= a <= 10) {
printf("%d\n", a + a * a + a * a * a);
} else {
printf("%s\n", "Error!");
}
}
| [["-", 0, 2, 3, 4, 0, 16, 31, 16, 17, 140], ["-", 3, 4, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 12, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 140], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, ... | 0 | 65 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int a;
cout << a + a * a + a * a * a << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < n; i++)
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 | 48 |
#include <stdio.h>
#include <stdlib.h>
typedef char String[1024];
int main(void) {
String instring;
scanf("%s", instring);
int num = atoi(instring);
int ans = num + num * num + num * num * num;
printf("%d", num);
return 0;
}
| #include <stdio.h>
#include <stdlib.h>
typedef char String[1024];
int main(void) {
String instring;
scanf("%s", instring);
int num = atoi(instring);
int ans = num + (num * num) + (num * num * num);
printf("%d", ans);
return 0;
} | [["+", 49, 50, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 65 |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(String.valueOf(n + n ^ 2 + n ^ 3));
}
} | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(String.valueOf(n + n * n + n * n * n));
}
} | [["-", 0, 492, 3, 4, 0, 16, 31, 16, 17, 140], ["-", 3, 4, 0, 16, 31, 16, 12, 16, 31, 499], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 12, 22], ["-", 3, 4, 0, 492, 3, 4, 0, 16, 17, 140], ["-", 3, 4, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 3, 4,... | 3 | 68 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD (ll)(1e9 + 7)
int main() {
ll n;
cin >> n;
ll res = n + pow(n, 2) + pow(3, n);
cout << res << "\n";
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MOD (ll)(1e9 + 7)
int main() {
ll n;
cin >> n;
ll res = n + pow(n, 2) + pow(n, 3);
cout << res << "\n";
}
| [["-", 49, 50, 51, 16, 12, 2, 3, 4, 0, 13], ["-", 49, 50, 51, 16, 12, 2, 3, 4, 0, 21], ["+", 49, 50, 51, 16, 12, 2, 3, 4, 0, 21], ["+", 49, 50, 51, 16, 12, 2, 3, 4, 0, 13]] | 1 | 55 |
#include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
cout << a << a * a << a * a * a;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
cout << (a + a * a + a * a * a);
return 0;
} | [["+", 8, 9, 0, 1, 0, 16, 12, 23, 0, 24], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 17, 72], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 1, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 16, 12, 23, 0, 25]] | 1 | 36 |
import java.io.*;
import java.util.*;
class Main {
Scanner in;
InputStream is;
PrintWriter out;
String INPUT = "";
//----------------------------------------------------------------------------------------------------//
void solve() throws IOException {
int t = 1;
t = ni();
while (t-- > 0) ... |
import java.io.*;
import java.util.*;
class Main {
Scanner in;
InputStream is;
PrintWriter out;
String INPUT = "";
//----------------------------------------------------------------------------------------------------//
void solve() throws IOException {
int t = 1;
// t = ni();
while (t-- > ... | [["-", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 11, 17, 32], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 25], ["-", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35]] | 3 | 812 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define b begin
#define e end
using namespace std;
int main() {
ll a;
cout << a + a * a + a * a * a;
} | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define b begin
#define e end
using namespace std;
int main() {
ll a;
cin >> a;
cout << a + a * a + a * a * a;
} | [["+", 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 | 41 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// String s = sc.next();
// long n = sc.nextLong();
// double n = sc.nextDouble();
// for(int i = 0; i < ; i++)
System.out.println(n + Mat... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// String s = sc.next();
// long n = sc.nextLong();
// double n = sc.nextDouble();
// for(int i = 0; i < ; i++)
System.out.println((int)(n... | [["+", 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 | 76 |
#include <iostream>
using namespace std;
int main() {
int a;
int square_a{};
int cube_a{};
square_a = a * a;
cube_a = a * a * a;
cout << a + square_a + cube_a << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
int square_a{};
int cube_a{};
square_a = a * a;
cube_a = a * a * a;
cout << a + square_a + cube_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 | 52 |
#include <bits/stdc++.h>
#define int long long
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;
typedef string str;
template <class T> using vec = vector<T>;
template <class T> using uset = unordered_set<T>;
template <class T, class S> using umap = unordered_map<T, S>;
template <class T> using pqueue ... | #include <bits/stdc++.h>
#define int long long
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;
typedef string str;
template <class T> using vec = vector<T>;
template <class T> using uset = unordered_set<T>;
template <class T, class S> using umap = unordered_map<T, S>;
template <class T> using pqueue ... | [["+", 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 | 193 |
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 == 's':
t = ri()
for i in range(t):
... | 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):
... | [["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6]] | 5 | 104 |
a=int(input())
t=1+a+a^2
print(t*a) | a=int(input())
t=1+a+a**2
print(t*a) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 140], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 578]] | 5 | 23 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#def... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#def... | [["+", 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 | 91 |
n = int(input())
print(n*pow(n, 2)*pow(n, 3)) | n = int(input())
print(n + pow(n, 2) + pow(n, 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 | 26 |
'use strict'
let x = require('fs').readFileSync('/dev/stdin', 'utf-8');
console.log(x + x * x + x * x * x);
| 'use strict'
let x = parseInt(require('fs').readFileSync('/dev/stdin', 'utf-8'));
console.log(x + x * x + x * x * x);
| [["+", 0, 493, 0, 570, 0, 200, 51, 2, 63, 22], ["+", 0, 570, 0, 200, 51, 2, 3, 3, 0, 24], ["+", 51, 2, 3, 3, 0, 2, 3, 3, 0, 25]] | 2 | 41 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
System.out.println((a) + (a ^ 2) + (a ^ 3));
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
System.out.println((a) + (a * a) + (a * a * a));
}
} | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 140], ["-", 0, 16, 31, 16, 12, 23, 0, 16, 12, 499], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 17, 140], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 12, 499], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["+"... | 3 | 67 |
def calc(int: a) -> int:
return a+a**2+a**3
if __name__ == "__main__":
a = int(input())
print(calc(a)) | def calc(a: int) -> int:
return a+a**2+a**3
if __name__ == "__main__":
a = int(input())
print(calc(a)) | [["-", 0, 656, 0, 14, 54, 54, 0, 708, 0, 22], ["-", 0, 656, 0, 14, 54, 54, 0, 708, 0, 102], ["+", 0, 656, 0, 14, 54, 54, 0, 708, 0, 102], ["+", 0, 14, 54, 54, 0, 708, 39, 39, 0, 22]] | 5 | 42 |
#include <stdio.h>
int main(void) {
int a, answer;
scanf("%d", &a);
answer = a + a * a + a * a * a;
printf("%d", a);
return 0;
} | #include <stdio.h>
int main(void) {
int a, answer;
scanf("%d", &a);
answer = a + a * a + a * a * a;
printf("%d", answer);
return 0;
}
| [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 50 |
a = int(inut())
print(a**3+a**2+a) | a = int(input())
print(a**3+a**2+a)
| [["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22]] | 5 | 20 |
// inputに入力データ全体が入る
function Main(input) {
var ans = 0
// 1行目がinput[0], 2行目がinput[1], …に入る
input = input.trim().split("\n")
// var arr = input.trim().split("\n")
// var n = input[0].split(' ').map(n => parseInt(n))
var i = parseInt(input)
ans = i + (i * 2) + (i * i * i)
//出力
console.log(ans)
}
//*この行... | // inputに入力データ全体が入る
function Main(input) {
var ans = 0
// 1行目がinput[0], 2行目がinput[1], …に入る
input = input.trim().split("\n")
// var arr = input.trim().split("\n")
// var n = input[0].split(' ').map(n => parseInt(n))
var i = parseInt(input)
ans = i + (i * i) + (i * i * i)
//出力
console.log(ans)
}
//*この行... | [["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 555], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22]] | 2 | 83 |
#include <iostream>
using namespace std;
int main() {
int a;
cout << a + a * a + a * a * a;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
cout << a + a * a + a * a * a;
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 | 32 |
a = getc.to_i
puts (a) + (a ** 2) + (a ** 3) | a = gets.to_i
puts (a) + (a ** 2) + (a ** 3) | [["-", 36, 36, 0, 493, 0, 662, 12, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 486, 22]] | 4 | 21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.