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>
#define ll long long
#define arena \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
int main() {
ll x;
cin >> x;
for (ll i = 0; i <= 3900; i++) {
f... | #include <bits/stdc++.h>
#define ll long long
#define arena \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
using namespace std;
int main() {
ll x;
cin >> x;
for (ll i = 0; i <= 3900; i++) {
f... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 12, 91, 28, 22], ["+", 64, 9, 0, 1, 0, 16, 12, 91, 28, 22]] | 1 | 135 |
n = int(input())
for i in range(150):
for j in range(-20, i - 1):
if i ** 5 - j ** 5 == n:
print(i, j)
exit(0) | n = int(input())
for i in range(150):
for j in range(-75, i):
if i ** 5 - j ** 5 == n:
print(i, j)
exit(0) | [["-", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 50 |
#include <bits/stdc++.h>
#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll x;
cin >> x;
//... | #include <bits/stdc++.h>
#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll x;
cin >> x;
fo... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 150 |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) int(x.size())
#define Task "abc"
#define For(i, a, b) for (int i = (a), _b = (b); i <= b; ++i)
#define All(x) (x).begin(), (x).end()
#define mp make_pair
typedef unsigned long long ull;
typedef long long ll;
const int maxn = 1e5 + 10;
const int inf = 0x3f3f... | #include <bits/stdc++.h>
using namespace std;
#define sz(x) int(x.size())
#define Task "abc"
#define For(i, a, b) for (int i = (a), _b = (b); i <= b; ++i)
#define All(x) (x).begin(), (x).end()
#define mp make_pair
typedef unsigned long long ull;
typedef long long ll;
const int maxn = 1e5 + 10;
const int inf = 0x3f3f... | [["-", 0, 34, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 34, 31, 16, 31, 16, 31, 16, 12, 22]] | 1 | 423 |
X = int(input())
def solve():
for A in range(-118, 120):
for B in range(-119, 119):
if A*A*A*A*A - B*B*B*B*B == X or A*A*A*A*A + B*B*B*B*B == X:
print(A, B)
break
solve() | X = int(input())
def solve():
for A in range(-118, 120):
for B in range(-119, 119):
if A*A*A*A*A - B*B*B*B*B == X or A*A*A*A*A + B*B*B*B*B == X:
print(A, B)
return
solve() | [["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
#define GO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int lon... | #include <bits/stdc++.h>
using namespace std;
#define GO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int lon... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 123 |
#include <iostream>
int main() {
auto pow5 = [](int i) -> int64_t { return (int64_t)i * i * i * i * i; };
int n;
std::cin >> n;
for (int i = 0; i < 120; ++i) {
int64_t x = pow5(i);
for (int j = -120; j < i; ++j) {
int64_t y = pow5(j);
if (x - y == n) {
// std::cout << i << " " << j... | #include <iostream>
int main() {
auto pow5 = [](int i) -> int64_t { return (int64_t)i * i * i * i * i; };
int n;
std::cin >> n;
for (int i = 0; i < 120; ++i) {
int64_t x = pow5(i);
for (int j = -120; j < i; ++j) {
int64_t y = pow5(j);
if (x - y == n) {
std::cout << i << " " << j <<... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 123 |
x = int(input())
for i in range(-500,500):
for j in range(-500,500):
a = pow(i,5)
b = pow(j,5)
if(x == a - b):
print(a,b)
exit(0) | x = int(input())
for i in range(-500,500):
for j in range(-500,500):
a = pow(i,5)
b = pow(j,5)
if(x == a - b):
print(i,j)
exit(0)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 65 |
x = int(input())
judeg = 0
for i in range(-200,200):
for j in range(-200,200):
if(i**5-j**5==x):
print(i,j)
judge += 1
break
if(judge == 1):
break
| x = int(input())
judge = 0
for i in range(-200,200):
for j in range(-200,200):
if(i**5-j**5==x):
print(i,j)
judge += 1
break
if(judge == 1):
break
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 64 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll res[202];
int main() {
ll n, i, j;
cin >> n;
for (i = 1; i < 201; i++) {
res[i] = i * i * i * i * i;
}
for (i = 0; i < 201; i++) {
for (j = i + 1; j < 201; j++) {
if (abs(n - res[i]) == res[j]) {
if (res[i] < n)
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll res[202];
int main() {
ll n, i, j;
cin >> n;
for (i = 1; i < 201; i++) {
res[i] = i * i * i * i * i;
}
for (i = 0; i < 201; i++) {
for (j = 0; j < 201; j++) {
if (abs(n - res[i]) == res[j]) {
if (res[i] < n)
... | [["-", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 154 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
t... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
t... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 2,260 |
#include <bits/stdc++.h>
#include <chrono>
#include <sstream>
#define ll long long int
#include <stdlib.h>
#include <vector>
#define pi acos(-1)
#define maxm 100005
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x>::min()
/... | #include <bits/stdc++.h>
#include <chrono>
#include <sstream>
#define ll long long int
#include <stdlib.h>
#include <vector>
#define pi acos(-1)
#define maxm 100005
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x>::min()
/... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1,... | 1 | 934 |
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class... | #include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, ... | 1 | 278 |
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int X;
int A, B;
cin >> X;
for (A = 0; A < 73; A++) {
for (B = -73; B < 73; B++) {
if ((pow(A, 5) + pow(B, 5)) == X) {
goto end;
}
}
}
end:
cout << A << " " << B << endl;
return 0;
}
| #include <cmath>
#include <iostream>
using namespace std;
int main() {
long X;
long A, B;
cin >> X;
for (A = 0; A < 128; A++) {
for (B = -128; B < 128; B++) {
if ((pow(A, 5) - pow(B, 5)) == X) {
goto end;
}
}
}
end:
cout << A << " " << B << endl;
return 0;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, ... | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long x;
cin >> x;
for (long long i = -1000; i <= 1000; i++) {
for (long long j = -1000; j <= 1000; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
cout << i << ' ' << j * -1 << '\n';
return 0;
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long x;
cin >> x;
for (long long i = -1000; i <= 1000; i++) {
for (long long j = -1000; j <= 1000; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
cout << i << ' ' << j << '\n';
return 0;
}
}
}
} | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 93 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> i... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 206 |
import sympy
X=int(input())
flg=False
for A in range(-118,119):
for B in range(-118,119):
if A**5-B**5==X:
print(str(A)+" "+str(B))
flg=True
break
if flg:
break
| X=int(input())
flg=False
for A in range(-120,120):
for B in range(-120,120):
if A**5-B**5==X:
print(str(A)+" "+str(B))
flg=True
break
if flg:
break
| [["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["... | 5 | 70 |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(fals... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(fals... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 150 |
import java.math.*;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
private static final int MAXN = 212;
public static void main(String[] args) {
var scanner = new Scanner(System.in);
int x = scanner.nextInt();
var data = new Long[MAXN + 1];
for (int i = -MAXN; i <= MAX... | import java.math.*;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
private static final int MAXN = 212;
public static void main(String[] args) {
var scanner = new Scanner(System.in);
int x = scanner.nextInt();
var data = new Long[2 * MAXN + 1];
for (int i = -MAXN; i <=... | [["+", 51, 227, 497, 505, 0, 16, 31, 16, 31, 499], ["+", 51, 227, 497, 505, 0, 16, 31, 16, 17, 48]] | 3 | 187 |
x = int(input())
for a in range(126):
for b in range(-126, 126):
if x == 0: continue
if x == a ** 5 - b ** 5:
print(a, b)
| x = int(input())
for a in range(126):
for b in range(-126, 126):
if x == 0: continue
if x == a ** 5 - b ** 5:
print(a, b)
exit()
| [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 50 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, x) for (int i = 0; i < x; i++)
#define put(ans) cout << ans << endl;
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
//最大公約数
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
//最小公倍数
ll lcm(ll ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, x) for (int i = 0; i < x; i++)
#define put(ans) cout << ans << endl;
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
//最大公約数
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
//最小公倍数
ll lcm(ll ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33]] | 1 | 241 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
set<long long> s1;
const long long MAXN = 3e5 + 5;
long long obs[MAXN];
long long h[MAXN];
vector<long long> v1;
long long ans;
int main() {
long long x;
cin >> x;
long long curr = 1;
v1.push_back(0);
while (true) {
long long hold = curr *... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
set<long long> s1;
const long long MAXN = 3e5 + 5;
long long obs[MAXN];
long long h[MAXN];
vector<long long> v1;
long long ans;
int main() {
long long x;
cin >> x;
long long curr = 1;
v1.push_back(0);
while (true) {
long long hold = curr *... | [["-", 31, 16, 31, 16, 31, 16, 12, 91, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 91, 17, 33]] | 1 | 223 |
#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() {
ll X;
cin >> X;
for (int i = -200; i < 200; i++) {
bool judge = false;
for (int j = -200; j < 200; j++) {
ll A = i * i * i * i * i;
ll B ... | #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() {
ll X;
cin >> X;
for (ll i = -200; i < 200; i++) {
bool judge = false;
for (ll j = -200; j < 200; j++) {
ll A = i * i * i * i * i;
ll B = ... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 143 |
# D
import math
X = int(input())
B = -math.floor(math.pow(X, 0.2))
for b in range(B, 1000):
a = int(math.pow(X + b ** 5, 0.2))
if a ** 5 - b ** 5 == X:
break
tmp = int(tmp)
print(a, b) | # D
import math
X = int(input())
B = -math.floor(math.pow(X, 0.2))
for b in range(B, 1000):
a = int(math.pow(X + b ** 5, 0.2))
if a ** 5 - b ** 5 == X:
break
print(a, b) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 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, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 78 |
def a5b5(X):
for i in range(0,6):
for j in range(-1000, 1000):
if (i**5 - j**5 == X):
print(i, j)
return
X = int(input())
A = 0
B = 0
a = a5b5(X)
| def a5b5(X):
for i in range(1000):
for j in range(-1000, 1000):
if (i**5 - j**5 == X):
print(i, j)
return
X = int(input())
A = 0
B = 0
a = a5b5(X)
| [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 67 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long X;
cin >> X;
for (long long A = -10000; A <= 100000; A++) {
if (X == 0)
break;
for (long long B = -10000; B <= 10000; B++) {
if (A * A * A * A * A - B * B * B * B * B == X) {
cout << A << ' ' << B << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long X;
cin >> X;
for (long long A = -1000; A <= 1000; A++) {
if (X == 0)
break;
for (long long B = -1000; B <= 1000; B++) {
if (A * A * A * A * A - B * B * B * B * B == X) {
cout << A << ' ' << B << endl;
X = 0... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 109 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#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 x;
cin >> x;
for (int a = -120; a <= 119; a++) {
for (int b = 119; b <= 119; b++) {
if (a * a * a * a * a + b * b * b * ... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#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 x;
cin >> x;
for (int a = -120; a <= 119; a++) {
for (int b = 0; b <= 119; b++) {
if (a * a * a * a * a + b * b * b * b ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 120 |
// created_by Rishi_Mohan
#include <bits/stdc++.h>
#define ll long long
#define db1(x) cout << #x << "=" << x << '\n'
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n'
#define db3(x, y, z) \
cout << #x << "=" << x << "," << #y << "="... | // created_by Rishi_Mohan
#include <bits/stdc++.h>
#define ll long long
#define db1(x) cout << #x << "=" << x << '\n'
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n'
#define db3(x, y, z) \
cout << #x << "=" << x << "," << #y << "="... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40]] | 1 | 166 |
# ABC 166 D - I hate Factorization
# https://atcoder.jp/contests/abc166/tasks/abc166_d
# AC
# https://atcoder.jp/contests/abc166/submissions/12757667
x = gets.chomp.to_i
h = {}
(120..120).each do |i|
h[i] = i ** 5
h[-i] = - h[i]
end
def search(x, h)
(-120..120).to_a.each do |a|
(-120..120).to_a.each do |b... | x = gets.chomp.to_i
h = {}
(0..120).each do |i|
h[i] = i ** 5
h[-i] = - h[i]
end
def search(x, h)
(-120..120).to_a.each do |a|
(-120..120).to_a.each do |b|
return [a, b] if h[a] - h[b] == x
end
end
return nil
end
ab = search(x, h)
raise if ab.nil?
puts ab.map(&:to_s).join(' ')
| [["-", 0, 493, 0, 652, 486, 739, 0, 475, 756, 612], ["+", 0, 493, 0, 652, 486, 739, 0, 475, 756, 612]] | 4 | 132 |
#include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define ll long long
double pow1(double x, double a = 1.0 / 5) { return pow(x, a); }
int main() {
int x;
cin >> x;
int f = 0;
for (int i = 0; i <= 100; i++) {
for (int j = -100; j <= 100; j++) {
ll t = pow(i, 5) + pow(j, 5... | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define ll long long
double pow1(double x, double a = 1.0 / 5) { return pow(x, a); }
int main() {
int x;
cin >> x;
int f = 0;
for (int i = 0; i <= 125; i++) {
for (int j = -125; j <= 125; j++) {
ll t = pow(i, 5) - pow(j, 5... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, ... | 1 | 135 |
#include <stdio.h>
#include <string.h>
int main(void) {
unsigned long int a, b, x;
long long int a5, b5;
scanf("%ld", &x);
for (int i = -200; i < 200; i++) {
for (int j = -200; j < 200; j++) {
a5 = i * i * i * i * i;
b5 = j * j * j * j * j;
if (x == (a5 - b5)) {
printf("%d %d", ... | #include <stdio.h>
#include <string.h>
int main(void) {
unsigned long int a, b, x;
long long int a5, b5;
scanf("%ld", &x);
for (long long int i = -200; i < 200; i++) {
for (long long int j = -200; j < 200; j++) {
a5 = i * i * i * i * i;
b5 = j * j * j * j * j;
if (x == (a5 - b5)) {
... | [["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 122 |
x = gets.to_i
400.times{|a|
aa = a-200
a5 = aa**5
400.times{|b|
bb = b-200
b5 = bb**5
if(a5 - b5 == x) then
puts("#{a} #{b}")
exit(0)
end
}
}
| x = gets.to_i
400.times{|a|
aa = a-200
a5 = aa**5
400.times{|b|
bb = b-200
b5 = bb**5
if(a5 - b5 == x) then
puts("#{aa} #{bb}")
exit(0)
end
}
}
| [["-", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22]] | 4 | 67 |
X=int(input())
for i in range(-118,120):
for j in range(-119,119):
if i**5-(j)**5==X:
print(i,j,sep=" ")
break | X=int(input())
for i in range(-118,120):
for j in range(-119,119):
if i**5-(j)**5==X:
print(i,j,sep=" ")
break
else:
continue
break | [["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 102], ["+", 0, 7, 75, 76, 8, 196, 0, 116, 0, 117], ["+", 0, 656, 0, 7, 8, 196, 0, 93, 0, 94]] | 5 | 56 |
//----------------------------------------------------------------------
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
//----------------------------------------------------------------------
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vecto... | //----------------------------------------------------------------------
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
//----------------------------------------------------------------------
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vecto... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
for (int q = -200; q <= 200; q++) {
for (int w = -200; w <= 200; w++) {
if (q * q * q * q * q - w * w * w * w * w == x) {
cout << q << " " << w;
return 0;
}
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
for (ll q = -200; q <= 200; q++) {
for (ll w = -200; w <= 200; w++) {
if (q * q * q * q * q - w * w * w * w * w == x) {
cout << q << " " << w;
return 0;
}
}
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
for (int i = -200; i < 200; i++) {
for (int j = -200; j < 200; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << endl;
i = 200;
break;
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int x;
cin >> x;
for (long long int i = -200; i < 200; i++) {
for (long long int j = -200; j < 200; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << endl;
i = 200;
break;
... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]] | 1 | 95 |
#
# ⋀_⋀
# (・ω・)
# ./ U ∽ U\
# │* 合 *│
# │* 格 *│
# │* 祈 *│
# │* 願 *│
# │* *│
#  ̄
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないyp
from heapq import heappop, heappush, heappushpop
from collections import Counter,default... | #
# ⋀_⋀
# (・ω・)
# ./ U ∽ U\
# │* 合 *│
# │* 格 *│
# │* 祈 *│
# │* 願 *│
# │* *│
#  ̄
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないyp
from heapq import heappop, heappush, heappushpop
from collections import Counter,default... | [["+", 0, 1, 0, 652, 3, 4, 0, 664, 17, 33]] | 5 | 581 |
def main():
x = int(input())
#-118<=A<=119, -119<=B<=118
for a in range(-188, 200):
for b in range(-199, 118):
if pow(a, 5) - pow(b, 5) == x:
print(a, b)
break
if __name__ == '__main__':
main()
| def main():
x = int(input())
#-118<=A<=119, -119<=B<=118
for a in range(-188, 200):
for b in range(-199, 118):
if pow(a, 5) - pow(b, 5) == x:
print(a, b)
break
else:
continue
break
if __name__ == '__main__':
main()
| [["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 102], ["+", 0, 7, 75, 76, 8, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 7, 8, 196, 0, 93, 0, 94]] | 5 | 70 |
#include <bits/stdc++.h>
#define FOR(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for (int(i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define rFORe(i, a, n) for (int(i) = (int)(n); (i) >= (int)(a); --(i))
#define REP(i,... | #include <bits/stdc++.h>
#define FOR(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for (int(i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define rFORe(i, a, n) for (int(i) = (int)(n); (i) >= (int)(a); --(i))
#define REP(i,... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 378 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define pb push_back
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define fi first
#define se second
#define endl "\n"
#define all... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define pb push_back
#define ll long long int
#define ull unsigned long long int
#define ld long double
#define fi first
#define se second
#define endl "\n"
#define all... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 306 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> void debug(string t, T input) {
cout << t << "-> " << input << "\n";
}
template <typename T> void debug(int i, string t, T input) {
cout << "Case#" << i << " " << t << "-> " << input << "\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0)... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void debug(string t, T input) {
cout << t << "-> " << input << "\n";
}
template <typename T> void debug(int i, string t, T input) {
cout << "Case#" << i << " " << t << "-> " << input << "\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0)... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40]] | 1 | 200 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define INF 0x3f3f3f3f
const int N = 2e5 + 5;
const ll mod = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
ll x;
cin >> x;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1000... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define INF 0x3f3f3f3f
const int N = 2e5 + 5;
const ll mod = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
ll x;
cin >> x;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1000... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ios \
ios_base::sync_with_stdio(false); \
cout.tie(0); \
cin.... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ios \
ios_base::sync_with_stdio(false); \
cout.tie(0); \
cin.... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 449 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long x;
cin >> x;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1; j <= 1000; j++) {
long long a = pow(i, 5);
long long b = pow(j, 5);
if (a - b == x) {
cout << i << " " << j << endl;
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long x;
cin >> x;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1000; j <= 1000; j++) {
long long a = pow(i, 5);
long long b = pow(j, 5);
if (a - b == x) {
cout << i << " " << j << endl;
return 0;
}
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 99 |
#include <algorithm>
#include <cmath>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
long long x;
... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
long long x;
... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40]] | 1 | 119 |
// author: zekigurbuz (Zeki Gurbuz) 2020
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define all(x) begin(x), end(x)
const int N = 1e5 + 10;
const... | // author: zekigurbuz (Zeki Gurbuz) 2020
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define all(x) begin(x), end(x)
const int N = 1e5 + 10;
const... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0... | 1 | 307 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define xx first
#define yy second
#define vi vector<int>
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
#define MAX 400005
vector<ll> h(MAX), g[MAX];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define xx first
#define yy second
#define vi vector<int>
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
#define MAX 400005
vector<ll> h(MAX), g[MAX];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 159 |
x = int(input())
for a in range(-300,301):
for b in range(-300,301):
if(a**5-b**5==x):
print(a,b)
break
| x = int(input())
for a in range(-300,301):
for b in range(-300,301):
if(a**5-b**5==x):
print(a,b)
break
else : continue
break
| [["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 102], ["+", 0, 7, 75, 76, 8, 196, 0, 116, 0, 117], ["+", 0, 656, 0, 7, 8, 196, 0, 93, 0, 94]] | 5 | 50 |
/*input
1
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, j, n) for (i = j; i < n; i++)
#define repi(i, j, n) for (i = j; i > n; i--)
#define inf 100001
#define M 1000000007
#define ll long long
#define ld long double
#define vll vector<long lon... | /*input
1
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, j, n) for (i = j; i < n; i++)
#define repi(i, j, n) for (i = j; i > n; i--)
#define inf 100001
#define M 1000000007
#define ll long long
#define ld long double
#define vll vector<long lon... | [["-", 31, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 331 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
for (int i = -54; i < 120; i++) {
for (int j = -54; j < 120; j++)
if (i * i * i * i * i - j * j * j * j * j == x)
cout << i << " " << j;
return 0;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
for (int i = -54; i < 120; i++) {
for (int j = -54; j < 120; j++)
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j;
return 0;
}
}
} | [["+", 8, 9, 0, 7, 8, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 7, 8, 57, 64, 9, 0, 46]] | 1 | 86 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define lson node << 1, st, mid
#define rson node << 1 | 1, mid + 1, ed
#define mem(a, x) m... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define lson node << 1, st, mid
#define rson node << 1 | 1, mid + 1, ed
#define mem(a, x) m... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, ... | 1 | 221 |
#include <math.h>
#include <stdio.h>
#include <string.h>
int main(void) {
int x;
scanf("%d", &x);
for (int i = -200; i < 200; i++) {
for (int j = -200; j < 200; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
printf("%d %d", i, j);
}
}
}
return 0;
}
| #include <math.h>
#include <stdio.h>
#include <string.h>
int main(void) {
int x;
scanf("%d", &x);
for (int i = -200; i < 200; i++) {
for (int j = -200; j < 200; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
printf("%d %d", i, j);
return 0;
}
}
}
}
| [["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 0 | 92 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
template <class T> inline bool chmax(T... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
template <class T> inline bool chmax(T... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78]] | 1 | 192 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
template <class Type> Type Pow(Type a, Type n) {
Type res = 1;
while (0 < n) {
if (n & 1) {
res = res * a;
}
a = a * a;
n >>= 1;
}
return res;
}
int main() {
ll x;
cin >> x;
for (ll i = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
template <class Type> Type Pow(Type a, Type n) {
Type res = 1;
while (0 < n) {
if (n & 1) {
res = res * a;
}
a = a * a;
n >>= 1;
}
return res;
}
int main() {
ll x;
cin >> x;
for (ll i = ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 153 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep1(i, n) for (int i = (n); i > 0; i--)
#define ll long long
#define pi pair<int, int>
#define pll pair<ll, ll>
#define MOD 10000000... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep1(i, n) for (int i = (n); i > 0; i--)
#define ll long long
#define pi pair<int, int>
#define pll pair<ll, ll>
#define MOD 10000000... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 136 |
x = int(input())
import math
f = 1
for A in range(-10**5,10**5):
A5 = A ** 5
if x - A5 > 0:
f = -1
B = round(math.pow(x - A5,1/5),0)
else:
B = round(math.pow(-(x - A5),1/5),0)
if A5 == x + B ** 5:
print(A,int(B)*f)
quit()
| x = int(input())
import math
f = 1
for A in range(-10**5,10**5):
A5 = A ** 5
if x - A5 > 0:
f = -1
B = round(math.pow(x - A5,1/5),0)
else:
B = round(math.pow(-(x - A5),1/5),0)
if A5 == x + int(B*f) ** 5:
print(A,int(B)*f)
quit()
| [["+", 15, 666, 0, 657, 12, 657, 31, 652, 63, 22], ["+", 0, 657, 12, 657, 31, 652, 3, 4, 0, 24], ["+", 12, 657, 31, 652, 3, 4, 0, 657, 17, 48], ["+", 12, 657, 31, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 657, 12, 657, 31, 652, 3, 4, 0, 25]] | 5 | 110 |
#include <math.h>
#include <stdio.h>
int main() {
int x;
scanf("%d", &x);
for (int i = -200; i < 200; i++) {
for (int j = i + 1; j < 200; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
printf("%d %d", i, j);
return 0;
}
}
}
} | #include <math.h>
#include <stdio.h>
int main() {
int x;
scanf("%d", &x);
for (int i = -200; i < 200; i++) {
for (int j = -200; j < 200; j++) {
if (pow(i, 5) - pow(j, 5) == x) {
printf("%d %d", i, j);
return 0;
}
}
}
} | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 0 | 91 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<s... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<s... | [["-", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 248 |
#include <iostream>
using namespace std;
typedef long long int lli;
const int MaxN = 100005;
typedef long long int lli;
int main() {
lli N, M, i, j, p, q, res = 0;
cin >> N;
for (i = -1000; i <= 1000; i++) {
p = i * i * i * i * i;
for (j = -1000; j <= 1000; j++) {
q = j * j * j * j * j;
if (N ... | #include <iostream>
using namespace std;
typedef long long int lli;
const int MaxN = 100005;
typedef long long int lli;
int main() {
lli N, M, i, j, p, q, res = 0;
cin >> N;
for (i = -1000; i <= 1000; i++) {
p = i * i * i * i * i;
for (j = -1000; j <= 1000; j++) {
q = j * j * j * j * j;
if (p ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 132 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
int main() {
cin >> n;
for (ll i = -2000; i <= 2000; i++) {
for (ll j = -2000; j <= 2000; j++) {
ll a = i * i * i * i * i;
ll b = j * j * j * j * j;
if (a - b == n) {
cout << a << " " << b << '\n';
exit(... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
int main() {
cin >> n;
for (ll i = -2000; i <= 2000; i++) {
for (ll j = -2000; j <= 2000; j++) {
ll a = i * i * i * i * i;
ll b = j * j * j * j * j;
if (a - b == n) {
cout << i << " " << j << '\n';
exit(... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 112 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
bool flag = 0;
for (int i = -1000; i < 1000; i++) {
for (int j = -1000; j < 1000; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << endl;
flag = 1;
break;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long x;
cin >> x;
bool flag = 0;
for (long long i = -1000; i < 1000; i++) {
for (long long j = -1000; j < 1000; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << endl;
flag = 1;
bre... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40]] | 1 | 106 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)n; i++) // n回繰り返す
#define rrep(i, n) for (int i = n - 1; i ... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)n; i++) // n回繰り返す
#define rrep(i, n) for (int i = n - 1; i ... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16... | 1 | 257 |
x = int(input())
for i in range(-120, 120):
for j in range(-120, 120):
if i**5-j**5 == x:
print(i, j)
break | x = int(input())
for i in range(-120, 120):
for j in range(-120, 120):
if i**5+j**5 == x:
print(i,-j)
exit(0)
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 664, 17, 33], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+",... | 5 | 48 |
import numpy as np
x = int(input())
i = 0
while True:
a = i
b = (np.abs(a**5 - x))**(1/5)
print(b)
if (a**5-x) < 0 :
b = -b
if a**5 - int(b)**5 == x:
print(a,int(b))
break
a = -i
b = (np.abs(a**5 - x))**(1/5)
if (a**5-x) < 0 :
b = -b
if a**5 - in... | import numpy as np
x = int(input())
i = 0
while True:
a = i
b = (np.abs(a**5 - x))**(1/5)
#print(b)
if (a**5-x) < 0 :
b = -b
if a**5 - int(b)**5 == x:
print(a,int(b))
break
a = -i
b = (np.abs(a**5 - x))**(1/5)
if (a**5-x) < 0 :
b = -b
if a**5 - i... | [["-", 0, 52, 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 | 150 |
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>
#include <tuple>
#define rep(i, m, n) for (int i = (m); i < (n); ++i)
#define rem(i, m, n) for (int i = (... | #include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>
#include <tuple>
#define rep(i, m, n) for (int i = (m); i < (n); ++i)
#define rem(i, m, n) for (int i = (... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33]] | 1 | 176 |
def main():
import sys
X=int(sys.stdin.readline())
for i in range(-100,100):
for j in range(-100,100):
if i**5-j**5==X:
print("{} {}".format(i,j))
main() | def main():
import sys
X=int(sys.stdin.readline())
for i in range(-1000,1000):
for j in range(-1000,1000):
if i**5-j**5==X:
print("{} {}".format(i,j))
return
main() | [["-", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38]] | 5 | 68 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
#define print(x) cout << (x) << endl
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define ll long lo... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
#define print(x) cout << (x) << endl
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define ll long lo... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33]] | 1 | 153 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
#define roop(i, n) for (int i = 0; i < n; i++)
int main(void) {
ll x;
cin >> x;
int a = -10000, b = -10000;
ll ans = 0;
for (int i = a; i < 10000; i++) {
for (int j = b; j < 10000; j++) {
ans = (... | #include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
#define roop(i, n) for (int i = 0; i < n; i++)
int main(void) {
ll x;
cin >> x;
int a = -120, b = -120;
ll ans = 0;
for (int i = a; i < 118; i++) {
for (int j = b; j < 118; j++) {
ans = (i * i * ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 155 |
import itertools
import numpy as np
X=int(input())
t=0
for i in range(0,1000):
if t==-1:
break
for j in range(1000,1000):
#print(i,end=" ")
#print(j)
if i**5-j**5==X:
print(i,end=" ")
print(j)
t=-1
break | import itertools
import numpy as np
X=int(input())
t=0
for i in range(0,1000):
if t==-1:
break
for j in range(-1000,1000):
#print(i,end=" ")
#print(j)
if i**5-j**5==X:
print(i,end=" ")
print(j)
t=-1
break | [["+", 0, 7, 12, 652, 3, 4, 0, 664, 17, 33]] | 5 | 76 |
X = int(input())
A = list(range(-200, 200))
B = list(range(-200, 200))
for a in A:
for b in B:
if a**5 - b**5 == X:
print(a, b) | X = int(input())
A = list(range(-200, 200))
B = list(range(-200, 200))
for a in A:
for b in B:
if a**5 - b**5 == X:
print(a, b)
exit() | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 59 |
x = int(input())
for i in range(-1000,1000+1):
for j in range(-1000,1001):
if pow(i,5) + pow(j,5) == x:
print("{} {}".format(i,j))
exit() | x = int(input())
for i in range(-1000,1000+1):
for j in range(-1000,1001):
if pow(i,5) - pow(j,5) == x:
print("{} {}".format(i,j))
exit() | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33]] | 5 | 65 |
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long long X, A, B;
cin >> X;
for (A = -2; A <= 2; A++) {
for (B = -2; B <= 2; B++) {
if (pow(A, 5) - pow(B, 5) == X) {
cout << A << " " << B << endl;
... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long long X, A, B;
cin >> X;
for (A = -150; A <= 150; A++) {
for (B = -150; B <= 150; B++) {
if (pow(A, 5) - pow(B, 5) == X) {
cout << A << " " << B << endl... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, ... | 1 | 114 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int x;
cin >> x;
for (int a = 1; a < 1000; ++a) {
for (int b = -1000; b < 1000; ++b) {
if (a * a * a * a * a - b * b * b * b * b == x) {
cout << a << " " << b << endl;
return (0);
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int x;
cin >> x;
for (int a = 0; a < 1000; ++a) {
for (int b = -1000; b < 1000; ++b) {
if ((a * a * a * a * a) - (b * b * b * b * b) == x) {
cout << a << " " << b << endl;
return (0);
}
}
}
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25], ["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25]] | 1 | 96 |
ma = lambda :map(int,input().split())
ni = lambda:int(input())
x = ma()
ma = 200
for i in range(ma):
for j in range(-ma,ma):
if (i**5 - j**5) ==x:
print(i,j)
exit()
| ma = lambda :map(int,input().split())
ni = lambda:int(input())
x = ni()
ma = 200
for i in range(ma):
for j in range(-ma,ma):
if (i**5 - j**5) ==x:
print(i,j)
exit()
| [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 75 |
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
//#define eps 1e-8
//#define eq(x,y) (fabs((x)-(y)) < eps)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const ll mod = 998244353;
lo... | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
//#define eps 1e-8
//#define eq(x,y) (fabs((x)-(y)) < eps)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const ll mod = 998244353;
lo... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 202 |
#include <bits/stdc++.h>
using namespace std;
void Main() {
int64_t X;
cin >> X;
/* for(int64_t i = 0; i < 64; ++i)
{
float a = pow(X + pow(i , 5.0f), 1.0f / 5.0f);
if(ceil(a) == floor(a))
{
cout << a << " " << i << endl;
return;
}
... | #include <bits/stdc++.h>
using namespace std;
void Main() {
int64_t X;
cin >> X;
/* for(int64_t i = 0; i < 64; ++i)
{
float a = pow(X + pow(i , 5.0f), 1.0f / 5.0f);
if(ceil(a) == floor(a))
{
cout << a << " " << i << endl;
return;
}
... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 223 |
import math
l = []
ans = []
x = int(input())
a = int( (x) ** (1/5) )
for i in range(a - 5, a + 5):
l.append(i)
for i in range(1,len(l)):
for j in range(len(l)):
tmp = math.pow(l[j],5) - math.pow(l[i],5)
if tmp == x:
print(l[j],l[i])
break
else:
continue
... | import math
l = []
ans = []
x = int(input())
a = int( (x) ** (1/5) )
for i in range(a - 1000, a + 1000):
l.append(i)
for i in range(1,len(l)):
for j in range(len(l)):
tmp = math.pow(l[j],5) - math.pow(l[i],5)
if tmp == x:
print(l[j],l[i])
break
else:
conti... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 123 |
x = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
ans = None
d_ls = make_divisors(x)
for d in d_ls:
for a in... | x = int(input())
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
ans = None
d_ls = make_divisors(x)
for d in d_ls:
for a in... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22]] | 5 | 140 |
def ff(n):
if(n==0): return [0]
if(n==1): return [1]
ans=set([])
i=2
while(i*i<=n):
if(n%i==0):
ans.add(n//i)
ans.add(i)
i+=1
return ans
x=int(input())
fx=ff(abs(x))
A=-1000000
B=-1000000
for f in fx:
if(A!=-1000000 and B!=1000000): break
for i in... | def ff(n):
if(n==0): return [0]
if(n==1): return [1]
ans=set([1,n])
i=2
while(i*i<=n):
if(n%i==0):
ans.add(n//i)
ans.add(i)
i+=1
return ans
x=int(input())
fx=ff(abs(x))
A=-1000000
B=-1000000
for f in fx:
if(A!=-1000000 and B!=1000000): break
for i... | [["+", 0, 662, 12, 652, 3, 4, 0, 634, 0, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 634, 0, 21], ["+", 0, 662, 12, 652, 3, 4, 0, 634, 0, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 184 |
import math
X = int(input())
def decompose(n):
result = []
half = math.floor(math.sqrt(n))
i = 2
while i <= half:
if n % i == 0:
result.append(i)
n //= i
half = math.floor(math.sqrt(n))
else:
i += 1
if n > 1:
result.append(n)
return result
facts = decompose(X)
fact_table = {}
for f in facts:... | import math
X = int(input())
def decompose(n):
result = []
half = math.floor(math.sqrt(n))
i = 2
while i <= half:
if n % i == 0:
result.append(i)
n //= i
half = math.floor(math.sqrt(n))
else:
i += 1
if n > 1:
result.append(n)
return result
facts = decompose(X)
fact_table = {}
for f in facts:... | [["+", 0, 670, 8, 666, 0, 657, 12, 657, 31, 612], ["+", 0, 670, 8, 666, 0, 657, 12, 657, 17, 48]] | 5 | 416 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long X;
cin >> X;
vector<long long> vec;
for (long long i = 1; i * i <= X; i++) {
if (X % i == 0) {
vec.push_back(i);
if (i * i != X)
vec.push_back(X / i);
}
}
sort(vec.begin(), vec.end());
int s = vec.size();
f... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long X;
cin >> X;
vector<long long> vec;
for (long long i = 1; i * i <= X; i++) {
if (X % i == 0) {
vec.push_back(i);
if (i * i != X)
vec.push_back(X / i);
}
}
sort(vec.begin(), vec.end());
int s = vec.size();
f... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 85], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 201 |
x = int(input())
for i in range(120):
for j in range(-119, a):
if i**5 - j**5 == x:
print(i, j)
exit() | x = int(input())
for i in range(120):
for j in range(-99, i):
if i**5 - j**5 == x:
print(i, j)
exit() | [["-", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 47 |
x = int(input())
for i in range(-118,120):
for j in range(-119,129):
if i**5 - j**5 == x:
print(i, j) | x=int(input())
for i in range(-118,120):
for j in range(-119,129):
if i**5-j**5==x:
print(i,j)
exit() | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 47 |
from collections import defaultdict as dc
x = int(input())
d = dc(lambda:0)
for i in range(10):
d[i**5] = i
# print(d)
f=0
l = list(d.items())
# print(l)
for i in range(len(l)):
for j in range(len(l)):
if l[i][0] - l[j][0] == x:
print(l[i][1],l[j][1])
f=1
break
... | from collections import defaultdict as dc
x = int(input())
d = dc(lambda:0)
for i in range(200):
d[i**5] = i
# print(d)
f=0
l = list(d.items())
# print(l)
for i in range(len(l)):
for j in range(len(l)):
if l[i][0] - l[j][0] == x:
print(l[i][1],l[j][1])
f=1
break
... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 164 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll x;
cin >> x;
for (ll i = 0; i <= 200; i++) {
for (ll j = -200; j <= i; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << '\n';
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll x;
cin >> x;
for (ll i = 0; i <= 200; i++) {
for (ll j = -200; j <= i; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << '\n';
... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 113 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x;
cin >> x;
for (int i = 0; i <= 200; i++) {
for (int j = -200; j <= i; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << '\n';
break;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x;
cin >> x;
for (int i = 0; i <= 300; i++) {
for (int j = -300; j <= i; j++) {
if (i * i * i * i * i - j * j * j * j * j == x) {
cout << i << " " << j << '\n';
return 0;
}
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 110 |
#include <bits/stdc++.h>
using namespace std;
#define FS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long ... | #include <bits/stdc++.h>
using namespace std;
#define FS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long ... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 612 |
x=int(input())
for i in range(-500,501):
for j in range(-500,501):
if i**5+j**5==x:
print(i,j)
exit() | x=int(input())
for i in range(-500,501):
for j in range(-500,501):
if i**5-j**5==x:
print(i,j)
exit() | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33]] | 5 | 50 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int X;
cin >> X;
bool flag = false;
for (int A = -1000; A <= 1000; A++) {
for (int B = -1000; B <= 1000; B++) {
if (X == A * A * A * A * A - B * B * B * B * B) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int X;
cin >> X;
bool flag = false;
for (ll A = -1000; A <= 1000; A++) {
for (ll B = -1000; B <= 1000; B++) {
if (X == A * A * A * A * A - B * B * B * B * B) {
... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 78]] | 1 | 122 |
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
typedef long long ll;
#define N 100010
using namespace std;
set<int> v[N];
int h[N];
ll getPow(int i, int n) {
int j = i;
i = 1;
while (n--)
i *= j;
return i;
}
void solve() {
int x;
cin >> x;
for (int i = -200; i <= 200; i++)
... | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
typedef long long ll;
#define N 100010
using namespace std;
set<int> v[N];
int h[N];
ll getPow(ll i, int n) {
int j = i;
i = 1;
while (n--)
i *= j;
return i;
}
void solve() {
int x;
cin >> x;
for (int i = -200; i <= 200; i++)
... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78]] | 1 | 160 |
x = int(input())
for a in range(200):
for b in range(-200, a):
if a**5-b**5==x:
print(a, b)
break | x = int(input())
for a in range(200):
for b in range(-200, a):
if a**5-b**5==x:
print(a, b)
break
else:
continue
break | [["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 7, 75, 76, 0, 102], ["+", 0, 7, 75, 76, 8, 196, 0, 116, 0, 117], ["+", 0, 656, 0, 7, 8, 196, 0, 93, 0, 94]] | 5 | 45 |
#include <stdio.h>
int main() {
long long x;
scanf("%lld", &x);
for (long long a = 0; a > 0; a++) {
if (a < 64) {
for (long long b = -64; b < 0; b++) {
if (a * a * a * a * a - b * b * b * b * b == x) {
printf("%lld %lld", a, b);
return 0;
}
if (a * a * a * a... | #include <stdio.h>
int main() {
long long x;
scanf("%lld", &x);
for (long long a = 0; a >= 0; a++) {
if (a < 64) {
for (long long b = -64; b < a; b++) {
if (a * a * a * a * a - b * b * b * b * b == x) {
printf("%lld %lld", a, b);
return 0;
}
if (a * a * a * ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 64, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["+", 64, 9, 0, 7, ... | 0 | 229 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long long x;
int a = 0, b = 0;
int flag = 0;
cin >> x;
long long m[1001];
for (int i = 0; i <= 1000; i++) {
m[i] = i * i * i * i * i;
}
for (int i = 0; i < 1001; i++) {
for (int j = 0; j < 1001; j++) ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
long long x;
int a = 0, b = 0;
int flag = 0;
cin >> x;
long long m[1001];
for (long long i = 0; i <= 1000; i++) {
m[i] = i * i * i * i * i;
}
for (int i = 0; i < 1001; i++) {
for (int j = 0; j < 1001;... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 48]] | 1 | 193 |
// https://atcoder.jp/contests/abc166/tasks/abc166_d
#include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "map"
#include "numeric"
#include "queue"
#include "set"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i... | // https://atcoder.jp/contests/abc166/tasks/abc166_d
#include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "map"
#include "numeric"
#include "queue"
#include "set"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 500 |
#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++)
typedef long long ll;
int main() {
ll X;
cin >> X;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1000; j <= 1000; j++) {
if (i * i * i * i * i... | #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++)
typedef long long ll;
int main() {
ll X;
cin >> X;
for (int i = -1000; i <= 1000; i++) {
for (int j = -1000; j <= 1000; j++) {
if ((ll)i * i * i * i... | [["+", 31, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 16, 31, 74, 39, 77, 39, 78], ["+", 31, 16, 31, 16, 31, 16, 31, 74, 0, 25]] | 1 | 113 |
#include <iostream>
using namespace std;
int main() {
long long x;
cin >> x;
for (long long i = -200; i < 200; i++) {
for (long long j = i + 1; j < 200; j++) {
long long d =
(long long)(j * j * j * j * j) - (long long)(i * i * i * i * i);
if (d == x) {
cout << i << " " << j << e... | #include <iostream>
using namespace std;
int main() {
long long x;
cin >> x;
for (long long i = -200; i < 200; i++) {
for (long long j = i + 1; j < 200; j++) {
long long d =
(long long)(j * j * j * j * j) - (long long)(i * i * i * i * i);
if (d == x) {
cout << j << " " << i << e... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 118 |
#include <bits/stdc++.h>
#define endl '\n'
#define pb push_back
#define fr first
#define sc second
#define ll long long int
#define bit(idx) idx &(-idx)
#define bin(x, a) bitset<a>(x)
#define all(A) A.begin(), A.end()
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;
int main() {
ios_base::sync... | #include <bits/stdc++.h>
#define endl '\n'
#define pb push_back
#define fr first
#define sc second
#define ll long long int
#define bit(idx) idx &(-idx)
#define bin(x, a) bitset<a>(x)
#define all(A) A.begin(), A.end()
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;
int main() {
ios_base::sync... | [["+", 31, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 17, 48]] | 1 | 155 |
// clang-format off
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <numeric>
#include <array>
#include <cmath>
#include <memory>
using namespace std;
#define DEB(variable) cout << #variable << '=' << variable << endl
#define FOR(LoopVariable,numberOFbegin,numbe... | // clang-format off
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <numeric>
#include <array>
#include <cmath>
#include <memory>
using namespace std;
#define DEB(variable) cout << #variable << '=' << variable << endl
#define FOR(LoopVariable,numberOFbegin,numbe... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
long long a, b, x;
int main() {
cin >> x;
for (a = 0; a <= 1000; a++)
for (b = -1000; b <= 1000; b++)
if (a * a * a * a * a - b * b * b * b * b == x) {
cout << a << " " << b << endl;
break;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
long long a, b, x;
int main() {
cin >> x;
for (a = 0; a <= 1000; a++)
for (b = -1000; b <= 1000; b++)
if (a * a * a * a * a - b * b * b * b * b == x) {
cout << a << " " << b << endl;
exit(0);
}
return 0;
} | [["-", 8, 7, 8, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 93 |
X = int(input())
for A in range(-120, 120):
for B in range(-120,120):
if A**5 - B**5 == X:
print(str(A) + " " + str(B))
break
break | X = int(input())
for A in range(-120, 120):
for B in range(-120, 120):
if A**5 - B**5 == X:
print(str(A) + " " + str(B))
quit()
| [["-", 8, 196, 0, 7, 8, 196, 0, 93, 0, 94], ["-", 0, 656, 0, 7, 8, 196, 0, 93, 0, 94], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 59 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.