problem_id stringlengths 6 6 | language stringclasses 2 values | original_status stringclasses 3 values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3 values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270 values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02608 | C++ | Time Limit Exceeded | #include <iostream>
// #include <vector>
// #include <string>
// #include <algorithm>
// #include <math.h>
// #include <queue>
// #include <stack>
// #include <iomanip>
// sometimes used
// #include <set>
// #include <map>
// #include <numeric>
// #include <list>
// #include <deque>
// #include <unordered_map>
typedef long long LL;
// typedef long double LD;
using namespace std;
// #define MOD 1000000007
// #define MAX 100100
// #define NIL -1
int main() {
LL n;
cin >> n;
for (LL i = 1; i <= n; i++) {
LL ans = 0;
for (LL x = 1; x < i; x++) {
for (LL y = 1; y < i - x; y++) {
for (LL z = 1; z < i - y; z++) {
LL tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp == i) {
ans++;
}
}
}
}
cout << ans << endl;
}
return 0;
}
| #include <iostream>
// #include <vector>
// #include <string>
// #include <algorithm>
// #include <math.h>
// #include <queue>
// #include <stack>
// #include <iomanip>
// sometimes used
// #include <set>
// #include <map>
// #include <numeric>
// #include <list>
// #include <deque>
// #include <unordered_map>
typedef long long LL;
// typedef long double LD;
using namespace std;
// #define MOD 1000000007
// #define MAX 100100
// #define NIL -1
int main() {
LL n;
cin >> n;
for (LL i = 1; i <= n; i++) {
LL ans = 0;
for (LL x = 1; x < i; x++) {
LL tmp0 = x * x;
for (LL y = 1; tmp0 + x * y + y * y < i; y++) {
LL tmp1 = tmp0 + x * y + y * y;
for (LL z = 1; tmp1 + y * z + z * z + z * x <= i; z++) {
LL tmp2 = tmp1 + y * z + z * z + z * x;
if (tmp2 == i) {
ans++;
}
}
}
}
cout << ans << endl;
}
return 0;
}
| replace | 31 | 35 | 31 | 37 | TLE | |
p02608 | C++ | Runtime Error | #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 a[10010];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
for (int k = 1; k <= n; ++k) {
a[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << a[i] << endl;
}
} | #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 a[10010];
int main() {
int n;
cin >> n;
for (int i = 1; i <= 300; ++i) {
for (int j = 1; j <= 300; ++j) {
for (int k = 1; k <= 300; ++k) {
if (i * i + j * j + k * k + i * j + j * k + k * i > 10005)
continue;
a[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << a[i] << endl;
}
} | replace | 11 | 14 | 11 | 16 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;
using namespace std;
int f(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
for (int x = 1; x <= n; x++) {
int cnt = 0;
for (int i = 1; i < sqrt(n); i++) {
if (f(i, 1, 1) > x)
break;
for (int j = 1; j < sqrt(n); j++) {
if (f(i, j, 1) > x)
break;
for (int k = 1; k < sqrt(n); k++) {
if (f(i, j, k) == x)
cnt++;
if (f(i, j, k) >= x)
break;
}
}
}
cout << cnt << endl;
}
} | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;
using namespace std;
int f(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
for (int x = 1; x <= n; x++) {
int cnt = 0;
for (int i = 1; i < sqrt(n); i++) {
if (f(i, 1, 1) > x)
break;
for (int j = 1; j < sqrt(n); j++) {
if (f(i, j, 1) > x)
break;
for (int k = 1; j < sqrt(n); k++) {
if (f(i, j, k) == x)
cnt++;
if (f(i, j, k) >= x)
break;
}
}
}
cout << cnt << endl;
}
} | replace | 29 | 30 | 29 | 30 | TLE | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define N (1000000000 + 7)
#define M 998244353
#define INF 1e16
typedef long long ll;
typedef pair<int, int> P;
const int inf = (int)1e9;
ll A(ll x) {
if (x >= 0)
return x;
else
return -x;
}
ll gcd(ll a, ll b) {
if (b > a) {
ll tmp = b;
b = a;
a = tmp;
}
if (a % b == 0)
return b;
else
return gcd(b, a % b);
}
ll cnt[10010];
int main(void) {
int n;
cin >> n;
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
cnt[x * x + y * y + z * z + x * y + y * z + z * x]++;
// cout<<x*x+y*y+z*z+x*y+y*z+z*x<<endl;
// if(x*x+y*y+z*z+x*y+y*z+z*x==n)ans++;
}
}
}
for (int i = 1; i <= n; i++)
cout << cnt[i] << endl;
return 0;
} | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define N (1000000000 + 7)
#define M 998244353
#define INF 1e16
typedef long long ll;
typedef pair<int, int> P;
const int inf = (int)1e9;
ll A(ll x) {
if (x >= 0)
return x;
else
return -x;
}
ll gcd(ll a, ll b) {
if (b > a) {
ll tmp = b;
b = a;
a = tmp;
}
if (a % b == 0)
return b;
else
return gcd(b, a % b);
}
ll cnt[10010];
int main(void) {
int n;
cin >> n;
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x > 10000)
continue;
cnt[x * x + y * y + z * z + x * y + y * z + z * x]++;
// cout<<x*x+y*y+z*z+x*y+y*z+z*x<<endl;
// if(x*x+y*y+z*z+x*y+y*z+z*x==n)ans++;
}
}
}
for (int i = 1; i <= n; i++)
cout << cnt[i] << endl;
return 0;
} | insert | 48 | 48 | 48 | 50 | 0 | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int(i) = (n); (i) >= (0); (i)--)
#define SIZE(x) ((int)(x).size())
#define GCD(a, b) \
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
#define QP(a, b) \
int qp(int a, ll b) { \
int ans = 1; \
do { \
if (b & 1) \
ans = 1ll * ans * a % mo; \
a = 1ll * a * a % mo; \
} while (b >>= 1); \
return ans; \
}
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define all(v) (v).begin(), (v).end()
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chadd(T &a, T b) { a = a + b; }
template <typename A, size_t N, typename T>
void FILL(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
typedef vector<int, int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
typedef long long ll;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1LL << 60;
const ll MOD = 1000000007LL;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vector<int> cnt(10000);
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
cnt[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
int N;
cin >> N;
for (int i = 1; i <= N; i++)
cout << cnt[i] << endl;
return 0;
} | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int(i) = (n); (i) >= (0); (i)--)
#define SIZE(x) ((int)(x).size())
#define GCD(a, b) \
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
#define QP(a, b) \
int qp(int a, ll b) { \
int ans = 1; \
do { \
if (b & 1) \
ans = 1ll * ans * a % mo; \
a = 1ll * a * a % mo; \
} while (b >>= 1); \
return ans; \
}
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define all(v) (v).begin(), (v).end()
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chadd(T &a, T b) { a = a + b; }
template <typename A, size_t N, typename T>
void FILL(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
typedef vector<int, int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
typedef long long ll;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1LL << 60;
const ll MOD = 1000000007LL;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vector<int> cnt(300000);
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
cnt[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
int N;
cin >> N;
for (int i = 1; i <= N; i++)
cout << cnt[i] << endl;
return 0;
} | replace | 66 | 67 | 66 | 67 | -11 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
map<int, int> ans;
for (int x = 1; x <= n; x++) {
for (int y = 1; y <= n; y++) {
for (int z = 1; z <= n; z++) {
int n = x * x + y * y + z * z + x * y + y * z + z * x;
ans[n]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
map<int, int> ans;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int n = x * x + y * y + z * z + x * y + y * z + z * x;
ans[n]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
}
| replace | 10 | 13 | 10 | 13 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int x = 1; x < 10000; x++) {
if (x * x > n)
break;
for (int y = 1; y < 10000; y++) {
if (y * y > n)
break;
for (int z = 1; z < 10000; z++) {
if (z * z > n)
break;
a[x * x + y * y + z * z + x * y + y * z + z * x - 1]++;
}
}
}
for (int i = 0; i < n; i++) {
cout << a[i] << endl;
}
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int x = 1; x < 10000; x++) {
if (x * x > n)
break;
for (int y = 1; y < 10000; y++) {
if (y * y > n)
break;
for (int z = 1; z < 10000; z++) {
if (z * z > n)
break;
if (x * x + y * y + z * z + x * y + y * z + z * x <= n)
a[x * x + y * y + z * z + x * y + y * z + z * x - 1]++;
}
}
}
for (int i = 0; i < n; i++) {
cout << a[i] << endl;
}
return 0;
} | replace | 19 | 20 | 19 | 21 | -6 | malloc(): corrupted top size
|
p02608 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
int main() {
int N;
cin >> N;
vector<int> ans(6 * pow(N + 1, 2));
for (int x = 1; x <= ceil(sqrt(N)); x++) {
for (int y = 1; y <= ceil(sqrt(N)); y++) {
for (int z = 1; z <= ceil(sqrt(N)); z++) {
int n = pow(x + y, 2) / 2 + pow(y + z, 2) / 2 + pow(z + x, 2) / 2;
ans[n - 1]++;
}
}
}
rep(i, N) cout << ans[i] << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
int main() {
int N;
cin >> N;
vector<int> ans(60001);
for (int x = 1; x <= ceil(sqrt(N)); x++) {
for (int y = 1; y <= ceil(sqrt(N)); y++) {
for (int z = 1; z <= ceil(sqrt(N)); z++) {
int n = pow(x + y, 2) / 2 + pow(y + z, 2) / 2 + pow(z + x, 2) / 2;
ans[n - 1]++;
}
}
}
rep(i, N) cout << ans[i] << endl;
return 0;
} | replace | 9 | 10 | 9 | 10 | MLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265359
int main() {
int N;
cin >> N;
for (int i = 1; i < N + 1; i++) {
int ans = 0;
for (int j = 1; j < 100; j++) {
for (int k = j; k < 100; k++) {
for (int l = k; l < 100; l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i) {
if (j == k && k == l)
ans++;
else if (j == k || k == l || l == j)
ans += 3;
else
ans += 6;
}
}
}
}
cout << ans << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265359
int main() {
int N;
cin >> N;
for (int i = 1; i < N + 1; i++) {
int ans = 0;
for (int j = 1; j < 59; j++) {
for (int k = j; k < 71; k++) {
for (int l = k; l < 100; l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i) {
if (j == k && k == l)
ans++;
else if (j == k || k == l || l == j)
ans += 3;
else
ans += 6;
}
}
}
}
cout << ans << endl;
}
}
| replace | 10 | 12 | 10 | 12 | TLE | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main() {
int n;
cin >> n;
vector<int> f(10101);
for (int x = 1; x <= 100; ++x) {
for (int y = 1; y <= 100; ++y) {
for (int z = 1; z <= 100; ++z) {
f[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << f[i] << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main() {
int n;
cin >> n;
vector<int> f(1000000);
for (int x = 1; x <= 100; ++x) {
for (int y = 1; y <= 100; ++y) {
for (int z = 1; z <= 100; ++z) {
f[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << f[i] << endl;
}
return 0;
} | replace | 22 | 23 | 22 | 23 | -11 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
ll ans = 0;
for (ll j = 1; j * j <= i; j++) {
for (ll k = 1; k * k <= i; k++) {
for (ll l = 1; l * l <= i; l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i)
ans++;
}
}
}
cout << ans << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
ll ans = 0;
for (ll j = 1; 6 * j * j <= i; j++) {
for (ll k = j; j * j + k * k + 2 * j * k + 2 * k * k <= i; k++) {
for (ll l = k; j * j + k * k + l * l + j * k + k * l + l * j <= i;
l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i) {
if (j == l)
ans++;
else if (j == k || k == l) {
ans += 3;
} else {
ans += 6;
}
}
}
}
}
cout << ans << endl;
}
} | replace | 15 | 20 | 15 | 28 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
int n;
cin >> n;
vector<int> cnt(n + 10, 0);
for (int x = 1; x <= 110; ++x) {
for (int y = 1; y <= 110; ++y) {
for (int z = 1; z <= 110; ++z) {
int s = x * x + y * y + z * z + x * y + y * z + z * x;
cnt[s]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << cnt[i] << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
int n;
cin >> n;
vector<int> cnt(n + 10, 0);
for (int x = 1; x <= 110; ++x) {
for (int y = 1; y <= 110; ++y) {
for (int z = 1; z <= 110; ++z) {
int s = x * x + y * y + z * z + x * y + y * z + z * x;
if (s <= n) {
cnt[s]++;
}
}
}
}
for (int i = 1; i <= n; ++i) {
cout << cnt[i] << endl;
}
} | replace | 18 | 19 | 18 | 21 | -11 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = int64_t;
using pint = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
for (int x = 1; x <= sqrt(n); ++x) {
int x2 = x * x;
for (int y = 1; y <= sqrt(n); ++y) {
int y2 = y * y;
for (int z = 1; z <= sqrt(n); ++z) {
ans[x2 + y2 + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; ++i)
cout << ans[i] << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = int64_t;
using pint = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
for (int x = 1; x <= sqrt(n); ++x) {
int x2 = x * x;
for (int y = 1; y <= sqrt(n); ++y) {
int y2 = y * y;
for (int z = 1; z <= sqrt(n); ++z) {
if (x2 + y2 + z * z + x * y + y * z + z * x <= n)
ans[x2 + y2 + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; ++i)
cout << ans[i] << endl;
} | replace | 16 | 17 | 16 | 18 | 0 | |
p02608 | C++ | Time Limit Exceeded | // is there any case of -1 or any special corner cases ?
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int, int>
#define all(v) v.begin(), v.end()
#define zeros(arr) memset(arr, 0, sizeof(arr));
#define precise(num) \
cout << fixed; \
cout << std::setprecision(num)
#define nl cout << "\n";
#define test \
int t; \
cin >> t; \
while (t--)
const int maxx = 3 * 1e5, limit = 9 * 1e18, MOD = 1e9 + 7;
string binary(int n) {
bitset<60> b(n);
string p = b.to_string();
return p;
}
int decimal(string n) {
int dec_value = 0;
int base = 1;
for (int i = n.size() - 1; i >= 0; i--) {
if (n[i] == '1')
dec_value += base;
base = base * 2;
}
return dec_value;
}
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
int pow(int x, int n, int mod) {
if (n == 0)
return 1;
int res = pow(x, n / 2, mod);
res = (res * res) % mod;
if (n % 2)
res = (res * x) % mod;
return res;
}
#define boost \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl '\n';
int32_t main() {
boost;
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int res = 0;
for (int k = 1; k <= 150; k++) {
for (int j = k; j <= 150; j++) {
for (int l = j; l + j + k <= 200; l++) {
int num = pow((k + j + l), 2) - k * j - k * l - l * j;
if (num == i) {
// cout<<k<<" "<<j<<" "<<l<<endl;
// cout<<num<<endl;
if (k == j && j == l) {
res++;
} else if ((k == j && j != l) || (k == l && k != j) ||
(j == l && j != k)) {
res += 3;
} else {
res += 6;
}
}
}
}
}
cout << res << endl;
}
} | // is there any case of -1 or any special corner cases ?
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int, int>
#define all(v) v.begin(), v.end()
#define zeros(arr) memset(arr, 0, sizeof(arr));
#define precise(num) \
cout << fixed; \
cout << std::setprecision(num)
#define nl cout << "\n";
#define test \
int t; \
cin >> t; \
while (t--)
const int maxx = 3 * 1e5, limit = 9 * 1e18, MOD = 1e9 + 7;
string binary(int n) {
bitset<60> b(n);
string p = b.to_string();
return p;
}
int decimal(string n) {
int dec_value = 0;
int base = 1;
for (int i = n.size() - 1; i >= 0; i--) {
if (n[i] == '1')
dec_value += base;
base = base * 2;
}
return dec_value;
}
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
int pow(int x, int n, int mod) {
if (n == 0)
return 1;
int res = pow(x, n / 2, mod);
res = (res * res) % mod;
if (n % 2)
res = (res * x) % mod;
return res;
}
#define boost \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl '\n';
int32_t main() {
boost;
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int res = 0;
for (int k = 1; k <= 130; k++) {
for (int j = k; j + k <= 130; j++) {
for (int l = j; l + j + k <= 130; l++) {
int num = pow((k + j + l), 2) - k * j - k * l - l * j;
if (num == i) {
// cout<<k<<" "<<j<<" "<<l<<endl;
// cout<<num<<endl;
if (k == j && j == l) {
res++;
} else if ((k == j && j != l) || (k == l && k != j) ||
(j == l && j != k)) {
res += 3;
} else {
res += 6;
}
}
}
}
}
cout << res << endl;
}
} | replace | 72 | 75 | 72 | 75 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> res(N, 0);
for (int x = 1; x < N / 2; x++) {
for (int y = 1; y < N / 2; y++) {
for (int z = 1; z < N / 2; z++) {
int n = x * x + y * y + z * z + x * y + y * z + x * z;
if (n <= N) {
res.at(n - 1)++;
}
}
}
}
for (int i = 0; i < N; i++) {
cout << res.at(i) << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> res(N, 0);
for (int x = 1; x < sqrt(N); x++) {
for (int y = 1; y < sqrt(N); y++) {
for (int z = 1; z < sqrt(N); z++) {
int n = x * x + y * y + z * z + x * y + y * z + x * z;
if (n <= N) {
res.at(n - 1)++;
}
}
}
}
for (int i = 0; i < N; i++) {
cout << res.at(i) << endl;
}
} | replace | 8 | 11 | 8 | 11 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvc = vector<vector<char>>;
int main() {
int N;
cin >> N;
vi f(N + 1, 0);
for (int i = 1; i <= N; i++) {
for (int j = 1; j <= 120; j++) {
for (int k = 1; k <= 120 - j; k++) {
for (int l = 1; l <= 120 - j - k; l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i) {
f[i]++;
}
}
}
}
}
for (int i = 1; i <= N; i++) {
cout << f[i] << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvc = vector<vector<char>>;
int main() {
int N;
cin >> N;
vi f(N + 1, 0);
int v = 1000;
for (int j = 1; j <= v; j++) {
for (int k = 1; k <= v - j; k++) {
for (int l = 1; l <= v - j - k; l++) {
int c = j * j + k * k + l * l + j * k + k * l + l * j;
if (c <= N) {
f[c]++;
}
}
}
}
for (int i = 1; i <= N; i++) {
cout << f[i] << endl;
}
return 0;
} | replace | 12 | 20 | 12 | 19 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define MAX 100000
#define INF 1000000
#define M 1000000007
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
int main() {
fast_io ll n;
cin >> n;
map<ll, ll> mp;
for (ll x = 1; x <= n; x++) {
for (ll y = 1; y <= n; y++) {
for (ll z = 1; z <= n; z++) {
ll r = pow(x, 2) + pow(y, 2) + pow(z, 2) + (x * y) + (y * z) + (z * x);
mp[r]++;
}
}
}
for (ll i = 1; i <= n; i++) {
cout << mp[i] << endl;
}
return 0;
} | #include <bits/stdc++.h>
#define ll long long
#define MAX 100000
#define INF 1000000
#define M 1000000007
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
int main() {
fast_io ll n;
cin >> n;
map<ll, ll> mp;
for (ll x = 1; x <= 100; x++) {
for (ll y = 1; y <= 100; y++) {
for (ll z = 1; z <= 100; z++) {
ll r = pow(x, 2) + pow(y, 2) + pow(z, 2) + (x * y) + (y * z) + (z * x);
mp[r]++;
}
}
}
for (ll i = 1; i <= n; i++) {
cout << mp[i] << endl;
}
return 0;
}
| replace | 14 | 17 | 14 | 17 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int main() {
vector<int> a(1000000000);
int n;
cin >> n;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
a[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int main() {
vector<int> a(1000000);
int n;
cin >> n;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
a[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
} | replace | 5 | 6 | 5 | 6 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02608 | C++ | Time Limit Exceeded | // AUTHOR: RAVAN_2070
// PUNE INSTITUTE OF COMPUTER TECHNOLOGY
/*
I ♥ CLARICE STARLING...
EXPLAINATION BELOW->
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vii;
typedef pair<ll, ll> pii;
typedef map<ll, ll> mii;
#define MOD7 1000000007
#define MOD9 1000000009
#define pi 3.1415926535
#define Test_cases \
ll TC; \
cin >> TC; \
while (TC--)
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sp(x) fixed << setprecision(x)
#define sz(x) (ll)(x.size())
#define fo(i, a, b) for (i = a; i < b; i++)
#define foe(i, a, b) for (i = a; i <= b; i++)
const ll INF = (ll)2e18 + 77;
/*void solve()
{
int n,x,y,i,b,c;cin>>n;
int cnt;
foe(i,1,n)
{
cnt=0;
for(x=1;x<i*i;x++)
{
for(y=1;y<i*i;y++)
{
b=x+y;c=(x*x+y*y+x*y)-i;
int d=b*b-4*c;
if(d<=0)break;
int sd=sqrt(d);
if(d>0&&d==sd*sd&&(sd-b>0)&&((sd-b)%2==0))cnt+=2;
}
}
cout<<cnt/2<<"\n";
}
}*/
void solve() {
int x, y, z, n;
cin >> n;
map<int, int> M;
for (x = 1; x < n * n; x++) {
for (y = 1; y < n * n; y++) {
int d2 = x * x + y * y + x * y;
if (d2 > n)
break;
for (z = 1; z < n * n; z++) {
int d = x * x + y * y + z * z + x * y + y * z + z * x;
if (d > n)
break;
M[d]++;
}
}
}
int i;
foe(i, 1, n) cout << M[i] << "\n";
}
int main() {
fastio
// Test_cases
solve();
return 0;
}
// map<ll,ll,greater<int>> to sort in descending order ,in iterator declaration
// no greater<int> if you want to apply lowerbound on set use
// s.lower_bound(key),not the one used for vector
// Syntax to create a min heap for priority queue priority_queue <int,
// vector<int>, greater<int>>;
// for modinverse use modularexponention(x,M-2,M);
// for "each" subtraction from ans(ans-k) if(ans<0) do ans+=MOD,ans%=MOD
// vector<vector<int>>dp(201,vector<int>(n+1)); A way to initialize vector of
// vector If wrong on pretest 2 means logically wrong
/* TIPS FOR DEBUGGING
* Check if values are not overflowing (use long long where required)
* Check if ranges are inclusive or not.
* Check properly if greedy will work or not before using it.
* Check EDGE CASES!! Seriously, even in 2B, saving 8 points by being
* 2 minutes faster will bite you in the ass if you don't make sure
* it works on edge cases.
* Keep adding to this list.
*/
| // AUTHOR: RAVAN_2070
// PUNE INSTITUTE OF COMPUTER TECHNOLOGY
/*
I ♥ CLARICE STARLING...
EXPLAINATION BELOW->
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vii;
typedef pair<ll, ll> pii;
typedef map<ll, ll> mii;
#define MOD7 1000000007
#define MOD9 1000000009
#define pi 3.1415926535
#define Test_cases \
ll TC; \
cin >> TC; \
while (TC--)
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sp(x) fixed << setprecision(x)
#define sz(x) (ll)(x.size())
#define fo(i, a, b) for (i = a; i < b; i++)
#define foe(i, a, b) for (i = a; i <= b; i++)
const ll INF = (ll)2e18 + 77;
/*void solve()
{
int n,x,y,i,b,c;cin>>n;
int cnt;
foe(i,1,n)
{
cnt=0;
for(x=1;x<i*i;x++)
{
for(y=1;y<i*i;y++)
{
b=x+y;c=(x*x+y*y+x*y)-i;
int d=b*b-4*c;
if(d<=0)break;
int sd=sqrt(d);
if(d>0&&d==sd*sd&&(sd-b>0)&&((sd-b)%2==0))cnt+=2;
}
}
cout<<cnt/2<<"\n";
}
}*/
void solve() {
int x, y, z, n;
cin >> n;
map<int, int> M;
for (x = 1; x * x < n; x++) {
for (y = 1; x * x + y * y + x * y < n; y++) {
for (z = 1; z < n * n; z++) {
int d = x * x + y * y + z * z + x * y + y * z + z * x;
if (d > n)
break;
M[d]++;
}
}
}
int i;
foe(i, 1, n) cout << M[i] << "\n";
}
int main() {
fastio
// Test_cases
solve();
return 0;
}
// map<ll,ll,greater<int>> to sort in descending order ,in iterator declaration
// no greater<int> if you want to apply lowerbound on set use
// s.lower_bound(key),not the one used for vector
// Syntax to create a min heap for priority queue priority_queue <int,
// vector<int>, greater<int>>;
// for modinverse use modularexponention(x,M-2,M);
// for "each" subtraction from ans(ans-k) if(ans<0) do ans+=MOD,ans%=MOD
// vector<vector<int>>dp(201,vector<int>(n+1)); A way to initialize vector of
// vector If wrong on pretest 2 means logically wrong
/* TIPS FOR DEBUGGING
* Check if values are not overflowing (use long long where required)
* Check if ranges are inclusive or not.
* Check properly if greedy will work or not before using it.
* Check EDGE CASES!! Seriously, even in 2B, saving 8 points by being
* 2 minutes faster will bite you in the ass if you don't make sure
* it works on edge cases.
* Keep adding to this list.
*/
| replace | 62 | 67 | 62 | 64 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
using P = pair<long long, long long>;
#define rep(i, n) for (long long i = 0; i < (long long)n; i++)
#define req(i, n) for (long long i = n - 1; i >= 0; i--)
#define range(i, a, b) for (long long i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((long long)(x).size())
#define COUT(x) cout << x << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define onBoard(y, x) (y >= 0 && y < h && x >= 0 && x < w)
#define vint vector<int>
#define pri_que priority_queue
#define vvint vector<vector<int>>
#define vstr vector<string>
#define vp vector<pair<int, int>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define SUM(x) accumulate(x.begin(), x.end(), 0)
#define MAX(x) *max_element(x.begin(), x.end())
#define MIN(x) *min_element(x.begin(), x.end())
#define couty cout << "Yes" << endl
#define coutn cout << "No" << endl
#define coutY cout << "YES" << endl
#define coutN cout << "NO" << endl
#define yn(x) cout << (x ? "Yes" : "No") << endl
#define YN(x) cout << (x ? "YES" : "NO") << endl
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const long long dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long INF = 1e12;
const long long MOD = 1e9 + 7;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
int n;
cin >> n;
vint res(1e4 + 1, 0);
for (int x = 1; x * x < n; x++) {
for (int y = 1; y * y < n; y++) {
for (int z = 1; z * z < n; z++) {
res[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
range(i, 1, n + 1) cout << res[i] << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
using P = pair<long long, long long>;
#define rep(i, n) for (long long i = 0; i < (long long)n; i++)
#define req(i, n) for (long long i = n - 1; i >= 0; i--)
#define range(i, a, b) for (long long i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((long long)(x).size())
#define COUT(x) cout << x << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define onBoard(y, x) (y >= 0 && y < h && x >= 0 && x < w)
#define vint vector<int>
#define pri_que priority_queue
#define vvint vector<vector<int>>
#define vstr vector<string>
#define vp vector<pair<int, int>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define SUM(x) accumulate(x.begin(), x.end(), 0)
#define MAX(x) *max_element(x.begin(), x.end())
#define MIN(x) *min_element(x.begin(), x.end())
#define couty cout << "Yes" << endl
#define coutn cout << "No" << endl
#define coutY cout << "YES" << endl
#define coutN cout << "NO" << endl
#define yn(x) cout << (x ? "Yes" : "No") << endl
#define YN(x) cout << (x ? "YES" : "NO") << endl
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const long long dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long INF = 1e12;
const long long MOD = 1e9 + 7;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
int n;
cin >> n;
vint res(1e4 + 1, 0);
for (int x = 1; x * x < n; x++) {
for (int y = 1; y * y < n; y++) {
for (int z = 1; z * z < n; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x <= n)
res[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
range(i, 1, n + 1) cout << res[i] << endl;
} | replace | 66 | 67 | 66 | 68 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
// int func(int x, int y, int n){
// double sq = sqrt( (x+y)*(x+y) - 4 * (x*x + y*y + x*y - n));
// if(ceil(sq) != floor(sq) || sq <= 0){
// return -1;
// }
// else{
// return (-(x + y) + int(sq)) / 2;
// }
// }
int judge(int x, int y, int z) {
if (x == y && y == z) {
return 1;
} else if (x != y && y != z && z != x) {
return 6;
} else {
return 3;
}
}
int main() {
int N;
cin >> N;
int x, y, z;
int tmp;
vector<int> count(N + 1);
for (x = 1; x <= N; x++) {
for (y = 1; y <= N; y++) {
for (z = 1; z <= N; z++) {
tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp <= N) {
count.at(tmp)++;
}
}
}
}
for (int i = 0; i < N; i++) {
cout << count.at(i + 1) << endl;
}
return 0;
}
| #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
// int func(int x, int y, int n){
// double sq = sqrt( (x+y)*(x+y) - 4 * (x*x + y*y + x*y - n));
// if(ceil(sq) != floor(sq) || sq <= 0){
// return -1;
// }
// else{
// return (-(x + y) + int(sq)) / 2;
// }
// }
int judge(int x, int y, int z) {
if (x == y && y == z) {
return 1;
} else if (x != y && y != z && z != x) {
return 6;
} else {
return 3;
}
}
int main() {
int N;
cin >> N;
int x, y, z;
int tmp;
vector<int> count(N + 1);
for (x = 1; x <= 100; x++) {
for (y = 1; y <= 100; y++) {
for (z = 1; z <= 100; z++) {
tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp <= N) {
count.at(tmp)++;
}
}
}
}
for (int i = 0; i < N; i++) {
cout << count.at(i + 1) << endl;
}
return 0;
}
| replace | 33 | 36 | 33 | 36 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long
#define double long double
#define endl "\n"
#define pb push_back
#define PI 3.1415926535897932384626433832795l
#define F first
#define S second
#define mp make_pair
#define f(i, n) for (int i = 0; i < n; i++)
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define gcd(a, b) __gcd((a), (b))
#define fill(a, value) memset(a, value, sizeof(a));
#define minn(v) *min_element(v.begin(), v.end());
#define maxx(v) *max_element(v.begin(), v.end());
#define print(x) cout << (x) << endl;
#define sum(v) +x accumulate(v.begin(), v.end(), x);
typedef pair<int, int> pii;
typedef vector<int> vi;
/*
max and min value in a set
max_element = *(my_set.rbegin());
min_element = *my_set.begin();
*/
// x.substr(start, length);
/*
Create a vector containing n
vectors of size m.
---vector<vector<int> > vec( n , vector<int> (m, 0));
*/
/*left shifting an integer “x” with an integer “y” (x<<y)
is equivalent to multiplying x with 2^y (2 raise to power y).*/
/*Similarly right shifting (x>>y) is equivalent
to dividing x with 2^y.
*/
struct type {
int k, i, j;
};
// to check if a no is prime or not?
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
// minimum subaaray sum of size k-sliding window approach
int findSubarray(int arr[], int n, int k) {
int window_sum = 0;
int min_window = INT_MAX;
int last = 0;
for (int i = 0; i < n; i++) {
window_sum += arr[i];
if (i + 1 >= k) {
if (min_window > window_sum) {
min_window = window_sum;
last = i;
}
window_sum -= arr[i + 1 - k];
}
}
int sum = 0;
for (int i = last - k + 1; i <= last; i++) {
sum += arr[i];
}
return sum;
}
// finds the next permutation to given sequence of nos
int nextpermutation(vi v) {
vi t = v;
sort(all(t));
int x = 0;
while (true) {
x++;
if (t == v) {
return x;
}
next_permutation(all(t));
}
}
vector<int> factors(int n) {
// Note that this loop runs till square root
vi ans;
for (int i = 1; i <= sqrt(n); i++) {
if (n % i == 0) {
if (n == i * i)
ans.pb(i);
else {
ans.pb(i);
if (i != n / i)
ans.pb(n / i);
}
}
}
sort(all(ans));
return ans;
}
// Recursive C++ program to check if a string is subsequence of another string
bool isSubSequence(char str1[], char str2[], int m, int n) {
// Base Cases
if (m == 0)
return true;
if (n == 0)
return false;
// If last characters of two strings are matching
if (str1[m - 1] == str2[n - 1])
return isSubSequence(str1, str2, m - 1, n - 1);
// If last characters are not matching
return isSubSequence(str1, str2, m, n - 1);
}
void findDivisors(int n) {
int div[n + 1];
memset(div, 0, sizeof div);
for (int i = 1; i <= n; i++) {
for (int j = 1; j * i <= n; j++)
div[i * j]++;
}
int ans = 0;
for (int i = 1; i <= n; i++)
ans += i * div[i];
cout << ans << endl;
}
int digits(int n) {
int res = 0;
while (n > 0) {
res += n % 10;
n /= 10;
}
return (res);
}
int power(int x, int y, int p) {
int res = 1; // Initialize result
x = x % p; // Update x if it is more than or
// equal to p
while (y > 0) {
// If y is odd, multiply x with result
if (y & 1)
res = (res * x) % p;
// y must be even now
y = y >> 1; // y = y/2
x = (x * x) % p;
}
return res;
}
// Returns n^(-1) mod p
int modInverse(int n, int p) { return power(n, p - 2, p); }
// Returns nCr % p using Fermat's little
// theorem.
int nCr(int n, int r, int p) {
// Base case
if (r == 0)
return 1;
int fac[n + 1];
fac[0] = 1;
for (int i = 1; i <= n; i++)
fac[i] = (fac[i - 1] * i) % p;
return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
p;
}
double dist(int x1, int y1, int x2, int y2) {
double a = (x1 - x2) * (x1 - x2);
double b = (y1 - y2) * (y1 - y2);
return sqrt(a + b);
}
int lowerBound(vi a, int n, int key) {
int s = 0, e = n - 1;
int ans = -1;
while (s <= e) {
int mid = (s + e) / 2;
if (a[mid] == key) {
ans = mid;
e = mid - 1;
} else if (a[mid] > key) {
e = mid - 1;
} else {
s = mid + 1;
}
}
return ans;
}
vi subsetSums(vi arr, int n) {
// There are totoal 2^n subsets
long long total = 1 << n;
// Consider all numbers from 0 to 2^n - 1
vi ans;
for (long long i = 0; i < total; i++) {
long long sum = 0;
// Consider binary reprsentation of
// current i to decide which elements
// to pick.
for (int j = 0; j < n; j++)
if (i & (1 << j))
sum += arr[j];
// Print sum of picked elements.
if (sum != 0)
ans.pb(sum);
}
return ans;
}
signed main() {
fastio;
cout << fixed << setprecision(12);
// priority_queue<int> p;
int n;
cin >> n;
int a[10000] = {0};
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= sqrt(n); j++) {
for (int k = 1; k <= sqrt(n); k++) {
int x = i * i + j * j + k * k + i * j + j * k + i * k;
a[x] += 1;
}
}
}
for (int i = 1; i <= n; i++)
print(a[i]) return 0;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long
#define double long double
#define endl "\n"
#define pb push_back
#define PI 3.1415926535897932384626433832795l
#define F first
#define S second
#define mp make_pair
#define f(i, n) for (int i = 0; i < n; i++)
#define fastio \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define gcd(a, b) __gcd((a), (b))
#define fill(a, value) memset(a, value, sizeof(a));
#define minn(v) *min_element(v.begin(), v.end());
#define maxx(v) *max_element(v.begin(), v.end());
#define print(x) cout << (x) << endl;
#define sum(v) +x accumulate(v.begin(), v.end(), x);
typedef pair<int, int> pii;
typedef vector<int> vi;
/*
max and min value in a set
max_element = *(my_set.rbegin());
min_element = *my_set.begin();
*/
// x.substr(start, length);
/*
Create a vector containing n
vectors of size m.
---vector<vector<int> > vec( n , vector<int> (m, 0));
*/
/*left shifting an integer “x” with an integer “y” (x<<y)
is equivalent to multiplying x with 2^y (2 raise to power y).*/
/*Similarly right shifting (x>>y) is equivalent
to dividing x with 2^y.
*/
struct type {
int k, i, j;
};
// to check if a no is prime or not?
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
// minimum subaaray sum of size k-sliding window approach
int findSubarray(int arr[], int n, int k) {
int window_sum = 0;
int min_window = INT_MAX;
int last = 0;
for (int i = 0; i < n; i++) {
window_sum += arr[i];
if (i + 1 >= k) {
if (min_window > window_sum) {
min_window = window_sum;
last = i;
}
window_sum -= arr[i + 1 - k];
}
}
int sum = 0;
for (int i = last - k + 1; i <= last; i++) {
sum += arr[i];
}
return sum;
}
// finds the next permutation to given sequence of nos
int nextpermutation(vi v) {
vi t = v;
sort(all(t));
int x = 0;
while (true) {
x++;
if (t == v) {
return x;
}
next_permutation(all(t));
}
}
vector<int> factors(int n) {
// Note that this loop runs till square root
vi ans;
for (int i = 1; i <= sqrt(n); i++) {
if (n % i == 0) {
if (n == i * i)
ans.pb(i);
else {
ans.pb(i);
if (i != n / i)
ans.pb(n / i);
}
}
}
sort(all(ans));
return ans;
}
// Recursive C++ program to check if a string is subsequence of another string
bool isSubSequence(char str1[], char str2[], int m, int n) {
// Base Cases
if (m == 0)
return true;
if (n == 0)
return false;
// If last characters of two strings are matching
if (str1[m - 1] == str2[n - 1])
return isSubSequence(str1, str2, m - 1, n - 1);
// If last characters are not matching
return isSubSequence(str1, str2, m, n - 1);
}
void findDivisors(int n) {
int div[n + 1];
memset(div, 0, sizeof div);
for (int i = 1; i <= n; i++) {
for (int j = 1; j * i <= n; j++)
div[i * j]++;
}
int ans = 0;
for (int i = 1; i <= n; i++)
ans += i * div[i];
cout << ans << endl;
}
int digits(int n) {
int res = 0;
while (n > 0) {
res += n % 10;
n /= 10;
}
return (res);
}
int power(int x, int y, int p) {
int res = 1; // Initialize result
x = x % p; // Update x if it is more than or
// equal to p
while (y > 0) {
// If y is odd, multiply x with result
if (y & 1)
res = (res * x) % p;
// y must be even now
y = y >> 1; // y = y/2
x = (x * x) % p;
}
return res;
}
// Returns n^(-1) mod p
int modInverse(int n, int p) { return power(n, p - 2, p); }
// Returns nCr % p using Fermat's little
// theorem.
int nCr(int n, int r, int p) {
// Base case
if (r == 0)
return 1;
int fac[n + 1];
fac[0] = 1;
for (int i = 1; i <= n; i++)
fac[i] = (fac[i - 1] * i) % p;
return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
p;
}
double dist(int x1, int y1, int x2, int y2) {
double a = (x1 - x2) * (x1 - x2);
double b = (y1 - y2) * (y1 - y2);
return sqrt(a + b);
}
int lowerBound(vi a, int n, int key) {
int s = 0, e = n - 1;
int ans = -1;
while (s <= e) {
int mid = (s + e) / 2;
if (a[mid] == key) {
ans = mid;
e = mid - 1;
} else if (a[mid] > key) {
e = mid - 1;
} else {
s = mid + 1;
}
}
return ans;
}
vi subsetSums(vi arr, int n) {
// There are totoal 2^n subsets
long long total = 1 << n;
// Consider all numbers from 0 to 2^n - 1
vi ans;
for (long long i = 0; i < total; i++) {
long long sum = 0;
// Consider binary reprsentation of
// current i to decide which elements
// to pick.
for (int j = 0; j < n; j++)
if (i & (1 << j))
sum += arr[j];
// Print sum of picked elements.
if (sum != 0)
ans.pb(sum);
}
return ans;
}
signed main() {
fastio;
cout << fixed << setprecision(12);
// priority_queue<int> p;
int n;
cin >> n;
int a[100007] = {0};
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= sqrt(n); j++) {
for (int k = 1; k <= sqrt(n); k++) {
int x = i * i + j * j + k * k + i * j + j * k + i * k;
a[x] += 1;
}
}
}
for (int i = 1; i <= n; i++)
print(a[i]) return 0;
} | replace | 240 | 241 | 240 | 241 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// T+N
// #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template <class T, class T2> inline bool chkmin(T &x, const T2 &y) {
return x > y ? x = y, 1 : 0;
}
const ll mod = 1e9 + 7;
template <class T> inline void fix(T &x) {
if (x >= mod | x <= -mod) {
x %= mod;
}
if (x < 0) {
x += mod;
}
}
#define out(x) cout << __LINE__ << ": " << (#x) << " = " << (x) << endl
const int MAX_N = 101;
ll cnt[MAX_N];
signed main() {
// ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int n;
cin >> n;
for (ll x = 1; x <= MAX_N; x++) {
for (ll y = 1; y <= MAX_N; y++) {
for (ll z = 1; z <= MAX_N; z++) {
ll now = x * x + y * y + z * z + x * y + z * x + y * z;
if (now <= n) {
cnt[now]++;
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << cnt[i] << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// T+N
// #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template <class T, class T2> inline bool chkmin(T &x, const T2 &y) {
return x > y ? x = y, 1 : 0;
}
const ll mod = 1e9 + 7;
template <class T> inline void fix(T &x) {
if (x >= mod | x <= -mod) {
x %= mod;
}
if (x < 0) {
x += mod;
}
}
#define out(x) cout << __LINE__ << ": " << (#x) << " = " << (x) << endl
const int MAX_N = 101;
ll cnt[MAX_N * MAX_N];
signed main() {
// ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int n;
cin >> n;
for (ll x = 1; x <= MAX_N; x++) {
for (ll y = 1; y <= MAX_N; y++) {
for (ll z = 1; z <= MAX_N; z++) {
ll now = x * x + y * y + z * z + x * y + z * x + y * z;
if (now <= n) {
cnt[now]++;
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << cnt[i] << endl;
}
return 0;
}
| replace | 27 | 28 | 27 | 28 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
vi ans(n + 1);
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
for (int z = 1; z * z <= n; ++z) {
int m = g(x, y, z);
ans[m]++;
}
}
}
rrep(i, n) printf("%d\n", ans[i]);
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
vi ans(n + 1);
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
for (int z = 1; z * z <= n; ++z) {
int m = g(x, y, z);
if (m <= n)
ans[m]++;
}
}
}
rrep(i, n) printf("%d\n", ans[i]);
return 0;
} | replace | 136 | 137 | 136 | 138 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
rrep(i, n) {
int ans = 0;
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
if (x * x + y * y + x * y > i)
break;
for (int z = 1; z * z <= n; ++z) {
if (g(x, y, z) == i) {
ans++;
}
}
}
}
printf("%d\n", ans);
}
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
int main() {
int n;
cin >> n;
rrep(i, n) {
int ans = 0;
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
if (x * x + y * y + x * y > i)
break;
for (int z = 1; z * z <= n; ++z) {
if (g(x, y, z) > i)
break;
if (g(x, y, z) == i) {
ans++;
}
}
}
}
printf("%d\n", ans);
}
return 0;
} | insert | 138 | 138 | 138 | 140 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int n;
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
bool binarySearch(int x, int y, int key) {
int l = 1;
int r = sqrt(n);
while (l < r) {
int m = (l + r) / 2;
if (g(x, y, m) == key)
return true;
else if (key < g(x, y, m))
r = m;
else
l = m + 1;
}
return false;
}
int main() {
cin >> n;
rrep(i, n) {
int ans = 0;
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
if (binarySearch(x, y, i))
ans++;
}
}
printf("%d\n", ans);
}
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x, y) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x, y, z) \
cout << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z \
<< " = " << (z) << endl
#define showv(v) \
rep(i, v.size()) printf("%d%c", v[i], i == v.size() - 1 ? '\n' : ' ')
#define showv2(v) rep(j, v.size()) showv(v[j])
#define showt(t, n) rep(i, n) printf("%d%c", t[i], i == n - 1 ? '\n' : ' ')
#define showt2(t, r, c) rep(j, r) showt(t[j], c)
#define showvp(p) rep(i, p.size()) printf("%d %d\n", p[i].first, p[i].second)
#define printv(v) rep(i, v.size()) printf("%d\n", v[i])
#define printt(t, n) rep(i, n) printf("%d\n", t[i])
#define incl(v, x) (find(all(v), x) != v.end())
#define incls(s, c) (s.find(c) != string::npos)
#define lb(a, x) distance((a).begin(), lower_bound(all(a), (x)))
#define ub(a, x) distance((a).begin(), upper_bound(all(a), (x)))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bit(n, k) ((n >> k) & 1) // nのk bit目
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define uni(x) x.erase(unique(all(x)), x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
// const long double EPS = 1e-14;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
#define dame \
{ \
puts("No"); \
return 0; \
}
#define yn \
{ puts("Yes"); } \
else { \
puts("No"); \
}
inline int in() {
int x;
cin >> x;
return x;
}
inline ll lin() {
ll x;
cin >> x;
return x;
}
inline char chin() {
char x;
cin >> x;
return x;
}
inline string stin() {
string x;
cin >> x;
return x;
}
inline double din() {
double x;
cin >> x;
return x;
}
// template<class T = int> inline T in() { T x; cin >> x; return (x);}
template <typename T> inline ll suma(const vector<T> &a) {
ll res(0);
for (auto &&x : a)
res += x;
return res;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int n;
ll g(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
bool binarySearch(int x, int y, int key) {
int l = 1;
int r = sqrt(n);
while (l < r) {
int m = (l + r) / 2;
if (g(x, y, m) == key)
return true;
else if (key < g(x, y, m))
r = m;
else
l = m + 1;
}
return false;
}
int main() {
cin >> n;
rrep(i, n) {
int ans = 0;
for (int x = 1; x * x <= n; ++x) {
for (int y = 1; y * y <= n; ++y) {
if (x * x + y * y + x * y > i)
break;
if (binarySearch(x, y, i))
ans++;
}
}
printf("%d\n", ans);
}
return 0;
} | insert | 151 | 151 | 151 | 153 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int f(int x, int y, int z) {
return pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
}
int main() {
int N;
cin >> N;
for (int n = 1; n <= N; n++) {
int ans = 0;
int intn = (int)sqrt(n) + 1;
for (int x = 1; x <= intn; x++) {
for (int y = 1; y <= x; y++) {
for (int z = 1; z <= y; z++) {
if (f(x, y, z) == n) {
// cout<<"x "<<x<<" y "<<y<<" z "<<z<<endl;
if (x == y && y == z)
ans++;
else if ((x == y) || (y == z))
ans += 3;
else
ans += 6;
}
}
}
}
cout << ans << endl;
}
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int f(int x, int y, int z) {
return pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
}
int main() {
int N;
cin >> N;
for (int n = 1; n <= N; n++) {
int ans = 0;
int intn = (int)sqrt(n) + 1;
for (int x = 1; x <= intn; x++) {
for (int y = 1; y <= x && f(x, y, 1) <= n; y++) {
for (int z = 1; z <= y && f(x, y, z) <= n; z++) {
if (f(x, y, z) == n) {
// cout<<"x "<<x<<" y "<<y<<" z "<<z<<endl;
if (x == y && y == z)
ans++;
else if ((x == y) || (y == z))
ans += 3;
else
ans += 6;
}
}
}
}
cout << ans << endl;
}
return 0;
} | replace | 17 | 19 | 17 | 19 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(X, Y, Z) for (ll(X) = (Y); (X) < (Z); (X)++)
#define REV(X, Y, Z) for (ll(X) = (Y); (X) > (Z); (X)--)
using namespace std;
using ld = long double;
using ll = long long;
using dll = deque<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using usll = unordered_set<ll>;
using umll = unordered_map<ll, ll>;
using sll = stack<int>;
using vll = vector<ll>;
using vvll = vector<vll>;
constexpr ll kMax = 1e12 + 1;
constexpr ll kMod = 1e9 + 7;
constexpr long double kPI = 3.14159265358979323846;
ll gcd(ll a, ll b) {
if (a < b) {
return gcd(b, a);
}
ll c = a % b;
while (c != 0) {
a = b;
b = c;
c = a % b;
}
return b;
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
void init() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
int main() {
init();
ll N;
cin >> N;
REP(n, 1, N + 1) {
ll ans = 0;
REP(i, 1, 101) {
REP(j, 1, 101) {
REP(k, 1, 101) {
if (i * i + j * j + k * k + i * j + j * k + k * i == n) {
ans++;
}
}
}
}
cout << ans << endl;
}
return 0;
}
| #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(X, Y, Z) for (ll(X) = (Y); (X) < (Z); (X)++)
#define REV(X, Y, Z) for (ll(X) = (Y); (X) > (Z); (X)--)
using namespace std;
using ld = long double;
using ll = long long;
using dll = deque<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using usll = unordered_set<ll>;
using umll = unordered_map<ll, ll>;
using sll = stack<int>;
using vll = vector<ll>;
using vvll = vector<vll>;
constexpr ll kMax = 1e12 + 1;
constexpr ll kMod = 1e9 + 7;
constexpr long double kPI = 3.14159265358979323846;
ll gcd(ll a, ll b) {
if (a < b) {
return gcd(b, a);
}
ll c = a % b;
while (c != 0) {
a = b;
b = c;
c = a % b;
}
return b;
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
void init() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
int main() {
init();
ll N;
cin >> N;
REP(n, 1, N + 1) {
ll ans = 0;
REP(i, 1, 101) {
REP(j, 1, 101) {
ll left = n - i * i - j * j - i * j;
if (left > 0) {
REP(k, 1, (ll)sqrt(left) + 1) {
ll right = i * k + j * k + k * k;
if (left == right) {
// cout << left << " == " << right << " i:" << i <<
// ",j:" << j
// << ",k:" << k << endl;
ans++;
}
}
}
}
}
cout << ans << endl;
}
return 0;
}
| replace | 71 | 74 | 71 | 81 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
// 最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
// 出力系
#define print(x) cout << x << endl
#define prints(x) cout << fixed << setprecision(20) << x << endl
#define printc(x) cout << setw(2) << setfill('0') << x << endl;
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// 配列入力
vector<long long> vecin(ll n) {
vector<long long> res(n);
for (int i = 0; i < n; i++)
cin >> res[i];
return res;
}
// begin() end()
#define all(x) (x).begin(), (x).end()
// for
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rrep(i, a, b) for (int i = (a); i > (b); i--)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
// 最大公約数
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
// 最小公倍数
unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; }
// a = max(a, b), a = min(a, b)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// num ^ pow(mod取る)
ll pow_mod(ll num, ll pow, ll mod) {
ll prod = 1;
num %= mod;
while (pow > 0) {
if (pow & 1)
prod = prod * num % mod;
num = num * num % mod;
pow >>= 1;
}
return prod;
}
// 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度)
// COMinit()
// COM(x, y)
// とコンビで使う
// テーブルを作る前処理
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// UnionFind
struct UnionFind {
vector<int> par;
vector<int> rank;
vector<ll> Size;
UnionFind(int n = 1) { init(n); }
void init(int n = 1) {
par.resize(n + 1);
rank.resize(n + 1);
Size.resize(n + 1);
for (int i = 0; i <= n; ++i)
par[i] = i, rank[i] = 0, Size[i] = 1;
}
int root(int x) {
if (par[x] == x) {
return x;
} else {
int r = root(par[x]);
return par[x] = r;
}
}
bool issame(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return false;
if (rank[x] < rank[y])
swap(x, y);
if (rank[x] == rank[y])
++rank[x];
par[y] = x;
Size[x] += Size[y];
return true;
}
ll size(int x) { return Size[root(x)]; }
};
// modint構造体
struct Mint {
int val;
Mint inv() const {
int tmp, a = val, b = mod, x = 1, y = 0;
while (b)
tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y);
return Mint(x);
}
public:
Mint() : val(0) {}
Mint(ll x) {
if ((val = x % mod) < 0)
val += mod;
}
Mint pow(ll t) {
Mint res = 1, b = *this;
while (t) {
if (t & 1)
res *= b;
b *= b;
t >>= 1;
}
return res;
}
Mint &operator+=(const Mint &x) {
if ((val += x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator-=(const Mint &x) {
if ((val += mod - x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator*=(const Mint &x) {
val = (ll)val * x.val % mod;
return *this;
}
Mint &operator/=(const Mint &x) { return *this *= x.inv(); }
bool operator==(const Mint &x) const { return val == x.val; }
bool operator!=(const Mint &x) const { return val != x.val; }
bool operator<(const Mint &x) const { return val < x.val; }
bool operator<=(const Mint &x) const { return val <= x.val; }
bool operator>(const Mint &x) const { return val > x.val; }
bool operator>=(const Mint &x) const { return val >= x.val; }
Mint operator+(const Mint &x) const { return Mint(*this) += x; }
Mint operator-(const Mint &x) const { return Mint(*this) -= x; }
Mint operator*(const Mint &x) const { return Mint(*this) *= x; }
Mint operator/(const Mint &x) const { return Mint(*this) /= x; }
};
struct factorial {
vector<Mint> Fact, Finv;
public:
// factorial fact(10000010);
// fact.nCr(a, b)
// 「fact」の部分は自由に名前変更可能
factorial(int maxx) {
Fact.resize(maxx + 1), Finv.resize(maxx + 1);
Fact[0] = Mint(1);
rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1);
Finv[maxx] = Mint(1) / Fact[maxx];
rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i;
}
Mint fact(int n, bool inv = 0) {
if (inv)
return Finv[n];
else
return Fact[n];
}
Mint nPr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[n - r];
}
Mint nCr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[r] * Finv[n - r];
}
};
// 1 * 2 * 3 .... * n (mod)
ll modfact(ll n) {
if (n <= 1)
return 1;
return (n * modfact(n - 1)) % MOD;
}
// kが角度だった場合:cos(k * (PI / 180));
// const double PI = acos(-1);のまま使うと円周率(M_PIもあるよ)
const double PI = acos(-1);
// 多次元 vector 生成 例: auto dp = make_vec<long long>(N+1, 5, 5, 5);
template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); }
template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) {
return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
// 素因数分解
vector<pair<long long, int>> factorize(long long n) {
vector<pair<long long, int>> res;
for (long long i = 2; i * i <= n; ++i) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
// 素数判定
bool primejudge(long long a) {
if (a <= 1)
return false;
for (long long i = 2; i * i <= a; i++) {
if (a % i == 0)
return false;
}
return true;
}
// 累積和
// vector<long long>sums(vector<int>n){
// vector<long long>res(n.size() + 1, 0);
// for(int i = 0; i < n.size(); i++) res[i + 1] = n[i] + res[i];
// return res;
// }
int dy[4] = {0, 1, 0, -1}, dx[4] = {1, 0, -1, 0};
int main() {
int n;
cin >> n;
vector<int> a(n + 1, 0);
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
int tmp = (x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x);
a[tmp]++;
}
}
}
for (int i = 1; i <= n; i++)
print(a[i]);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// long long
using ll = long long;
// pair<int, int>
using PII = pair<int, int>;
// 最大値、mod
const int MOD = 1000000007;
const int mod = 1000000007;
const int INF = 1000000000;
const long long LINF = 1e18;
const int MAX = 510000;
// 出力系
#define print(x) cout << x << endl
#define prints(x) cout << fixed << setprecision(20) << x << endl
#define printc(x) cout << setw(2) << setfill('0') << x << endl;
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// 配列入力
vector<long long> vecin(ll n) {
vector<long long> res(n);
for (int i = 0; i < n; i++)
cin >> res[i];
return res;
}
// begin() end()
#define all(x) (x).begin(), (x).end()
// for
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rrep(i, a, b) for (int i = (a); i > (b); i--)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
// 最大公約数
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
// 最小公倍数
unsigned lcm(unsigned a, unsigned b) { return a / gcd(a, b) * b; }
// a = max(a, b), a = min(a, b)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
// num ^ pow(mod取る)
ll pow_mod(ll num, ll pow, ll mod) {
ll prod = 1;
num %= mod;
while (pow > 0) {
if (pow & 1)
prod = prod * num % mod;
num = num * num % mod;
pow >>= 1;
}
return prod;
}
// 二項係数(MODとる、1 ≦ k ≦ n ≦ 10^7 程度)
// COMinit()
// COM(x, y)
// とコンビで使う
// テーブルを作る前処理
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// UnionFind
struct UnionFind {
vector<int> par;
vector<int> rank;
vector<ll> Size;
UnionFind(int n = 1) { init(n); }
void init(int n = 1) {
par.resize(n + 1);
rank.resize(n + 1);
Size.resize(n + 1);
for (int i = 0; i <= n; ++i)
par[i] = i, rank[i] = 0, Size[i] = 1;
}
int root(int x) {
if (par[x] == x) {
return x;
} else {
int r = root(par[x]);
return par[x] = r;
}
}
bool issame(int x, int y) { return root(x) == root(y); }
bool merge(int x, int y) {
x = root(x);
y = root(y);
if (x == y)
return false;
if (rank[x] < rank[y])
swap(x, y);
if (rank[x] == rank[y])
++rank[x];
par[y] = x;
Size[x] += Size[y];
return true;
}
ll size(int x) { return Size[root(x)]; }
};
// modint構造体
struct Mint {
int val;
Mint inv() const {
int tmp, a = val, b = mod, x = 1, y = 0;
while (b)
tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y);
return Mint(x);
}
public:
Mint() : val(0) {}
Mint(ll x) {
if ((val = x % mod) < 0)
val += mod;
}
Mint pow(ll t) {
Mint res = 1, b = *this;
while (t) {
if (t & 1)
res *= b;
b *= b;
t >>= 1;
}
return res;
}
Mint &operator+=(const Mint &x) {
if ((val += x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator-=(const Mint &x) {
if ((val += mod - x.val) >= mod)
val -= mod;
return *this;
}
Mint &operator*=(const Mint &x) {
val = (ll)val * x.val % mod;
return *this;
}
Mint &operator/=(const Mint &x) { return *this *= x.inv(); }
bool operator==(const Mint &x) const { return val == x.val; }
bool operator!=(const Mint &x) const { return val != x.val; }
bool operator<(const Mint &x) const { return val < x.val; }
bool operator<=(const Mint &x) const { return val <= x.val; }
bool operator>(const Mint &x) const { return val > x.val; }
bool operator>=(const Mint &x) const { return val >= x.val; }
Mint operator+(const Mint &x) const { return Mint(*this) += x; }
Mint operator-(const Mint &x) const { return Mint(*this) -= x; }
Mint operator*(const Mint &x) const { return Mint(*this) *= x; }
Mint operator/(const Mint &x) const { return Mint(*this) /= x; }
};
struct factorial {
vector<Mint> Fact, Finv;
public:
// factorial fact(10000010);
// fact.nCr(a, b)
// 「fact」の部分は自由に名前変更可能
factorial(int maxx) {
Fact.resize(maxx + 1), Finv.resize(maxx + 1);
Fact[0] = Mint(1);
rep(i, 0, maxx) Fact[i + 1] = Fact[i] * (i + 1);
Finv[maxx] = Mint(1) / Fact[maxx];
rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * i;
}
Mint fact(int n, bool inv = 0) {
if (inv)
return Finv[n];
else
return Fact[n];
}
Mint nPr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[n - r];
}
Mint nCr(int n, int r) {
if (n < 0 || n < r || r < 0)
return Mint(0);
else
return Fact[n] * Finv[r] * Finv[n - r];
}
};
// 1 * 2 * 3 .... * n (mod)
ll modfact(ll n) {
if (n <= 1)
return 1;
return (n * modfact(n - 1)) % MOD;
}
// kが角度だった場合:cos(k * (PI / 180));
// const double PI = acos(-1);のまま使うと円周率(M_PIもあるよ)
const double PI = acos(-1);
// 多次元 vector 生成 例: auto dp = make_vec<long long>(N+1, 5, 5, 5);
template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); }
template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) {
return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
// 素因数分解
vector<pair<long long, int>> factorize(long long n) {
vector<pair<long long, int>> res;
for (long long i = 2; i * i <= n; ++i) {
if (n % i)
continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)
res.emplace_back(n, 1);
return res;
}
// 素数判定
bool primejudge(long long a) {
if (a <= 1)
return false;
for (long long i = 2; i * i <= a; i++) {
if (a % i == 0)
return false;
}
return true;
}
// 累積和
// vector<long long>sums(vector<int>n){
// vector<long long>res(n.size() + 1, 0);
// for(int i = 0; i < n.size(); i++) res[i + 1] = n[i] + res[i];
// return res;
// }
int dy[4] = {0, 1, 0, -1}, dx[4] = {1, 0, -1, 0};
int main() {
int n;
cin >> n;
vector<int> a(n + 1, 0);
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
int tmp = (x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x);
if (tmp <= n)
a[tmp]++;
}
}
}
for (int i = 1; i <= n; i++)
print(a[i]);
return 0;
}
| replace | 294 | 295 | 294 | 296 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (i = 1; i <= n; ++i)
#define rrep(xyz, n) for (xyz = 1; xyz < n; ++xyz)
using namespace std;
int main(void) {
int N;
cin >> N;
int i, score, n, x, y, z;
rep(i, N) {
score = 0;
rrep(x, i) rrep(y, i) rrep(z, i) {
n = (x * x + y * y + z * z + x * y + y * z + z * x);
if (n == i) {
++score;
break;
} else if (n > i)
break;
}
cout << score << endl;
}
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (i = 1; i <= n; ++i)
#define rrep(xyz, n) for (xyz = 1; xyz * xyz < n; ++xyz)
using namespace std;
int main(void) {
int N;
cin >> N;
int i, score, n, x, y, z;
rep(i, N) {
score = 0;
rrep(x, i) rrep(y, i) rrep(z, i) {
n = (x * x + y * y + z * z + x * y + y * z + z * x);
if (n == i) {
++score;
break;
} else if (n > i)
break;
}
cout << score << endl;
}
return 0;
}
| replace | 2 | 3 | 2 | 3 | TLE | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)(x).size()
using namespace std;
using ll = long long;
constexpr ll INF = 3000000000000000000;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
for (ll x = 1; x * x <= n; ++x) {
for (ll y = 1; y * y <= n; ++y) {
for (ll z = 1; z * z <= n; ++z) {
ans[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; ++i)
cout << ans[i] << "\n";
return 0;
}
| #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)(x).size()
using namespace std;
using ll = long long;
constexpr ll INF = 3000000000000000000;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
for (ll x = 1; x * x <= n; ++x) {
for (ll y = 1; y * y <= n; ++y) {
for (ll z = 1; z * z <= n; ++z) {
if (x * x + y * y + z * z + x * y + y * z + z * x <= n) {
ans[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
}
for (int i = 1; i <= n; ++i)
cout << ans[i] << "\n";
return 0;
}
| replace | 28 | 29 | 28 | 31 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans[10100];
for (int i = 1; i <= N; i++) {
ans[i] = 0;
}
int l = 0;
for (int i = 0; i <= N; i++) {
l = i;
}
for (int x = 1; x <= l; x++) {
for (int y = 1; y <= l; y++) {
for (int z = 1; z <= l; z++) {
if ((x * x + y * y + z * z + x * y + y * z + z * x) <= N) {
ans[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
}
for (int i = 1; i <= N; i++) {
cout << ans[i] << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans[10100];
for (int i = 1; i <= N; i++) {
ans[i] = 0;
}
for (int x = 1; x <= 105; x++) {
for (int y = 1; y <= 105; y++) {
for (int z = 1; z <= 105; z++) {
if ((x * x + y * y + z * z + x * y + y * z + z * x) <= N) {
ans[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
}
for (int i = 1; i <= N; i++) {
cout << ans[i] << endl;
}
}
| replace | 9 | 17 | 9 | 12 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N + 1, 0);
for (int X = 1; X <= 100; X++) {
for (int Y = 1; Y <= 100; Y++) {
for (int Z = 1; Z <= 100; Z++) {
if (X * X + Y * Y + Z * Z + X * Y + Y * Z + Z + X <= N) {
A.at(X * X + Y * Y + Z * Z + X * Y + Y * Z + Z * X)++;
}
}
}
}
for (int i = 1; i <= N; i++)
cout << A.at(i) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A(N + 1, 0);
for (int X = 1; X <= 100; X++) {
for (int Y = 1; Y <= 100; Y++) {
for (int Z = 1; Z <= 100; Z++) {
if (X * X + Y * Y + Z * Z + X * Y + Y * Z + Z * X <= N) {
A.at(X * X + Y * Y + Z * Z + X * Y + Y * Z + Z * X)++;
}
}
}
}
for (int i = 1; i <= N; i++)
cout << A.at(i) << endl;
} | replace | 10 | 11 | 10 | 11 | 0 | |
p02608 | C++ | Time Limit Exceeded | #ifdef __APPLE__
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <ctgmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#else
#include <bits/stdc++.h>
#endif
using namespace std;
#define io ios_base::sync_with_stdio(false), cin.tie(NULL)
#define GFOR(i, a, n) for (i = a; i < n; i++)
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define RFOR(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define tc(t) for (int tc = 1; tc <= t; tc++)
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<long long int> vll;
typedef vector<pair<int, int>> vpi;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
mt19937 mrand(random_device{}());
const ll mod = 1000000007;
int rnd(int x) { return mrand() % x; }
ll powmod(ll a, ll b) {
ll res = 1;
a %= mod;
assert(b >= 0);
for (; b; b >>= 1) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
}
return res;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll modInverse(ll a) {
ll p = mod - 2;
return powmod(a, p);
}
// head
void solve() {
int n;
cin >> n;
FOR(i, 1, n + 1) {
ll cnt = 0;
for (int j = 1; j * j <= i; j++) {
for (int k = 1; k * k <= i; k++) {
for (int l = 1; l * l <= i; l++) {
if ((j * j + k * k + l * l + j * k + k * l + l * j) == i)
cnt++;
}
}
}
cout << cnt << "\n";
}
}
int main() {
#ifdef LOCAL
auto t1 = std::chrono::high_resolution_clock::now();
#endif
io;
int t = 1;
tc(t) { solve(); }
#ifdef LOCAL
auto t2 = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
std::cout << "Time Taken: " << duration << "\n";
#endif
}
// check for edge cases in limits
// printing double may print 1.223232e9 like values, beware of that
| #ifdef __APPLE__
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <ctgmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#else
#include <bits/stdc++.h>
#endif
using namespace std;
#define io ios_base::sync_with_stdio(false), cin.tie(NULL)
#define GFOR(i, a, n) for (i = a; i < n; i++)
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define RFOR(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define tc(t) for (int tc = 1; tc <= t; tc++)
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<long long int> vll;
typedef vector<pair<int, int>> vpi;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
mt19937 mrand(random_device{}());
const ll mod = 1000000007;
int rnd(int x) { return mrand() % x; }
ll powmod(ll a, ll b) {
ll res = 1;
a %= mod;
assert(b >= 0);
for (; b; b >>= 1) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
}
return res;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll modInverse(ll a) {
ll p = mod - 2;
return powmod(a, p);
}
// head
void solve() {
int n;
cin >> n;
FOR(i, 1, n + 1) {
ll cnt = 0;
for (int j = 1; j * j <= i; j++) {
for (int k = 1; k * k <= i; k++) {
ll temp = 4 * i - 3 * j * j - 3 * k * k - 2 * j * k;
if (temp >= 0) {
ll sq = sqrt(temp);
if (sq * sq == temp and (sq - j - k) % 2 == 0 and
(sq - j - k) / 2 >= 1)
cnt++;
}
}
}
cout << cnt << "\n";
}
}
int main() {
#ifdef LOCAL
auto t1 = std::chrono::high_resolution_clock::now();
#endif
io;
int t = 1;
tc(t) { solve(); }
#ifdef LOCAL
auto t2 = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
std::cout << "Time Taken: " << duration << "\n";
#endif
}
// check for edge cases in limits
// printing double may print 1.223232e9 like values, beware of that
| replace | 69 | 71 | 69 | 74 | TLE | |
p02608 | C++ | Runtime Error | #pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
#include <cstdlib>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// #define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>,
// rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef vector<pair<ll, ll>> vpll;
#define Boost() \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fo(i, n) for (ll i = 1; i <= n; i++)
#define fore(i, l, r) for (ll i = l; i <= r; i++)
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define all(c) c.begin(), c.end()
#define go(c, it) for (auto it = (c).begin(); it != (c).end(); it++)
// #define back(c,it) for(auto it=(c).rbegin(); it!=(c).rend(); it++)
#define fi first
#define se second
#define MOD 998244353
#define MAX 1000000007
#define N 2000009
#define N1 100007
ll power(ll a, ll b) {
ll res = 1;
a = a % MOD;
while (b > 0) {
if (b & 1) {
res = (res * a) % MOD;
}
a = (a * a) % MOD;
b >>= 1;
}
return res;
}
ll fact[500009];
ll fermat_inv(ll y) { return power(y, MOD - 2); }
ll nCrMod(ll n, ll r) {
ll p = fact[n];
ll q = (fact[r] * fact[n - r]) % MOD;
return (p * fermat_inv(q)) % MOD;
}
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
const ld PI = acos(-1.0);
vl g[N1];
int main() {
#ifndef ONLINE_JUDGE
freopen("input.cpp", "r", stdin);
freopen("output.cpp", "w", stdout);
#endif
Boost();
int t;
// cin>>t;
t = 1;
int t1 = t;
while (t--) {
ll n;
cin >> n;
ll dp[2 * n + 1];
ll i, j, k;
memset(dp, 0, sizeof(dp));
for (j = 1; j * j <= n; j++) {
ll x = n - j * j;
for (k = 1; k * k <= x; k++) {
ll y = n - k * k - j * k;
for (ll l = 1; l * l <= y; l++) {
ll w = j * j + k * k + l * l + j * k + k * l + j * l;
dp[w]++;
}
}
}
fo(i, n) cout << dp[i] << endl;
}
return 0;
} | #pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
#include <cstdlib>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// #define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>,
// rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef vector<pair<ll, ll>> vpll;
#define Boost() \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define pb push_back
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fo(i, n) for (ll i = 1; i <= n; i++)
#define fore(i, l, r) for (ll i = l; i <= r; i++)
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define all(c) c.begin(), c.end()
#define go(c, it) for (auto it = (c).begin(); it != (c).end(); it++)
// #define back(c,it) for(auto it=(c).rbegin(); it!=(c).rend(); it++)
#define fi first
#define se second
#define MOD 998244353
#define MAX 1000000007
#define N 2000009
#define N1 100007
ll power(ll a, ll b) {
ll res = 1;
a = a % MOD;
while (b > 0) {
if (b & 1) {
res = (res * a) % MOD;
}
a = (a * a) % MOD;
b >>= 1;
}
return res;
}
ll fact[500009];
ll fermat_inv(ll y) { return power(y, MOD - 2); }
ll nCrMod(ll n, ll r) {
ll p = fact[n];
ll q = (fact[r] * fact[n - r]) % MOD;
return (p * fermat_inv(q)) % MOD;
}
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
const ld PI = acos(-1.0);
vl g[N1];
int main() {
#ifndef ONLINE_JUDGE
freopen("input.cpp", "r", stdin);
freopen("output.cpp", "w", stdout);
#endif
Boost();
int t;
// cin>>t;
t = 1;
int t1 = t;
while (t--) {
ll n;
cin >> n;
ll dp[2 * n + 1];
ll i, j, k;
memset(dp, 0, sizeof(dp));
for (j = 1; j * j <= n; j++) {
ll x = n - j * j;
for (k = 1; k * k <= x; k++) {
ll y = n - k * k - j * k;
for (ll l = 1; l * l <= y; l++) {
ll w = j * j + k * k + l * l + j * k + k * l + j * l;
if (w <= n)
dp[w]++;
}
}
}
fo(i, n) cout << dp[i] << endl;
}
return 0;
} | replace | 79 | 80 | 79 | 81 | -11 | |
p02608 | C++ | Time Limit Exceeded | ///-----Bismillahir Rahmanir Rahim-----///
#include <bits/stdc++.h>
using namespace std;
///---FAST I/O---///
#define Boost() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
///---DATA TYPE---///
typedef long long ll;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<int>::iterator vit;
typedef set<int>::iterator sit;
///---LOOP---///
#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, n) for (i = 1; i <= n; i++)
///---I/O---///
#define sf scanf
#define pf printf
///---OTHERS---///
#define pb push_back
#define all(c) c.begin(), c.end()
#define MK make_pair
#define F first
#define S second
#define endl '\n'
///---INITIALIZATION---//
#define mem(a, b) memset(a, b, sizeof(a))
///---CALCULATE---///
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))
#define sqr(a) ((a) * (a))
///---BIT OPERATION---///
inline bool checkBit(ll n, int i) { return n & (1LL << i); }
inline ll setBit(ll n, int i) {
return n | (1LL << i);
;
}
inline ll resetBit(ll n, int i) { return n & (~(1LL << i)); }
///------String/Char Related Functions-----///
string makeintString(int x) {
stringstream ss;
ss << x;
string str = ss.str();
/// cout<<str<<endl;
return str;
}
string makellString(ll x) {
stringstream ss;
ss << x;
string str = ss.str();
/// cout<<str<<endl;
return str;
}
char cpp(char c) { return static_cast<char>(c + 1); }
///------------Sorting STL----------///
struct func {
// this is a sample overloading function for sorting stl
bool operator()(pii const &a, pii const &b) {
if (a.F == b.F)
return (a.S < b.S);
return (a.F < b.F);
}
};
///---CONSTANT---///
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
int main() {
Boost();
int t;
t = 1;
// cin>>t;
while (t--) {
map<int, int> cnt;
for (int i = 1; i <= 199; i++) {
for (int j = 1; j <= 199; j++) {
for (int k = 1; k <= 199; k++) {
int tmp = i * i + j * j + k * k + i * j + j * k + k * i;
cnt[tmp]++;
}
}
}
ll n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << cnt[i] << endl;
}
cnt.clear();
}
return 0;
}
| ///-----Bismillahir Rahmanir Rahim-----///
#include <bits/stdc++.h>
using namespace std;
///---FAST I/O---///
#define Boost() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
///---DATA TYPE---///
typedef long long ll;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<int>::iterator vit;
typedef set<int>::iterator sit;
///---LOOP---///
#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, n) for (i = 1; i <= n; i++)
///---I/O---///
#define sf scanf
#define pf printf
///---OTHERS---///
#define pb push_back
#define all(c) c.begin(), c.end()
#define MK make_pair
#define F first
#define S second
#define endl '\n'
///---INITIALIZATION---//
#define mem(a, b) memset(a, b, sizeof(a))
///---CALCULATE---///
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))
#define sqr(a) ((a) * (a))
///---BIT OPERATION---///
inline bool checkBit(ll n, int i) { return n & (1LL << i); }
inline ll setBit(ll n, int i) {
return n | (1LL << i);
;
}
inline ll resetBit(ll n, int i) { return n & (~(1LL << i)); }
///------String/Char Related Functions-----///
string makeintString(int x) {
stringstream ss;
ss << x;
string str = ss.str();
/// cout<<str<<endl;
return str;
}
string makellString(ll x) {
stringstream ss;
ss << x;
string str = ss.str();
/// cout<<str<<endl;
return str;
}
char cpp(char c) { return static_cast<char>(c + 1); }
///------------Sorting STL----------///
struct func {
// this is a sample overloading function for sorting stl
bool operator()(pii const &a, pii const &b) {
if (a.F == b.F)
return (a.S < b.S);
return (a.F < b.F);
}
};
///---CONSTANT---///
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007
int main() {
Boost();
int t;
t = 1;
// cin>>t;
while (t--) {
map<int, int> cnt;
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
int tmp = i * i + j * j + k * k + i * j + j * k + k * i;
cnt[tmp]++;
}
}
}
ll n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << cnt[i] << endl;
}
cnt.clear();
}
return 0;
}
| replace | 100 | 103 | 100 | 103 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
int nn = sqrt(n);
for (int x = 1; x <= nn; ++x) {
for (int y = 1; y <= nn; ++y) {
for (int z = 1; z <= nn; ++z) {
int f = x * x + y * y + z * z + x * y + y * z + z * x;
ans[f]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << ans[i] << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1, 0);
int nn = sqrt(n);
for (int x = 1; x <= nn; ++x) {
for (int y = 1; y <= nn; ++y) {
for (int z = 1; z <= nn; ++z) {
int f = x * x + y * y + z * z + x * y + y * z + z * x;
if (f <= n) {
ans[f]++;
}
}
}
}
for (int i = 1; i <= n; ++i) {
cout << ans[i] << endl;
}
return 0;
} | replace | 16 | 17 | 16 | 19 | 0 | |
p02608 | C++ | Time Limit Exceeded | /*************************************************\
In the name of almighty ALLAH
MD.Faysal Hasan
Comilla Univesity
\*************************************************/
#include <bits/stdc++.h>
using namespace std;
#define ikarus_101 \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef vector<pll> vpl;
typedef map<ll, ll> mll;
typedef multiset<ll> msl;
typedef multimap<ll, ll> Mll;
using pqboro = priority_queue<ll, vll, less<ll>>;
using pqchoto = priority_queue<ll, vll, greater<ll>>;
#define all(str) str.begin(), str.end()
#define sajo(str) sort(str.begin(), str.end())
#define rev(str) reverse(str.begin(), str.end())
#define usajo(str) sort(str.rbegin(), str.rend())
#define vin(a) \
for (auto &it : a) \
cin >> it
#define vout(a) \
for (auto it : a) \
cout << it << ' '; \
cout << nn
#define pb push_back
#define eb emplace_back
#define mkp(x, y) make_pair(x, y)
#define F first
#define S second
#define yes cout << "YES" << nn
#define no cout << "NO" << nn
#define nn "\n" /// endl
#define rep(i, n) for (i = 0; i < n; ++i)
#define rep1(i, n) for (i = 1; i <= n; ++i)
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define sqr(x) ((x) * (x))
#define pi 2 * acos(0.0)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a / gcd(a, b)) * b
#define mem(a, b) memset(a, b, sizeof(a))
#define dec(x) cout << fixed << setprecision(x)
#define none(n) __builtin_popcountll(n)
template <typename T> string toString(T Number) {
stringstream ss;
ss << Number;
return ss.str();
}
template <typename T> ll toll(T str) {
stringstream ss;
ss << str;
ll num;
ss >> num;
return num;
}
const int N = 2e5 + 7;
const int M = 1e9 + 7;
const ll inf = 0x7f7f7f7f7f7f7f7f;
ll a[N];
int main() {
ikarus_101
ll n,
m, i, j, k, x;
mem(a, 0);
cin >> n;
for (i = 1; i <= n; i++) {
for (j = 1; j < n; j++) {
for (k = 1; k < n; k++) {
x = sqr(i + j) + sqr(j + k) + sqr(k + i);
ll idx = x / 2;
if (idx * 10 < N)
a[idx]++;
}
}
}
rep1(i, n) cout << a[i] << nn;
}
| /*************************************************\
In the name of almighty ALLAH
MD.Faysal Hasan
Comilla Univesity
\*************************************************/
#include <bits/stdc++.h>
using namespace std;
#define ikarus_101 \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef vector<pll> vpl;
typedef map<ll, ll> mll;
typedef multiset<ll> msl;
typedef multimap<ll, ll> Mll;
using pqboro = priority_queue<ll, vll, less<ll>>;
using pqchoto = priority_queue<ll, vll, greater<ll>>;
#define all(str) str.begin(), str.end()
#define sajo(str) sort(str.begin(), str.end())
#define rev(str) reverse(str.begin(), str.end())
#define usajo(str) sort(str.rbegin(), str.rend())
#define vin(a) \
for (auto &it : a) \
cin >> it
#define vout(a) \
for (auto it : a) \
cout << it << ' '; \
cout << nn
#define pb push_back
#define eb emplace_back
#define mkp(x, y) make_pair(x, y)
#define F first
#define S second
#define yes cout << "YES" << nn
#define no cout << "NO" << nn
#define nn "\n" /// endl
#define rep(i, n) for (i = 0; i < n; ++i)
#define rep1(i, n) for (i = 1; i <= n; ++i)
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define sqr(x) ((x) * (x))
#define pi 2 * acos(0.0)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a / gcd(a, b)) * b
#define mem(a, b) memset(a, b, sizeof(a))
#define dec(x) cout << fixed << setprecision(x)
#define none(n) __builtin_popcountll(n)
template <typename T> string toString(T Number) {
stringstream ss;
ss << Number;
return ss.str();
}
template <typename T> ll toll(T str) {
stringstream ss;
ss << str;
ll num;
ss >> num;
return num;
}
const int N = 2e5 + 7;
const int M = 1e9 + 7;
const ll inf = 0x7f7f7f7f7f7f7f7f;
ll a[N];
int main() {
ikarus_101
ll n,
m, i, j, k, x;
mem(a, 0);
cin >> n;
for (i = 1; i <= 100; i++) {
for (j = 1; j <= 100; j++) {
for (k = 1; k <= n; k++) {
x = sqr(i + j) + sqr(j + k) + sqr(k + i);
ll idx = x / 2;
if (idx * 10 < N)
a[idx]++;
}
}
}
rep1(i, n) cout << a[i] << nn;
}
| replace | 85 | 88 | 85 | 88 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int A[40000] = {0};
int main() {
int N;
cin >> N;
for (int i = 1; i < 110; ++i) {
for (int j = 1; j < 110; ++j) {
for (int k = 1; k < 110; ++k) {
int temp = i * i + j * j + k * k + i * j + j * k + k * i;
++A[temp];
// cout << temp << " " << i << j << k << endl;
}
}
}
for (int i = 1; i <= N; ++i) {
cout << A[i] << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int A[40000] = {0};
int main() {
int N;
cin >> N;
for (int i = 1; i < 110; ++i) {
for (int j = 1; j < 110; ++j) {
for (int k = 1; k < 110; ++k) {
int temp = i * i + j * j + k * k + i * j + j * k + k * i;
if (temp <= 10010) {
++A[temp];
}
// cout << temp << " " << i << j << k << endl;
}
}
}
for (int i = 1; i <= N; ++i) {
cout << A[i] << endl;
}
}
| replace | 15 | 16 | 15 | 18 | -11 | |
p02608 | C++ | Runtime Error | // May this submission get accepted
#include <bits/stdc++.h>
// エイリアス
using ll = long signed long;
using ull = long unsigned long;
using ld = long double;
using namespace std;
// AtCoder/Codeforces 用 デバッグ検知
#ifdef ONLINE_JUDGE
constexpr bool DEBUG_MODE = false;
#else
constexpr bool DEBUG_MODE = true;
#endif
// エイリアス (補完・コンパイルが重くなる)
// #include <boost/multiprecision/cpp_int.hpp>
// using mll = boost::multiprecision::cpp_int;
// 汎用マクロ
#define ALLOF(x) (x).begin(), (x).end()
#define REP(i, n) for (long long i = 0, i##_len = (n); i < i##_len; i++)
#define RANGE(i, is, ie) \
for (long long i = (is), i##_end = (ie); i <= i##_end; i++)
#define DSRNG(i, is, ie) \
for (long long i = (is), i##_end = (ie); i >= i##_end; i--)
#define STEP(i, is, ie, step) \
for (long long i = (is), i##_end = (ie), i##_step = (step); i <= i##_end; \
i += i##_step)
#define UNIQUE(v) \
do { \
sort((v).begin(), (v).end()); \
(v).erase(unique((v).begin(), (v).end()), (v).end()); \
} while (false)
#define FOREACH(i, q) for (auto &i : q)
template <typename T, typename U> bool chmax(T &a, const U b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T, typename U> bool chmin(T &a, const U b) {
if (a > b) {
a = b;
return true;
}
return false;
}
constexpr int INF = numeric_limits<int>::max();
constexpr long long LINF = numeric_limits<long long>::max();
constexpr long double EPS = 1e-10L;
#define Yes(q) ((q) ? "Yes" : "No")
#define YES(q) ((q) ? "YES" : "NO")
#define Possible(q) ((q) ? "Possible" : "Impossible")
#define POSSIBLE(q) ((q) ? "POSSIBLE" : "IMPOSSIBLE")
#define IIF(q, t, f) ((q) ? (t) : (f))
#define DUMP(q) DUMP_FUNC(q, #q, __FILE__, __LINE__)
template <typename T> void DUMP_PROC(T x) {
if (is_integral<T>() || is_floating_point<T>())
cerr << "\e[32m" << x << "\e[m";
else
cerr << x;
}
template <> void DUMP_PROC<char>(char x) {
cerr << "\e[36m\'" << x << "\'\e[m";
}
template <> void DUMP_PROC<string>(string x) {
cerr << "\e[33m\"" << x << "\"\e[m";
}
template <typename T, typename U> void DUMP_PROC(pair<T, U> x) {
cerr << "{";
DUMP_PROC(x.first);
cerr << ", ";
DUMP_PROC(x.second);
cerr << "}";
}
template <typename... T, typename U, U... Seq>
void DUMP_PROC(tuple<T...> &x, integer_sequence<U, Seq...>) {
(void)(int[]){(cerr << ((const char *[]){"", ", "})[!!Seq]
<< (DUMP_PROC(get<Seq>(x)), ""),
0)...};
}
template <typename... T> void DUMP_PROC(tuple<T...> x) {
cerr << "{";
DUMP_PROC(x, index_sequence_for<T...>());
cerr << "}";
}
template <typename T> void DUMP_PROC(vector<T> x) {
cerr << "[";
for (auto &xi : x) {
DUMP_PROC(xi);
cerr << (&xi != &*x.rbegin() ? ", " : "");
}
cerr << "]";
}
template <typename T>
void DUMP_FUNC(T x, const char *name, const char *fn, int ln) {
cerr << "\e[32m[DEBUG]\e[m " << name << ": ";
DUMP_PROC(x);
cerr << " @ " << fn << "(" << ln << ")" << endl;
}
// gcc拡張マクロ
#define popcount __builtin_popcount
#define popcountll __builtin_popcountll
// 標準入出力
struct qin { // query input
size_t sz;
qin(size_t _sz = 1) : sz(_sz) {}
template <typename T> operator T() const {
T a;
cin >> a;
return a;
}
template <typename T> operator vector<T>() const {
vector<T> a(sz);
for (size_t i = 0; i < sz; i++)
cin >> a[i];
return a;
}
template <typename T, typename U> operator pair<T, U>() const {
T f;
U s;
cin >> f >> s;
return pair<T, U>(f, s);
}
};
qin in1; // input one
template <typename T> void say(const T x, const char *end = "\n") {
cout << x << end;
}
void say(const ld x, const char *end = "\n") {
cout << setprecision(30) << x << end;
}
template <typename T>
void say(const vector<T> x, const char *sep = " ", const char *end = "\n") {
REP(i, x.size()) { cout << x[i] << (i + 1 == i_len ? end : sep); }
}
template <typename T>
void say(const vector<vector<T>> x, const char *sep = " ",
const char *end = "\n") {
REP(i, x.size()) { say(x[i], sep, end); }
}
// モジュール
// [[LIBRARY]]
// [[/LIBRARY]]
// 処理内容
int main() {
ios::sync_with_stdio(false); // stdioを使うときはコメントアウトすること
cin.tie(nullptr); // インタラクティブ問題ではコメントアウトすること
ll n = in1;
ll nsqrt = 0;
while (nsqrt * nsqrt <= n)
nsqrt++;
nsqrt--;
vector<ll> ans(n + 1, 0);
RANGE(x, 1, nsqrt) {
RANGE(y, 1, nsqrt) {
RANGE(z, 1, nsqrt) {
ll w = x * x + y * y + z * z + x * y + y * z + z * x;
ans[w]++;
}
}
}
RANGE(i, 1, n) { say(ans[i]); }
} | // May this submission get accepted
#include <bits/stdc++.h>
// エイリアス
using ll = long signed long;
using ull = long unsigned long;
using ld = long double;
using namespace std;
// AtCoder/Codeforces 用 デバッグ検知
#ifdef ONLINE_JUDGE
constexpr bool DEBUG_MODE = false;
#else
constexpr bool DEBUG_MODE = true;
#endif
// エイリアス (補完・コンパイルが重くなる)
// #include <boost/multiprecision/cpp_int.hpp>
// using mll = boost::multiprecision::cpp_int;
// 汎用マクロ
#define ALLOF(x) (x).begin(), (x).end()
#define REP(i, n) for (long long i = 0, i##_len = (n); i < i##_len; i++)
#define RANGE(i, is, ie) \
for (long long i = (is), i##_end = (ie); i <= i##_end; i++)
#define DSRNG(i, is, ie) \
for (long long i = (is), i##_end = (ie); i >= i##_end; i--)
#define STEP(i, is, ie, step) \
for (long long i = (is), i##_end = (ie), i##_step = (step); i <= i##_end; \
i += i##_step)
#define UNIQUE(v) \
do { \
sort((v).begin(), (v).end()); \
(v).erase(unique((v).begin(), (v).end()), (v).end()); \
} while (false)
#define FOREACH(i, q) for (auto &i : q)
template <typename T, typename U> bool chmax(T &a, const U b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T, typename U> bool chmin(T &a, const U b) {
if (a > b) {
a = b;
return true;
}
return false;
}
constexpr int INF = numeric_limits<int>::max();
constexpr long long LINF = numeric_limits<long long>::max();
constexpr long double EPS = 1e-10L;
#define Yes(q) ((q) ? "Yes" : "No")
#define YES(q) ((q) ? "YES" : "NO")
#define Possible(q) ((q) ? "Possible" : "Impossible")
#define POSSIBLE(q) ((q) ? "POSSIBLE" : "IMPOSSIBLE")
#define IIF(q, t, f) ((q) ? (t) : (f))
#define DUMP(q) DUMP_FUNC(q, #q, __FILE__, __LINE__)
template <typename T> void DUMP_PROC(T x) {
if (is_integral<T>() || is_floating_point<T>())
cerr << "\e[32m" << x << "\e[m";
else
cerr << x;
}
template <> void DUMP_PROC<char>(char x) {
cerr << "\e[36m\'" << x << "\'\e[m";
}
template <> void DUMP_PROC<string>(string x) {
cerr << "\e[33m\"" << x << "\"\e[m";
}
template <typename T, typename U> void DUMP_PROC(pair<T, U> x) {
cerr << "{";
DUMP_PROC(x.first);
cerr << ", ";
DUMP_PROC(x.second);
cerr << "}";
}
template <typename... T, typename U, U... Seq>
void DUMP_PROC(tuple<T...> &x, integer_sequence<U, Seq...>) {
(void)(int[]){(cerr << ((const char *[]){"", ", "})[!!Seq]
<< (DUMP_PROC(get<Seq>(x)), ""),
0)...};
}
template <typename... T> void DUMP_PROC(tuple<T...> x) {
cerr << "{";
DUMP_PROC(x, index_sequence_for<T...>());
cerr << "}";
}
template <typename T> void DUMP_PROC(vector<T> x) {
cerr << "[";
for (auto &xi : x) {
DUMP_PROC(xi);
cerr << (&xi != &*x.rbegin() ? ", " : "");
}
cerr << "]";
}
template <typename T>
void DUMP_FUNC(T x, const char *name, const char *fn, int ln) {
cerr << "\e[32m[DEBUG]\e[m " << name << ": ";
DUMP_PROC(x);
cerr << " @ " << fn << "(" << ln << ")" << endl;
}
// gcc拡張マクロ
#define popcount __builtin_popcount
#define popcountll __builtin_popcountll
// 標準入出力
struct qin { // query input
size_t sz;
qin(size_t _sz = 1) : sz(_sz) {}
template <typename T> operator T() const {
T a;
cin >> a;
return a;
}
template <typename T> operator vector<T>() const {
vector<T> a(sz);
for (size_t i = 0; i < sz; i++)
cin >> a[i];
return a;
}
template <typename T, typename U> operator pair<T, U>() const {
T f;
U s;
cin >> f >> s;
return pair<T, U>(f, s);
}
};
qin in1; // input one
template <typename T> void say(const T x, const char *end = "\n") {
cout << x << end;
}
void say(const ld x, const char *end = "\n") {
cout << setprecision(30) << x << end;
}
template <typename T>
void say(const vector<T> x, const char *sep = " ", const char *end = "\n") {
REP(i, x.size()) { cout << x[i] << (i + 1 == i_len ? end : sep); }
}
template <typename T>
void say(const vector<vector<T>> x, const char *sep = " ",
const char *end = "\n") {
REP(i, x.size()) { say(x[i], sep, end); }
}
// モジュール
// [[LIBRARY]]
// [[/LIBRARY]]
// 処理内容
int main() {
ios::sync_with_stdio(false); // stdioを使うときはコメントアウトすること
cin.tie(nullptr); // インタラクティブ問題ではコメントアウトすること
ll n = in1;
ll nsqrt = 0;
while (nsqrt * nsqrt <= n)
nsqrt++;
nsqrt--;
vector<ll> ans(n + 1, 0);
RANGE(x, 1, nsqrt) {
RANGE(y, 1, nsqrt) {
RANGE(z, 1, nsqrt) {
ll w = x * x + y * y + z * z + x * y + y * z + z * x;
if (w <= n) {
ans[w]++;
}
}
}
}
RANGE(i, 1, n) { say(ans[i]); }
} | replace | 169 | 170 | 169 | 172 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll n;
cin >> n;
int ans = 0;
rep(i, 0, n) {
ans = 0;
for (ll x = 1; x * x <= i + 1; x++) {
for (ll y = 1; x * x + y * y <= i + 1; y++) {
for (ll z = 1; x * x + y * y + z * z <= i + 1; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i + 1)
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll n;
cin >> n;
int ans = 0;
rep(i, 0, n) {
ans = 0;
for (ll x = 1; x * x <= i + 1; x++) {
for (ll y = 1; x * x + y * y + x * y <= i + 1; y++) {
for (ll z = 1; x * x + y * y + z * z + x * y + y * z + z * x <= i + 1;
z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i + 1)
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
| replace | 13 | 15 | 13 | 16 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ll long long
using namespace std;
int main() {
int n;
cin >> n;
vector<int> ans(n + 1);
for (int i = 1; i <= n; i++) {
int sn = sqrt(i);
for (int x = 1; x < sn; x++) {
for (int y = 1; y <= sn; y++) {
if (x * x + y * y >= i)
continue;
for (int z = 1; z <= sn; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i)
ans[i]++;
}
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ll long long
using namespace std;
int main() {
int n;
cin >> n;
vector<int> ans(n + 5);
int sn = sqrt(n);
for (int x = 1; x < sn; x++) {
for (int y = 1; y <= sn; y++) {
for (int z = 1; z <= sn; z++) {
ll tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp <= n)
ans[tmp]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
}
| replace | 8 | 19 | 8 | 17 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define ps(x, y) fixed << setprecision(y) << x
#define mk(arr, n, type) type *arr = new type[n];
#define w(x) \
int x; \
cin >> x; \
while (x--)
#define pw(b, p) pow(b, p) + 0.1
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree<pii, null_type, less<pii>, rb_tree_tag,
tree_order_statistics_node_update>
pbds;
void c_p_c() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int arr1[20];
int arr2[20];
vector<int> adj[100005];
vector<int> sz(100005);
int ans = 0;
void dfs(int v, int par = 0) {
sz[v] = 1;
for (auto x : adj[v]) {
if (x == par)
continue;
dfs(x, v);
sz[v] += sz[x];
}
if (sz[v] % 2 == 0)
ans++;
}
int32_t main() {
c_p_c();
int n;
cin >> n;
vector<int> c(n + 1);
for (int x = 1; x <= n; x++) {
for (int y = 1; y <= n; y++) {
for (int z = 1; z <= n; z++) {
int res = x * x + y * y + z * z + x * y + y * z + x * z;
if (res <= n)
c[res]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << c[i] << endl;
}
} | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define ps(x, y) fixed << setprecision(y) << x
#define mk(arr, n, type) type *arr = new type[n];
#define w(x) \
int x; \
cin >> x; \
while (x--)
#define pw(b, p) pow(b, p) + 0.1
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree<pii, null_type, less<pii>, rb_tree_tag,
tree_order_statistics_node_update>
pbds;
void c_p_c() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int arr1[20];
int arr2[20];
vector<int> adj[100005];
vector<int> sz(100005);
int ans = 0;
void dfs(int v, int par = 0) {
sz[v] = 1;
for (auto x : adj[v]) {
if (x == par)
continue;
dfs(x, v);
sz[v] += sz[x];
}
if (sz[v] % 2 == 0)
ans++;
}
int32_t main() {
c_p_c();
int n;
cin >> n;
vector<int> c(n + 1);
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int res = x * x + y * y + z * z + x * y + y * z + x * z;
if (res <= n)
c[res]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << c[i] << endl;
}
} | replace | 62 | 65 | 62 | 65 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define yesno(flg) \
if (flg) { \
cout << "YES" << endl; \
} else { \
cout << "NO" << endl; \
}
#define MAX_N 1002
#define i197 1000000007
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P1;
typedef pair<int, int> Pi;
typedef pair<double, Pi> Pdi;
typedef pair<ll, int> Pli;
typedef pair<P1, ll> P2;
typedef pair<string, string> Ps;
const ll INF = 1000000000000000001;
struct edge {
int to, cost;
};
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
struct Road {
double cost;
int a, b;
};
struct pos {
// 1 変数を入れる;
int x, y, sx, sy, cost;
};
int f[101] = {};
int main() {
int n;
cin >> n;
for (int i = 1; i < 101; i++) {
for (int j = 1; j < 101; j++) {
for (int k = 1; k < 101; k++) {
ll t = i * i + j * j + k * k + i * j + j * k + k * i;
if (t > n)
break;
f[t]++;
}
}
}
rep(i, n) cout << f[i + 1] << endl;
return 0;
}
| #include <bits/stdc++.h>
#include <iostream>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define yesno(flg) \
if (flg) { \
cout << "YES" << endl; \
} else { \
cout << "NO" << endl; \
}
#define MAX_N 1002
#define i197 1000000007
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P1;
typedef pair<int, int> Pi;
typedef pair<double, Pi> Pdi;
typedef pair<ll, int> Pli;
typedef pair<P1, ll> P2;
typedef pair<string, string> Ps;
const ll INF = 1000000000000000001;
struct edge {
int to, cost;
};
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
struct Road {
double cost;
int a, b;
};
struct pos {
// 1 変数を入れる;
int x, y, sx, sy, cost;
};
int f[10001] = {};
int main() {
int n;
cin >> n;
for (int i = 1; i < 101; i++) {
for (int j = 1; j < 101; j++) {
for (int k = 1; k < 101; k++) {
ll t = i * i + j * j + k * k + i * j + j * k + k * i;
if (t > n)
break;
f[t]++;
}
}
}
rep(i, n) cout << f[i + 1] << endl;
return 0;
}
| replace | 35 | 36 | 35 | 36 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
int m = floor(sqrt((4 * N + 1) - 1) / 2);
for (int n = 1; n <= N; n++) {
int cnt = 0;
for (int x = 1; x <= m; x++) {
for (int y = 1; y <= m; y++) {
for (int z = 1; z <= m; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == n)
cnt++;
}
}
}
cout << cnt << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
int m = floor(sqrt((4 * N + 1) - 1) / 2);
for (int n = 1; n <= N; n++) {
int cnt = 0;
for (int x = 1; x <= m; x++) {
for (int y = 1; y <= x; y++) {
for (int z = 1; z <= y; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == n) {
if (x == y && y == z) {
cnt++;
} else if (x != y && y != z && z != x) {
cnt += 6;
} else {
cnt += 3;
}
}
}
}
}
cout << cnt << endl;
}
}
| replace | 11 | 15 | 11 | 22 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(a) (a).begin(), (a).end()
#define overload4(_1, _2, _3, _4, name, ...) name
#define rep1(n) for (ll i = 0; i < (n); i++)
#define rep2(i, n) for (ll i = 0; i < (n); i++)
#define rep3(i, a, b) for (ll i = (a); i < (b); i++)
#define rep4(i, a, b, c) for (ll i = (a); i < (b); i += (c))
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep1(n) for (ll i = (n)-1; i >= 0; i--)
#define rrep2(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rrep3(i, a, b) for (ll i = (a)-1; i >= (b); i--)
#define rrep4(i, a, b, c) for (ll i = (a)-1; i >= (b); i -= (c))
#define rrep(...) \
overload4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
const ll INF = 1e18, MOD = 1e9 + 7;
const int iINF = 1e9;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
//(x+y+z)^2 - (xy+yz+zx) == n
rep(i, 1, n + 1) {
int ans = 0;
int sq = sqrt(i);
rep(a, 1, sq + 1) rep(b, 1, sq + 1) rep(c, 1, sq + 1) {
if ((pow(a + b + c, 2) - (a * b + b * c + c * a)) == i)
ans++;
}
cout << ans << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(a) (a).begin(), (a).end()
#define overload4(_1, _2, _3, _4, name, ...) name
#define rep1(n) for (ll i = 0; i < (n); i++)
#define rep2(i, n) for (ll i = 0; i < (n); i++)
#define rep3(i, a, b) for (ll i = (a); i < (b); i++)
#define rep4(i, a, b, c) for (ll i = (a); i < (b); i += (c))
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep1(n) for (ll i = (n)-1; i >= 0; i--)
#define rrep2(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rrep3(i, a, b) for (ll i = (a)-1; i >= (b); i--)
#define rrep4(i, a, b, c) for (ll i = (a)-1; i >= (b); i -= (c))
#define rrep(...) \
overload4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
const ll INF = 1e18, MOD = 1e9 + 7;
const int iINF = 1e9;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
//(x+y+z)^2 - (xy+yz+zx) == n
rep(i, 1, n + 1) {
int ans = 0;
int sq = sqrt(i);
rep(a, 1, sq + 1) rep(b, 1, a + 1) rep(c, 1, b + 1) {
if ((pow(a + b + c, 2) - (a * b + b * c + c * a)) == i) {
if (a == b && b == c)
ans++;
else if (a == b || b == c || c == a)
ans += 3;
else
ans += 6;
}
}
cout << ans << endl;
}
return 0;
}
| replace | 31 | 34 | 31 | 40 | TLE | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
double pie = 3.14159265358979;
long long mod = 1000000007;
//
int main() {
int n = 0;
cin >> n;
int ans[1001] = {};
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
if (i * i + j * j + k * k + i * j + j * k + k * i <= n) {
ans[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
double pie = 3.14159265358979;
long long mod = 1000000007;
//
int main() {
int n = 0;
cin >> n;
int ans[100001] = {};
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
if (i * i + j * j + k * k + i * j + j * k + k * i <= n) {
ans[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
}
| replace | 21 | 22 | 21 | 22 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long ans[10004], n;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 1; n >= i * i; i++) {
for (int j = 1; n >= j * j; j++) {
for (int k = 1; n >= k * k; k++) {
ans[i * i + j * j + k * k + i * j + i * k + j * k]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
long long ans[100005], n;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 1; n >= i * i; i++) {
for (int j = 1; n >= j * j; j++) {
for (int k = 1; n >= k * k; k++) {
ans[i * i + j * j + k * k + i * j + i * k + j * k]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
}
| replace | 2 | 3 | 2 | 3 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define rep(i, n) \
; \
for (long long i = 0; i < (n); i++)
using ll = long long;
using P = pair<long long, long long>;
template <class T> using vec = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
ll f[1005];
for (ll i = 1; i <= n; i++) {
for (ll j = i; j <= n; j++) {
for (ll k = j; k <= n; k++) {
ll r = i * i + j * j + k * k + i * j + j * k + k * i;
if (r > n)
break;
if (i == j && i == k)
f[r]++;
else if (i == j || j == k || k == i)
f[r] += 3;
else
f[r] += 6;
}
}
}
rep(i, n) cout << f[i + 1] << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define rep(i, n) \
; \
for (long long i = 0; i < (n); i++)
using ll = long long;
using P = pair<long long, long long>;
template <class T> using vec = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
ll f[100005];
for (ll i = 1; i <= n; i++) {
for (ll j = i; j <= n; j++) {
for (ll k = j; k <= n; k++) {
ll r = i * i + j * j + k * k + i * j + j * k + k * i;
if (r > n)
break;
if (i == j && i == k)
f[r]++;
else if (i == j || j == k || k == i)
f[r] += 3;
else
f[r] += 6;
}
}
}
rep(i, n) cout << f[i + 1] << endl;
} | replace | 15 | 16 | 15 | 16 | 0 | |
p02608 | C++ | Runtime Error | // 7/10
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
int f[10010];
int main() {
int N;
cin >> N;
rep(i, 10010) f[i] = 0;
for (int x = 1; x * x <= N; x++) {
for (int y = 1; y * y <= N; y++) {
for (int z = 1; z * z <= N; z++) {
int now = x * x + y * y + z * z + x * y + y * z + z * x;
f[now] += 1;
}
}
}
rep(i, N) { cout << f[i + 1] << endl; }
return 0;
} | // 7/10
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
int f[10010];
int main() {
int N;
cin >> N;
rep(i, 10010) f[i] = 0;
for (int x = 1; x * x <= N; x++) {
for (int y = 1; y * y <= N; y++) {
for (int z = 1; z * z <= N; z++) {
int now = x * x + y * y + z * z + x * y + y * z + z * x;
if (now <= N)
f[now] += 1;
}
}
}
rep(i, N) { cout << f[i + 1] << endl; }
return 0;
} | replace | 18 | 19 | 18 | 20 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<int> count(N, 0);
int max = sqrt(N);
for (int x = 1; x <= max; x++) {
for (int y = 1; y <= max; y++) {
for (int z = 1; z <= max; z++) {
int t = x * x + y * y + z * z + x * y + y * z + z * x;
count[t - 1]++;
}
}
}
for (int ct : count) {
cout << ct << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
vector<int> count(N, 0);
int max = sqrt(N);
for (int x = 1; x <= max; x++) {
for (int y = 1; y <= max; y++) {
for (int z = 1; z <= max; z++) {
int t = x * x + y * y + z * z + x * y + y * z + z * x;
if (t - 1 < N)
count[t - 1]++;
}
}
}
for (int ct : count) {
cout << ct << endl;
}
return 0;
}
| replace | 13 | 14 | 13 | 15 | -6 | malloc(): corrupted top size
|
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int count = 0;
for (int n = 1; n <= N; n++) {
count = 0;
for (int x = 1; x < sqrt(n); x++) {
for (int y = 1; y < n - x * x; y++) {
for (int z = 1; z < n - x * x - y * y; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == n) {
count++;
}
}
}
}
cout << count << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int count = 0;
for (int n = 1; n <= N; n++) {
count = 0;
for (int x = 1; x < n; x++) {
if (x * x + 2 * x + 3 > n) {
break;
}
for (int y = 1; y < n; y++) {
if (x * x + y * y + 1 + x * y + y + x > n) {
break;
}
for (int z = 1; z < n; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x > n) {
break;
}
if (x * x + y * y + z * z + x * y + y * z + z * x == n) {
count++;
}
}
}
}
cout << count << endl;
}
return 0;
} | replace | 10 | 13 | 10 | 22 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
vector<int> ans(n + 1);
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
ans[x * x + y * y + z * z + x * y + y * z + z * x]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
vector<int> ans(n + 1);
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
int idx = x * x + y * y + z * z + x * y + y * z + z * x;
if (idx <= n)
ans[idx]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << endl;
return 0;
} | replace | 11 | 12 | 11 | 14 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
// #define int long long
// signed main(){
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int cnt = 0;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp > n)
break;
if (i == tmp)
cnt++;
}
}
}
cout << cnt << "\n";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
// #define int long long
// signed main(){
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int cnt = 0;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int tmp = x * x + y * y + z * z + x * y + y * z + z * x;
if (tmp > i)
break;
if (i == tmp)
cnt++;
}
}
}
cout << cnt << "\n";
}
return 0;
}
| replace | 19 | 20 | 19 | 20 | TLE | |
p02608 | C++ | Runtime Error | /*input
20
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 2;
int res[N];
inline int f(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + x * z;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
int m = (int)sqrt(n) + 1;
for (int x = 1; x <= m; ++x) {
for (int y = 1; y <= m; ++y) {
for (int z = 1; z <= m; ++z) {
res[f(x, y, z)]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << res[i] << endl;
}
return 0;
} | /*input
20
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
int res[N];
inline int f(int x, int y, int z) {
return x * x + y * y + z * z + x * y + y * z + x * z;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
int m = (int)sqrt(n) + 1;
for (int x = 1; x <= m; ++x) {
for (int y = 1; y <= m; ++y) {
for (int z = 1; z <= m; ++z) {
res[f(x, y, z)]++;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << res[i] << endl;
}
return 0;
} | replace | 7 | 8 | 7 | 8 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
#define INF 1e+9
#define MAX_V 300
struct edge {
int to;
int cost;
};
using P = pair<ll, ll>;
ll func(ll s) {
ll ans = 0;
for (ll x = 1; x < 102; x++) {
for (ll y = 1; y < 102; y++) {
for (ll z = 1; z < 102; z++) {
ll tmp = x * x + y * y + z * z + x * z + y * z + x * y;
if (tmp == s) {
ans++;
}
}
}
}
cout << ans << endl;
return 0;
}
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
func(i);
}
} | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
#define INF 1e+9
#define MAX_V 300
struct edge {
int to;
int cost;
};
using P = pair<ll, ll>;
ll func(ll s) {
ll ans = 0;
for (ll x = 1; x < 102; x++) {
for (ll y = 1; y < 102; y++) {
for (ll z = 1; z < 102; z++) {
ll tmp = x * x + y * y + z * z + x * z + y * z + x * y;
if (tmp == s) {
ans++;
break;
}
if (tmp > s) {
break;
}
}
}
}
cout << ans << endl;
return 0;
}
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
func(i);
}
} | insert | 43 | 43 | 43 | 47 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(a, b) \
if ((a) > (b)) \
(a) = (b);
#define chmax(a, b) \
if ((a) < (b)) \
(a) = (b);
#define vi vector<int>
#define pii pair<int, int>
#define all(v) (v).begin(), (v).end()
#define allr(v) (v).rbegin(), (v).rend()
#define pb push_back
#define pf push_front
int gcd(int a, int b) { /*a>=0,b>=0,¬(a=b=0)*/
while (min(a, b) > 0) {
if (a < b)
swap(a, b);
a %= b;
}
return max(a, b);
}
int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int MOD = 1e9 + 7;
const long long INF = 1e18 + 10;
/*--------------------------------------------------------------------*/
signed main() {
int n;
cin >> n;
FOR(i, 1, n) {
int ans = 0;
FOR(x, 1, sqrt(n) + 2) {
FOR(y, x, sqrt(n) + 2) {
int z = 0;
int ng = 0, ok = n + 1;
int mid;
while (ok - ng > 1) {
mid = (ok + ng) / 2;
if (2 * i <= (x + y) * (x + y) + (y + mid) * (y + mid) +
(mid + x) * (mid + x)) {
ok = mid;
} else {
ng = mid;
}
}
z = ok;
if (2 * i !=
(x + y) * (x + y) + (y + z) * (y + z) + (z + x) * (z + x)) {
continue;
}
ans++;
if (x < y) {
ans++;
}
// printf("%d %d %d\n",x,y,z);
}
}
cout << ans << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(a, b) \
if ((a) > (b)) \
(a) = (b);
#define chmax(a, b) \
if ((a) < (b)) \
(a) = (b);
#define vi vector<int>
#define pii pair<int, int>
#define all(v) (v).begin(), (v).end()
#define allr(v) (v).rbegin(), (v).rend()
#define pb push_back
#define pf push_front
int gcd(int a, int b) { /*a>=0,b>=0,¬(a=b=0)*/
while (min(a, b) > 0) {
if (a < b)
swap(a, b);
a %= b;
}
return max(a, b);
}
int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int MOD = 1e9 + 7;
const long long INF = 1e18 + 10;
/*--------------------------------------------------------------------*/
signed main() {
int n;
cin >> n;
FOR(i, 1, n) {
int ans = 0;
FOR(x, 1, sqrt(i)) {
FOR(y, x, sqrt(i)) {
if (x * x + y * y + x * y > n) {
break;
}
int z = 0;
int ng = 0, ok = n + 1;
int mid;
while (ok - ng > 1) {
mid = (ok + ng) / 2;
if (2 * i <= (x + y) * (x + y) + (y + mid) * (y + mid) +
(mid + x) * (mid + x)) {
ok = mid;
} else {
ng = mid;
}
}
z = ok;
if (2 * i !=
(x + y) * (x + y) + (y + z) * (y + z) + (z + x) * (z + x)) {
continue;
}
ans++;
if (x < y) {
ans++;
}
// printf("%d %d %d\n",x,y,z);
}
}
cout << ans << endl;
}
return 0;
}
| replace | 39 | 41 | 39 | 44 | TLE | |
p02608 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
const double pi = acos(-1);
int main() {
ll N;
cin >> N;
vector<int> f = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3,
0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0,
0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1,
6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3,
6, 0, 0, 0, 6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 0, 3, 6,
0, 0, 0, 0, 6, 1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3,
6, 0, 0, 0, 3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0,
0, 0, 3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0,
6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0, 6, 6,
12, 0, 0, 6, 0, 0, 6, 0, 12, 3, 6, 0, 6, 3, 9, 6, 3, 6,
6, 0, 6, 0, 6, 0, 15, 6, 0, 0, 6, 0, 3, 3, 12, 0, 12, 6,
6, 0, 3, 6, 6, 3, 12, 0, 6, 0, 9, 6, 0, 0, 6, 3, 12, 1,
6, 6, 6, 6, 0, 0, 18, 0, 12, 0, 3, 6, 12, 0, 0, 6, 3, 6,
12, 0, 12, 0, 0, 0, 9, 3, 9, 6, 12, 3, 12, 0, 3, 6, 6, 0,
12, 0, 12, 0, 9, 9, 0, 0, 6, 3, 6, 3, 12, 6, 9, 3, 6, 0,
12, 3, 6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6, 0, 12, 3,
6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0, 0, 6,
15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 3, 3,
18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0, 12, 0, 9, 6, 0, 3,
12, 3, 6, 6, 12, 6, 6, 0, 0, 0, 15, 3, 18, 3, 18, 3, 12, 6,
3, 6, 9, 0, 12, 0, 12, 0, 18, 12, 0, 0, 12, 3, 6, 0, 6, 6,
9, 6, 0, 0, 18, 1, 18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6,
18, 0, 0, 6, 0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0,
12, 0, 3, 6, 12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3,
27, 6, 6, 6, 6, 3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0, 9, 9,
15, 3, 12, 6, 6, 3, 9, 6, 12, 12, 18, 0, 18, 0, 6, 6, 21, 6,
0, 0, 6, 3, 15, 6, 12, 6, 18, 0, 0, 0, 12, 6, 6, 3, 6, 4,
18, 6, 12, 6, 3, 9, 30, 0, 18, 0, 6, 6, 12, 6, 6, 9, 12, 0,
18, 6, 18, 0, 6, 0, 12, 0, 6, 12, 6, 3, 18, 0, 6, 6, 6, 6,
15, 3, 24, 0, 6, 3, 18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6,
0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0,
12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 12, 0,
21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0, 12, 6,
24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3, 12, 6, 6, 12,
24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21, 12, 0, 6,
18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3, 18, 6,
21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12, 12,
18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12,
24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0,
12, 3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6,
0, 6, 9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0, 9, 12,
21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0,
18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6,
30, 3, 6, 12, 6, 12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6,
24, 0, 12, 6, 12, 0, 18, 0, 18, 15, 18, 3, 18, 6, 12, 6, 6, 12,
3, 6, 6, 0, 12, 3, 39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6,
18, 0, 12, 0, 9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0,
18, 0, 9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1,
18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6, 12, 15,
24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0, 12, 6, 12, 12,
18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6, 30, 9, 6, 12, 24, 12,
12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18, 3, 18, 3, 12, 6,
24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9, 12, 0, 3, 12,
36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9,
24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0,
6, 0, 27, 12, 18, 3, 30, 3, 18, 6};
rep(i, N) { cout << f.at(i) << endl; }
return 0;
}
| #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
const double pi = acos(-1);
int main() {
ll N;
cin >> N;
vector<int> f = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
3, 3, 0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0,
3, 3, 6, 0, 0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0,
0, 0, 3, 0, 0, 1, 6, 0, 6, 6, 0, 0, 6, 0, 0, 0,
0, 3, 3, 3, 6, 0, 6, 3, 6, 0, 0, 0, 6, 0, 0, 0,
3, 3, 9, 0, 6, 3, 6, 0, 3, 6, 0, 0, 0, 0, 6, 1,
6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3, 6, 0, 0, 0,
3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0, 0, 0,
3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0,
6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0,
6, 6, 12, 0, 0, 6, 0, 0, 6, 0, 12, 3, 6, 0, 6, 3,
9, 6, 3, 6, 6, 0, 6, 0, 6, 0, 15, 6, 0, 0, 6, 0,
3, 3, 12, 0, 12, 6, 6, 0, 3, 6, 6, 3, 12, 0, 6, 0,
9, 6, 0, 0, 6, 3, 12, 1, 6, 6, 6, 6, 0, 0, 18, 0,
12, 0, 3, 6, 12, 0, 0, 6, 3, 6, 12, 0, 12, 0, 0, 0,
9, 3, 9, 6, 12, 3, 12, 0, 3, 6, 6, 0, 12, 0, 12, 0,
9, 9, 0, 0, 6, 3, 6, 3, 12, 6, 9, 3, 6, 0, 12, 3,
6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6, 0, 12, 3,
6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0,
0, 6, 15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0,
12, 12, 3, 3, 18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0,
12, 0, 9, 6, 0, 3, 12, 3, 6, 6, 12, 6, 6, 0, 0, 0,
15, 3, 18, 3, 18, 3, 12, 6, 3, 6, 9, 0, 12, 0, 12, 0,
18, 12, 0, 0, 12, 3, 6, 0, 6, 6, 9, 6, 0, 0, 18, 1,
18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6, 18, 0, 0, 6,
0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0, 12, 0,
3, 6, 12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3,
27, 6, 6, 6, 6, 3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0,
9, 9, 15, 3, 12, 6, 6, 3, 9, 6, 12, 12, 18, 0, 18, 0,
6, 6, 21, 6, 0, 0, 6, 3, 15, 6, 12, 6, 18, 0, 0, 0,
12, 6, 6, 3, 6, 4, 18, 6, 12, 6, 3, 9, 30, 0, 18, 0,
6, 6, 12, 6, 6, 9, 12, 0, 18, 6, 18, 0, 6, 0, 12, 0,
6, 12, 6, 3, 18, 0, 6, 6, 6, 6, 15, 3, 24, 0, 6, 3,
18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6, 0, 0, 18, 3,
6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0, 12, 6,
6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 12, 0,
21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0,
12, 6, 24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3,
12, 6, 6, 12, 24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0,
18, 9, 21, 12, 0, 6, 18, 0, 9, 6, 6, 6, 12, 0, 12, 0,
9, 9, 27, 6, 6, 3, 18, 6, 21, 6, 6, 12, 12, 0, 12, 0,
24, 12, 0, 0, 24, 3, 24, 6, 12, 12, 18, 0, 0, 0, 12, 0,
18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12, 24, 0, 12, 3,
6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0, 12, 3,
12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6,
0, 6, 9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0,
9, 12, 21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6,
12, 12, 18, 0, 18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0,
24, 6, 9, 3, 12, 6, 30, 3, 6, 12, 6, 12, 12, 0, 36, 0,
6, 3, 27, 12, 12, 6, 6, 6, 24, 0, 12, 6, 12, 0, 18, 0,
18, 15, 18, 3, 18, 6, 12, 6, 6, 12, 3, 6, 6, 0, 12, 3,
39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6, 18, 0, 12, 0,
9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0, 18, 0,
9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1,
18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6,
12, 15, 24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0,
12, 6, 12, 12, 18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6,
30, 9, 6, 12, 24, 12, 12, 0, 15, 18, 12, 0, 18, 0, 24, 6,
15, 6, 18, 3, 18, 3, 12, 6, 24, 12, 12, 12, 6, 0, 36, 0,
18, 3, 6, 12, 6, 9, 12, 0, 3, 12, 36, 0, 30, 0, 12, 0,
18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9, 24, 0, 18, 6,
18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0, 6, 0,
27, 12, 18, 3, 30, 3, 18, 6, 0, 12, 15, 6, 18, 0, 24, 0,
9, 6, 9, 12, 18, 7, 24, 0, 24, 12, 15, 12, 24, 0, 24, 0,
6, 9, 30, 9, 6, 6, 0, 9, 33, 12, 36, 0, 12, 0, 18, 0,
6, 21, 12, 6, 36, 6, 0, 3, 18, 6, 12, 6, 24, 0, 12, 3,
24, 6, 9, 12, 6, 6, 30, 6, 18, 12, 9, 9, 12, 0, 30, 3,
18, 3, 27, 6, 30, 12, 12, 0, 24, 0, 27, 12, 6, 0, 24, 3,
18, 18, 9, 6, 18, 0, 12, 3, 33, 18, 12, 9, 6, 0, 12, 6,
30, 0, 24, 12, 12, 0, 30, 6, 6, 6, 0, 6, 24, 0, 12, 0,
18, 15, 33, 6, 30, 15, 18, 0, 9, 12, 24, 9, 12, 0, 18, 6,
27, 18, 15, 6, 18, 3, 24, 0, 6, 6, 36, 12, 18, 0, 12, 3,
30, 3, 12, 6, 12, 15, 6, 0, 18, 12, 15, 9, 30, 0, 18, 6,
12, 12, 18, 6, 6, 3, 24, 1, 27, 12, 18, 6, 18, 0, 24, 0,
18, 15, 15, 21, 30, 6, 12, 12, 18, 0, 30, 6, 24, 0, 6, 0,
18, 6, 36, 12, 6, 6, 36, 0, 6, 12, 12, 12, 24, 0, 30, 0,
9, 6, 18, 0, 18, 12, 12, 6, 24, 6, 9, 15, 12, 0, 12, 6,
30, 9, 18, 0, 42, 3, 18, 6, 12, 18, 33, 12, 12, 0, 18, 0,
21, 12, 12, 12, 24, 6, 30, 0, 27, 18, 6, 12, 6, 0, 24, 0,
18, 15, 30, 0, 18, 12, 6, 0, 21, 6, 21, 12, 24, 0, 30, 0,
6, 6, 6, 12, 24, 0, 30, 12, 9, 12, 21, 3, 24, 0, 12, 3,
21, 18, 9, 18, 18, 6, 30, 3, 42, 6, 21, 6, 30, 0, 6, 3,
24, 9, 36, 6, 6, 9, 12, 6, 18, 12, 33, 9, 12, 0, 24, 9,
9, 6, 3, 18, 36, 6, 18, 0, 24, 6, 6, 6, 18, 0, 12, 0,
30, 3, 39, 12, 12, 7, 18, 0, 15, 18, 18, 9, 36, 0, 24, 6,
6, 18, 30, 0, 18, 9, 18, 3, 24, 6, 21, 12, 24, 0, 30, 3,
33, 24, 12, 6, 18, 6, 6, 6, 18, 6, 18, 12, 18, 0, 24, 6,
36, 3, 18, 6, 0, 12, 30, 0, 9, 24, 18, 0, 24, 0, 18, 0,
0, 12, 30, 15, 30, 6, 18, 3, 30, 0, 24, 18, 12, 0, 36, 3,
24, 12, 15, 18, 18, 6, 24, 3, 24, 12, 18, 12, 24, 0, 0, 6,
39, 6, 24, 3, 18, 3, 42, 6, 12, 12, 15, 9, 30, 0, 12, 0,
18, 6, 18, 12, 24, 15, 12, 0, 12, 12, 30, 12, 12, 0, 18, 0,
15, 15, 18, 18, 30, 3, 24, 12, 9, 6, 48, 0, 18, 0, 30, 0,
21, 6, 12, 12, 24, 12, 18, 3, 48, 24, 6, 6, 18, 0, 36, 0,
12, 15, 27, 6, 12, 12, 18, 6, 27, 6, 12, 9, 18, 0, 24, 6,
18, 18, 21, 0, 36, 0, 12, 0, 18, 12, 21, 18, 24, 0, 12, 1,
18, 9, 21, 18, 6, 9, 42, 3, 36, 12, 12, 12, 30, 0, 12, 6,
21, 12, 36, 6, 24, 9, 12, 6, 12, 12, 24, 12, 18, 0, 42, 0,
15, 6, 15, 15, 42, 6, 30, 6, 12, 12, 18, 12, 18, 0, 6, 6,
36, 0, 30, 18, 6, 0, 6, 0, 30, 18, 18, 0, 42, 0, 18, 6,
15, 18, 24, 0, 12, 6, 36, 9, 33, 12, 12, 12, 18, 0, 36, 0,
21, 21, 15, 18, 18, 15, 18, 0, 18, 6, 42, 6, 24, 0, 18, 3,
42, 6, 18, 12, 12, 12, 18, 0, 15, 12, 18, 12, 36, 0, 30, 12,
3, 21, 18, 0, 30, 6, 24, 0, 27, 12, 18, 12, 6, 0, 12, 0,
36, 15, 15, 3, 36, 12, 18, 6, 30, 6, 33, 12, 12, 0, 12, 6,
24, 6, 54, 18, 12, 3, 36, 9, 9, 12, 12, 18, 36, 0, 6, 0,
21, 15, 27, 9, 24, 12, 30, 6, 24, 6, 27, 18, 12, 0, 30, 0,
21, 12, 18, 6, 30, 0, 18, 0, 21, 18, 21, 6, 30, 0, 24, 3,
6, 6, 15, 27, 12, 10, 42, 6, 36, 12, 12, 6, 24, 0, 24, 6,
12, 12, 48, 6, 18, 12, 0, 3, 51, 6, 30, 6, 24, 0, 24, 0,
30, 21, 15, 12, 24, 9, 18, 6, 18, 12, 30, 9, 24, 0, 18, 0,
27, 18, 9, 6, 18, 9, 54, 0, 18, 24, 21, 18, 12, 0, 24, 0,
12, 0, 30, 9, 30, 12, 6, 9, 24, 6, 15, 15, 18, 0, 30, 3,
33, 18, 21, 12, 42, 3, 30, 6, 6, 24, 27, 6, 12, 0, 24, 3,
42, 6, 42, 9, 12, 6, 18, 6, 24, 12, 12, 12, 54, 0, 6, 12,
18, 6, 18, 18, 30, 12, 30, 0, 18, 0, 27, 18, 24, 0, 18, 0,
15, 24, 21, 6, 24, 3, 36, 6, 6, 6, 45, 21, 18, 0, 18, 6,
33, 3, 18, 0, 24, 15, 30, 0, 30, 24, 12, 6, 36, 0, 24, 3,
21, 24, 18, 15, 30, 3, 12, 6, 42, 12, 12, 12, 6, 0, 54, 6,
30, 15, 24, 18, 24, 6, 12, 0, 9, 6, 30, 0, 48, 0, 24, 0,
15, 12, 39, 12, 24, 6, 24, 6, 15, 30, 12, 6, 24, 0, 24, 3,
24, 12, 24, 6, 6, 18, 12, 4, 54, 6, 21, 18, 18, 0, 36, 6,
24, 9, 30, 12, 24, 9, 36, 6, 12, 18, 42, 3, 30, 0, 6, 9,
21, 6, 12, 30, 30, 6, 30, 0, 27, 12, 9, 18, 30, 0, 36, 0,
18, 9, 42, 6, 24, 12, 0, 6, 51, 12, 24, 12, 12, 0, 18, 6,
12, 18, 6, 6, 36, 3, 54, 9, 18, 6, 27, 12, 18, 0, 30, 0,
39, 9, 18, 18, 12, 9, 30, 6, 21, 12, 27, 18, 24, 0, 12, 0,
42, 18, 42, 6, 24, 15, 18, 0, 24, 12, 45, 12, 6, 0, 54, 0,
15, 21, 6, 6, 30, 6, 18, 12, 24, 18, 30, 6, 36, 0, 12, 3,
24, 12, 18, 18, 18, 12, 24, 0, 33, 12, 27, 6, 42, 0, 18, 6,
9, 15, 30, 6, 30, 6, 12, 6, 18, 6, 33, 15, 30, 0, 36, 3,
27, 21, 33, 24, 30, 9, 24, 0, 12, 18, 33, 6, 6, 0, 18, 3,
57, 12, 24, 18, 30, 9, 18, 0, 18, 12, 27, 12, 36, 0, 36, 6,
12, 6, 27, 12, 30, 9, 24, 6, 39, 18, 12, 24, 12, 0, 30, 0,
30, 6, 15, 15, 18, 3, 24, 18, 9, 12, 30, 9, 30, 0, 18, 6,
42, 18, 30, 0, 6, 10, 48, 0, 24, 12, 12, 18, 48, 0, 30, 3,
30, 15, 18, 6, 24, 18, 18, 0, 42, 6, 36, 15, 24, 0, 42, 12,
21, 24, 12, 12, 24, 0, 12, 6, 18, 18, 60, 6, 30, 0, 12, 0,
24, 0, 12, 18, 30, 15, 42, 0, 33, 30, 6, 6, 12, 0, 42, 3,
27, 6, 33, 12, 36, 12, 18, 0, 30, 6, 18, 12, 12, 0, 18, 6,
15, 27, 27, 6, 42, 6, 36, 9, 18, 30, 33, 9, 30, 0, 6, 6,
54, 6, 36, 24, 24, 0, 30, 3, 12, 6, 21, 24, 30, 0, 24, 0,
24, 12, 42, 9, 42, 21, 12, 12, 27, 12, 27, 6, 12, 0, 48, 6,
12, 18, 12, 12, 36, 6, 30, 0, 24, 0, 42, 12, 12, 0, 36, 0,
24, 15, 21, 21, 18, 6, 12, 9, 36, 18, 18, 15, 42, 0, 18, 6,
9, 18, 48, 12, 30, 9, 24, 3, 33, 6, 18, 18, 18, 0, 36, 3,
54, 24, 3, 12, 36, 9, 36, 6, 30, 12, 36, 12, 24, 0, 18, 6,
24, 6, 42, 0, 24, 18, 18, 0, 9, 30, 39, 12, 42, 0, 36, 0,
12, 12, 21, 12, 18, 12, 24, 6, 45, 6, 18, 24, 18, 0, 36, 0,
42, 15, 18, 6, 24, 6, 12, 12, 18, 12, 30, 6, 18, 0, 30, 1,
30, 9, 57, 9, 12, 9, 48, 6, 21, 24, 18, 12, 66, 0, 18, 6,
9, 24, 24, 24, 30, 12, 18, 0, 48, 6, 24, 18, 18, 0, 24, 3,
27, 18, 24, 12, 36, 6, 48, 6, 15, 18, 42, 6, 24, 0, 12, 12,
36, 6, 6, 24, 12, 3, 48, 0, 48, 18, 0, 12, 18, 0, 36, 6,
18, 9, 54, 15, 12, 12, 6, 6, 39, 6, 24, 18, 42, 0, 30, 0,
33, 18, 24, 18, 18, 9, 18, 0, 15, 18, 54, 0, 36, 0, 24, 0,
48, 24, 15, 18, 18, 12, 42, 9, 24, 12, 36, 21, 30, 0, 36, 12,
24, 3, 30, 0, 48, 15, 12, 6, 15, 18, 18, 18, 24, 0, 30, 0,
24, 24, 18, 9, 72, 0, 30, 6, 21, 18, 30, 6, 24, 0, 0, 6,
24, 18, 42, 12, 6, 15, 36, 0, 30, 18, 30, 12, 24, 0, 6, 0,
18, 12, 54, 9, 36, 9, 36, 9, 30, 6, 27, 27, 24, 0, 54, 6,
21, 18, 21, 6, 36, 15, 36, 3, 30, 12, 6, 18, 30, 0, 18, 6,
54, 0, 30, 21, 36, 9, 30, 6, 30, 24, 24, 6, 30, 0, 36, 12,
9, 24, 24, 12, 18, 9, 30, 0, 48, 12, 24, 12, 12, 0, 48, 0,
18, 12, 24, 24, 30, 6, 18, 12, 21, 12, 24, 0, 66, 0, 12, 0,
30, 9, 24, 24, 18, 13, 42, 3, 18, 18, 27, 24, 24, 0, 30, 6,
15, 18, 39, 12, 12, 9, 36, 12, 54, 12, 42, 18, 6, 0, 36, 0,
51, 18, 12, 0, 66, 12, 24, 0, 6, 24, 51, 12, 24, 0, 24, 0,
33, 6, 18, 18, 30, 6, 42, 3, 18, 30, 15, 15, 30, 0, 30, 6,
30, 12, 48, 12, 24, 12, 12, 9, 36, 6, 36, 6, 12, 0, 30, 0,
24, 21, 24, 15, 42, 12, 24, 6, 9, 18, 15, 9, 42, 0, 24, 12,
66, 12, 30, 24, 6, 9, 54, 0, 36, 12, 21, 12, 36, 0, 24, 3,
24, 15, 36, 6, 30, 24, 12, 6, 33, 6, 39, 21, 30, 0, 42, 6,
12, 30, 30, 18, 36, 0, 48, 3, 36, 12, 30, 18, 18, 0, 24, 0,
30, 6, 33, 21, 24, 6, 18, 12, 24, 12, 12, 15, 48, 0, 24, 6,
21, 21, 60, 6, 24, 12, 18, 0, 30, 12, 15, 12, 24, 0, 24, 3,
60, 27, 18, 12, 30, 3, 24, 9, 21, 12, 60, 18, 24, 0, 24, 9,
33, 6, 36, 12, 24, 15, 42, 6, 27, 36, 27, 6, 42, 0, 42, 6,
12, 15, 15, 24, 42, 18, 12, 0, 33, 6, 21, 18, 24, 0, 48, 3,
36, 9, 24, 24, 30, 6, 36, 0, 39, 18, 60, 6, 18, 0, 12, 6,
21, 27, 30, 0, 18, 6, 42, 6, 42, 18, 24, 9, 48, 0, 6, 6,
18, 18, 18, 6, 18, 15, 30, 4, 60, 12, 30, 30, 18, 0, 36, 0,
27, 18, 30, 18, 48, 9, 30, 12, 18, 6, 42, 9, 48, 0, 18, 6,
42, 6, 30, 24, 12, 3, 36, 0, 36, 36, 15, 18, 30, 0, 66, 0,
12, 18, 42, 9, 24, 15, 18, 12, 54, 6, 18, 21, 36, 0, 30, 6,
24, 24, 12, 6, 24, 9, 36, 12, 6, 12, 45, 12, 36, 0, 36, 0,
48, 3, 24, 18, 12, 24, 36, 0, 30, 12, 30, 21, 30, 0, 6, 15,
18, 15, 66, 12, 42, 3, 12, 0, 39, 12, 30, 12, 18, 0, 54, 6,
30, 24, 9, 12, 60, 12, 30, 12, 30, 24, 24, 18, 30, 0, 36, 0,
27, 9, 45, 18, 24, 12, 24, 0, 36, 24, 12, 6, 60, 0, 18, 0,
24, 15, 51, 9, 24, 12, 30, 12, 27, 18, 51, 18, 24, 0, 36, 6,
27, 27, 12, 30, 36, 6, 30, 0, 12, 6, 42, 0, 18, 0, 18, 0,
48, 12, 45, 24, 6, 15, 42, 6, 12, 18, 27, 9, 54, 0, 42, 3,
33, 12, 15, 12, 54, 18, 30, 6, 36, 18, 21, 30, 18, 0, 48, 3,
30, 18, 36, 6, 18, 0, 18, 12, 57, 24, 42, 6, 24, 0, 18, 12,
36, 18, 30, 12, 36, 3, 78, 0, 24, 6, 6, 36, 42, 0, 24, 0,
21, 15, 33, 6, 42, 18, 12, 3, 30, 12, 30, 27, 24, 0, 42, 12,
39, 12, 30, 12, 30, 15, 30, 6, 12, 24, 54, 6, 24, 0, 18, 6,
33, 12, 18, 24, 24, 7, 30, 0, 60, 24, 21, 12, 30, 0, 48, 6,
18, 15, 39, 12, 18, 18, 18, 0, 48, 12, 54, 18, 42, 0, 30, 0,
15, 30, 27, 18, 72, 0, 30, 15, 12, 12, 30, 18, 36, 0, 6, 3,
60, 15, 24, 18, 6, 18, 54, 6, 21, 24, 24, 12, 30, 0, 30, 6,
30, 15, 54, 6, 48, 12, 30, 12, 36, 0, 24, 3, 24, 0, 54, 6,
18, 30, 15, 6, 42, 9, 36, 0, 21, 30, 15, 12, 12, 0, 24, 3,
72, 0, 51, 39, 24, 12, 30, 3, 33, 18, 15, 12, 42, 0, 30, 12,
27, 24, 51, 12, 42, 12, 18, 3, 42, 12, 39, 18, 12, 0, 30, 0,
24, 21, 21, 21, 30, 6, 66, 12, 12, 6, 69, 21, 30, 0, 24, 6,
45, 12, 12, 18, 42, 12, 18, 0, 39, 30, 33, 12, 54, 0, 12, 0,
12, 18, 36, 9, 30, 9, 24, 9, 60, 12, 30, 12, 12, 0, 42, 9,
42, 18, 45, 24, 42, 6, 12, 9, 24, 6, 30, 12, 42, 0, 30, 6,
15, 15, 30, 12, 18, 12, 54, 6, 21, 30, 12, 33, 60, 0, 48, 0,
30, 15, 42, 6, 24, 24, 30, 0, 36, 18, 33, 18, 12, 0, 60, 0,
72, 15, 12, 9, 30, 12, 24, 15, 21, 24, 51, 12, 24, 0, 24, 6,
12, 6, 33, 24, 36, 9, 54, 6, 27, 24, 30, 6, 48, 0, 24, 3,
36, 27, 42, 15, 18, 18, 12, 6, 54, 6, 30, 15, 36, 0, 12, 12,
18, 24, 21, 18, 30, 3, 60, 0, 33, 12, 36, 18, 48, 0, 24, 1,
39, 12, 24, 18, 24, 9, 66, 6, 48, 24, 12, 12, 42, 0, 24, 6,
18, 12, 63, 6, 36, 24, 18, 0, 39, 12, 39, 24, 24, 0, 54, 6,
15, 24, 15, 24, 48, 3, 36, 12, 12, 24, 39, 18, 36, 0, 42, 6,
42, 6, 60, 24, 12, 18, 18, 0, 45, 6, 6, 6, 72, 0, 30, 6,
24, 9, 36, 12, 24, 9, 30, 15, 36, 18, 33, 24, 6, 0, 54, 0,
33, 36, 18, 24, 36, 6, 18, 6, 24, 18, 75, 6, 18, 0, 18, 0,
48, 9, 36, 18, 42, 9, 30, 0, 27, 36, 24, 15, 42, 0, 42, 18,
36, 12, 18, 12, 72, 9, 24, 0, 54, 18, 21, 24, 12, 0, 60, 0,
24, 24, 39, 12, 42, 18, 30, 6, 9, 12, 48, 12, 30, 0, 18, 12,
36, 15, 48, 18, 18, 3, 42, 6, 42, 18, 18, 24, 54, 0, 36, 0,
24, 36, 42, 0, 12, 27, 30, 6, 60, 6, 30, 24, 12, 0, 36, 3,
42, 12, 18, 12, 36, 9, 30, 0, 15, 18, 33, 12, 54, 0, 30, 6,
33, 21, 27, 30, 42, 12, 54, 9, 42, 24, 27, 6, 36, 0, 24, 12,
24, 12, 45, 24, 12, 6, 30, 12, 69, 12, 42, 12, 30, 0, 24, 0,
42, 18, 24, 15, 60, 9, 48, 18, 18, 24, 27, 12, 36, 0, 30, 0,
54, 9, 30, 18, 24, 15, 48, 0, 24, 24, 45, 24, 24, 0, 18, 6,
36, 9, 54, 15, 24, 12, 12, 6, 18, 12, 54, 18, 12, 0, 60, 3,
48, 30, 12, 18, 60, 6, 24, 3, 36, 12, 33, 12, 36, 0, 36, 6,
36, 3, 33, 24, 12, 13, 42, 12, 27, 18, 30, 12, 54, 0, 30, 12,
21, 39, 54, 6, 54, 18, 18, 0, 33, 12, 36, 36, 36, 0, 30, 0,
42, 33, 18, 18, 36, 12, 30, 3, 30, 12, 66, 6, 30, 0, 18, 12,
63, 18, 24, 6, 30, 12, 48, 9, 6, 24, 30, 12, 42, 0, 72, 0,
30, 12, 48, 3, 24, 15, 12, 12, 66, 18, 9, 36, 12, 0, 54, 0,
54, 18, 15, 30, 36, 6, 12, 0, 21, 18, 54, 12, 30, 0, 6, 0,
36, 15, 60, 18, 18, 15, 48, 6, 27, 24, 21, 12, 54, 0, 54, 9,
12, 24, 48, 12, 48, 15, 54, 6, 36, 6, 39, 24, 24, 0, 24, 3,
33, 24, 18, 18, 66, 12, 18, 12, 30, 12, 75, 15, 36, 0, 30, 9,
24, 6, 21, 24, 24, 12, 60, 0, 66, 36, 12, 18, 36, 0, 24, 6,
30, 18, 39, 18, 30, 12, 24, 9, 30, 6, 36, 18, 18, 0, 54, 12,
33, 24, 36, 6, 66, 0, 30, 6, 12, 12, 33, 24, 54, 0, 18, 3,
60, 3, 30, 24, 24, 21, 48, 0, 18, 30, 51, 12, 18, 0, 30, 12,
33, 15, 18, 12, 30, 27, 24, 0, 48, 12, 45, 6, 30, 0, 72, 0,
51, 18, 27, 27, 54, 9, 48, 12, 27, 30, 36, 18, 18, 0, 42, 3,
36, 9, 45, 30, 6, 6, 36, 3, 51, 24, 24, 18, 72, 0, 18, 6,
9, 36, 42, 0, 36, 9, 30, 12, 60, 30, 24, 15, 24, 0, 36, 6,
30, 27, 27, 18, 42, 12, 48, 0, 42, 0, 33, 24, 24, 0, 30, 0,
42, 12, 48, 9, 36, 9, 24, 6, 27, 36, 12, 9, 60, 0, 30, 12,
15, 18, 42, 18, 36, 18, 24, 7, 48, 12, 54, 24, 30, 0, 78, 0,
18, 18, 27, 24, 24, 6, 30, 12, 33, 18, 60, 15, 54, 0, 12, 12,
36, 12, 36, 24, 30, 18, 54, 0, 18, 18, 18, 24, 84, 0, 54, 0,
27, 15, 42, 6, 36, 12, 18, 9, 54, 6, 30, 30, 24, 0, 30, 9,
60, 30, 36, 6, 42, 12, 30, 6, 6, 30, 60, 0, 18, 0, 24, 9,
51, 18, 24, 33, 30, 0, 42, 12, 60, 18, 18, 36, 18, 0, 24, 0,
18, 9, 78, 12, 48, 24, 12, 0, 48, 6, 12, 18, 42, 0, 48, 0,
30, 27, 18, 6, 48, 3, 66, 21, 18, 18, 33, 12, 48, 0, 30, 6,
63, 21, 18, 36, 24, 15, 60, 6, 36, 30, 36, 0, 48, 0, 48, 3,
36, 30, 42, 18, 24, 24, 12, 6, 21, 6, 72, 12, 36, 0, 60, 6,
12, 18, 15, 24, 60, 9, 30, 0, 39, 30, 54, 12, 18, 0, 18, 3,
60, 9, 57, 24, 6, 18, 48, 6, 60, 18, 18, 9, 48, 0, 24, 12,
18, 18, 39, 6, 42, 15, 36, 6, 36, 18, 18, 30, 18, 0, 42, 6,
39, 27, 27, 18, 48, 12, 42, 12, 24, 18, 27, 9, 30, 0, 24, 9,
81, 12, 72, 12, 30, 6, 36, 0, 33, 42, 39, 30, 42, 0, 12, 3,
12, 6, 24, 18, 48, 12, 48, 3, 63, 24, 24, 27, 30, 0, 78, 6,
36, 18, 36, 30, 30, 12, 36, 12, 30, 6, 60, 12, 48, 0, 24, 0,
36, 21, 30, 24, 30, 12, 48, 0, 36, 12, 24, 27, 36, 0, 42, 12,
27, 24, 54, 6, 18, 12, 48, 0, 30, 6, 72, 24, 12, 0, 30, 3,
45, 24, 0, 18, 78, 15, 18, 18, 39, 18, 39, 9, 36, 0, 24, 6,
39, 12, 30, 18, 30, 16, 48, 0, 36, 30, 12, 12, 60, 0, 42, 3,
24, 21, 84, 33, 30, 12, 18, 18, 48, 12, 36, 12, 30, 0, 48, 9,
42, 36, 42, 6, 48, 3, 42, 0, 33, 24, 30, 12, 36, 0, 36, 6,
54, 12, 30, 30, 6, 21, 66, 0, 39, 24, 36, 24, 36, 0, 24, 12,
30, 15, 54, 12, 78, 30, 6, 0, 33, 12, 27, 30, 30, 0, 36, 6,
18, 36, 36, 6, 66, 3, 60, 6, 18, 30, 42, 0, 12, 0, 36, 6,
54, 6, 33, 24, 24, 12, 54, 0, 42, 12, 15, 12, 60, 0, 30, 0,
21, 18, 75, 18, 48, 18, 18, 15, 30, 24, 42, 33, 36, 0, 30, 6,
45, 24, 9, 30, 36, 3, 54, 15, 24, 18, 63, 18, 42, 0, 24, 0,
75, 6, 30, 9, 30, 15, 42, 12, 33, 36, 21, 24, 60, 0, 54, 9,
30, 30, 48, 12, 18, 12, 24, 0, 66, 12, 24, 18, 36, 0, 72, 6,
36, 15, 27, 27, 30, 6, 12, 18, 24, 6, 78, 15, 42, 0, 12, 6,
27, 24, 51, 18, 36, 12, 60, 3, 51, 30, 12, 24, 36, 0, 30, 0,
48, 12, 21, 6, 36, 24, 54, 6, 42, 6, 36, 36, 6, 0, 54, 12,
27, 15, 18, 18, 66, 6, 42, 0, 15, 30, 63, 12, 48, 0, 36, 3,
63, 12, 36, 30, 18, 9, 48, 3, 48, 36, 30, 12, 42, 0, 72, 6,
36, 30, 30, 12, 24, 12, 6, 15, 75, 18, 30, 6, 36, 0, 24, 0,
18, 36, 48, 18, 60, 18, 60, 12, 33, 12, 33, 15, 72, 0, 18, 9,
54, 15, 21, 30, 36, 12, 30, 0, 42, 24, 48, 18, 36, 0, 24, 6,
18, 15, 81, 12, 12, 27, 36, 12, 30, 6, 36, 18, 24, 0, 48, 6,
36, 36, 27, 6, 48, 9, 36, 3, 36, 36, 36, 24, 30, 0, 24, 1,
42, 6, 66, 27, 24, 18, 48, 12, 51, 18, 24, 18, 84, 0, 24, 6,
12, 9, 63, 18, 48, 9, 30, 0, 36, 12, 33, 24, 30, 0, 72, 0,
42, 48, 36, 18, 42, 12, 42, 15, 24, 12, 60, 15, 24, 0, 12, 21,
72, 3, 42, 30, 24, 18, 36, 6, 42, 18, 30, 12, 42, 0, 48, 12,
12, 24, 24, 18, 66, 6, 24, 0, 93, 12, 51, 30, 12, 0, 54, 6,
18, 27, 24, 24, 36, 12, 30, 0, 45, 18, 60, 6, 54, 0, 24, 0,
51, 24, 21, 18, 30, 6, 72, 6, 6, 18, 21, 36, 42, 0, 48, 12,
27, 24, 36, 6, 30, 27, 30, 6, 39, 18, 51, 36, 30, 0, 42, 0,
66, 18, 36, 6, 66, 9, 24, 12, 24, 24, 78, 12, 36, 0, 36, 12,
60, 15, 42, 24, 6, 15, 54, 0, 33, 30, 21, 30, 42, 0, 54, 0,
24, 9, 60, 9, 36, 24, 24, 6, 66, 12, 48, 18, 54, 0, 30, 0,
30, 39, 30, 18, 48, 6, 42, 12, 33, 24, 33, 12, 60, 0, 18, 6,
42, 24, 42, 24, 6, 12, 72, 6, 42, 30, 18, 9, 30, 0, 24, 15,
30, 18, 60, 12, 54, 15, 24, 0, 48, 24, 33, 12, 36, 0, 66, 6,
36, 18, 21, 30, 72, 3, 24, 9, 27, 30, 30, 18, 42, 0, 42, 0,
72, 6, 39, 42, 24, 18, 60, 3, 24, 18, 36, 18, 30, 0, 54, 6,
27, 33, 60, 12, 24, 24, 18, 18, 30, 12, 21, 33, 48, 0, 78, 12,
78, 12, 30, 12, 42, 12, 48, 0, 24, 12, 75, 18, 24, 0, 18, 0,
33, 24, 30, 21, 42, 15, 30, 12, 39, 30, 51, 12, 54, 0, 36, 12,
18, 12, 48, 24, 78, 18, 18, 6, 78, 6, 24, 30, 12, 0, 42, 0,
45, 18, 15, 27, 42, 0, 54, 18, 36, 18, 36, 6, 48, 0, 30, 12,
36, 21, 45, 6, 24, 7, 54, 0, 27, 42, 33, 24, 72, 0, 42, 0,
48, 24, 45, 18, 18, 15, 36, 15, 66, 6, 66, 30, 18, 0, 48, 0,
27, 39, 30, 18, 66, 27, 12, 12, 18, 24, 60, 6, 66, 0, 42, 0,
42, 6, 33, 21, 36, 12, 42, 6, 21, 36, 33, 21, 48, 0, 66, 12,
6, 18, 75, 24, 36, 12, 18, 0, 81, 12, 42, 30, 36, 0, 24, 0,
30, 30, 30, 6, 60, 9, 60, 6, 24, 30, 30, 6, 30, 0, 30, 12,
75, 18, 30, 24, 24, 15, 78, 0, 42, 24, 18, 30, 42, 0, 30, 12,
21, 12, 48, 9, 60, 21, 30, 12, 24, 24, 39, 21, 24, 0, 54, 3,
39, 30, 33, 24, 72, 12, 60, 0, 18, 24, 57, 12, 24, 0, 24, 3,
90, 9, 12, 21, 36, 12, 30, 18, 84, 24, 30, 9, 60, 0, 36, 18,
18, 24, 78, 18, 24, 18, 48, 6, 24, 0, 45, 30, 24, 0, 66, 3,
60, 36, 21, 42, 42, 6, 30, 6, 33, 12, 60, 21, 36, 0, 6, 6,
36, 15, 36, 30, 48, 21, 48, 0, 39, 36, 36, 6, 54, 0, 66, 3,
18, 18, 33, 24, 36, 18, 30, 9, 66, 6, 15, 36, 24, 0, 96, 6,
30, 12, 42, 6, 36, 6, 36, 9, 27, 36, 42, 12, 42, 0, 18, 6,
51, 12, 78, 18, 30, 9, 54, 12, 39, 24, 24, 33, 66, 0, 36, 9,
45, 33, 36, 12, 18, 27, 36, 0, 78, 12, 48, 24, 30, 0, 42, 9,
48, 21, 18, 9, 60, 12, 54, 6, 21, 24, 72, 3, 66, 0, 18, 18,
33, 12, 21, 36, 36, 6, 36, 6, 60, 36, 36, 18, 48, 0, 24, 0,
30, 24, 87, 24, 24, 27, 42, 6, 60, 18, 66, 6, 18, 0, 36, 6,
39, 36, 30, 18, 36, 9, 30, 0, 18, 18, 51, 12, 48, 0, 54, 0,
48, 18, 36, 30, 36, 30, 66, 3, 12, 18, 15, 39, 60, 0, 24, 12,
66, 6, 54, 12, 48, 6, 18, 7, 30, 24, 48, 18, 30, 0, 84, 0,
30, 48, 12, 15, 60, 9, 42, 18, 42, 18, 42, 18, 48, 0, 30, 9,
48, 21, 69, 36, 12, 12, 48, 0, 57, 18, 24, 24, 66, 0, 36, 6,
24, 21, 69, 6, 54, 12, 30, 18, 72, 18, 30, 30, 18, 0, 42, 0,
42, 42, 12, 18, 42, 6, 54, 9, 42, 12, 72, 18, 24, 0, 24, 3,
78, 0, 24, 24, 30, 15, 60, 6, 42, 30, 39, 21, 36, 0, 54, 12,
27, 24, 42, 24, 72, 21, 30, 0, 48, 18, 24, 30, 12, 0, 30, 3,
24, 15, 72, 33, 42, 6, 24, 24, 12, 24, 66, 12, 60, 0, 24, 6,
63, 12, 42, 18, 24, 18, 84, 6, 30, 24, 24, 6, 90, 0, 72, 6,
21, 24, 30, 18, 18, 30, 24, 6, 66, 18, 54, 18, 36, 0, 36, 12,
60, 27, 30, 18, 90, 18, 18, 0, 18, 24, 48, 24, 30, 0, 36, 6,
36, 18, 66, 36, 30, 3, 66, 3, 57, 48, 12, 18, 36, 0, 48, 6,
36, 21, 48, 0, 60, 12, 36, 12, 72, 0, 36, 30, 30, 0, 48, 0,
33, 30, 48, 9, 54, 9, 36, 24, 18, 30, 42, 18, 54, 0, 12, 0,
54, 12, 21, 24, 30, 21, 72, 0, 66, 24, 27, 18, 36, 0, 24, 0,
45, 24, 78, 0, 42, 21, 24, 12, 39, 30, 54, 30, 24, 0, 84, 15,
24, 24, 9, 30, 54, 9, 48, 6, 33, 18, 57, 18, 30, 0, 60, 3,
54, 27, 33, 30, 36, 24, 42, 0, 54, 18, 39, 24, 54, 0, 60, 18,
24, 15, 75, 12, 24, 12, 42, 0, 39, 12, 36, 36, 36, 0, 30, 3,
66, 42, 15, 24, 72, 12, 48, 12, 42, 12, 48, 15, 24, 0, 18, 18,
60, 6, 60, 18, 36, 9, 24, 6, 27, 36, 30, 24, 90, 0, 60, 3,
21, 18, 54, 24, 48, 18, 18, 12, 51, 24, 39, 18, 18, 0, 72, 12,
42, 21, 36, 24, 36, 6, 36, 0, 33, 18, 42, 0, 60, 0, 18, 6,
42, 21, 39, 39, 36, 13, 84, 6, 24, 18, 30, 24, 78, 0, 36, 3,
54, 39, 51, 18, 30, 21, 24, 3, 60, 12, 87, 42, 30, 0, 36, 6,
30, 15, 36, 12, 54, 18, 42, 12, 27, 24, 84, 15, 42, 0, 18, 9,
54, 18, 30, 30, 48, 12, 72, 0, 54, 42, 9, 12, 36, 0, 60, 0,
27, 21, 78, 18, 42, 30, 30, 6, 54, 6, 30, 18, 24, 0, 60, 12,
42, 36, 48, 24, 54, 6, 36, 15, 12, 48, 21, 12, 30, 0, 36, 0,
102, 6, 18, 12, 24, 9, 60, 12, 48, 24, 33, 30, 66, 0, 30, 12,
30, 15, 60, 12, 54, 36, 30, 0, 36, 6, 72, 18, 36, 0, 54, 0,
30, 36, 9, 15, 60, 0, 60, 15, 39, 12, 63, 18, 42, 0, 30, 18,
60, 21, 57, 30, 0, 18, 54, 3, 75, 30, 48, 24, 42, 0, 24, 12,
36, 42, 57, 9, 48, 9, 36, 6, 45, 12, 24, 48, 54, 0, 66, 0,
45, 33, 30, 18, 54, 18, 36, 0, 36, 6, 54, 30, 54, 0, 36, 0,
66, 12, 42, 21, 24, 18, 48, 6, 21, 48, 42, 12, 60, 0, 84, 12,
0, 12, 54, 24, 36, 18, 18, 12, 81, 18, 33, 18, 12, 0, 66, 3,
66, 6, 33, 48, 48, 6, 24, 24, 36, 18, 60, 6, 36, 0, 24, 6,
39, 21, 42, 18, 42, 12, 60, 0, 24, 30, 33, 36, 72, 0, 30, 0,
36, 36, 42, 12, 36, 15, 24, 15, 75, 30, 63, 27, 24, 0, 42, 6,
63, 30, 18, 12, 108, 9, 48, 12, 24, 12, 72, 18, 30, 0, 54, 6,
30, 9, 63, 27, 48, 15, 36, 6, 48, 36, 18, 12, 54, 0, 42, 9,
36, 36, 63, 18, 36, 24, 36, 0, 75, 6, 63, 24, 36, 0, 48, 6,
27, 39, 30, 18, 30, 9, 54, 18, 36, 18, 39, 21, 66, 0, 30, 0,
54, 18, 42, 36, 12, 24, 108, 0, 30, 24, 42, 12, 48, 0, 24, 0,
15, 9, 48, 18, 66, 24, 24, 12, 54, 12, 36, 21, 54, 0, 54, 18,
45, 42, 36, 24, 42, 3, 36, 0, 42, 48, 42, 12, 36, 0, 36, 1,
60, 18, 36, 18, 36, 15, 54, 9, 60, 30, 24, 21, 48, 0, 24, 18,
24, 18, 90, 6, 72, 15, 36, 9, 48, 6, 36, 42, 48, 0, 78, 3,
54, 27, 18, 36, 48, 15, 54, 12, 30, 24, 84, 12, 18, 0, 18, 12,
105, 12, 24, 30, 30, 18, 36, 0, 60, 30, 27, 12, 48, 0, 90, 6,
18, 18, 33, 21, 42, 24, 24, 12, 45, 24, 60, 36, 36, 0, 66, 6,
27, 15, 42, 24, 60, 12, 18, 9, 30, 18, 84, 12, 72, 0, 12, 6,
42, 21, 45, 12, 18, 9, 96, 12, 21, 30, 30, 24, 66, 0, 48, 12,
42, 18, 36, 18, 24, 24, 24, 0, 30, 12, 27, 42, 18, 0, 72, 0,
84, 27, 54, 15, 102, 12, 36, 6, 39, 36, 36, 15, 36, 0, 30, 15,
57, 12, 57, 42, 30, 9, 60, 6, 27, 42, 27, 30, 36, 0, 54, 6,
24, 21, 78, 12, 42, 18, 18, 12, 84, 18, 54, 18, 48, 0, 66, 12,
15, 36, 30, 18, 72, 9, 66, 0, 27, 18, 24, 6, 78, 0, 42, 6,
81, 27, 27, 36, 24, 24, 48, 0, 72, 18, 39, 30, 42, 0, 18, 18,
30, 24, 78, 6, 18, 18, 36, 0, 48, 30, 84, 6, 18, 0, 54, 0,
42, 36, 12, 30, 90, 12, 48, 18, 24, 18, 21, 18, 48, 0, 60, 0,
60, 6, 30, 42, 24, 18, 66, 0, 27, 36, 24, 18, 54, 0, 48, 6,
30, 18, 90, 15, 42, 9, 48, 18, 42, 6, 45, 24, 36, 0, 48, 0,
78, 39, 27, 12, 42, 27, 48, 6, 45, 18, 72, 36, 48, 0, 18, 9,
66, 9, 54, 33, 18, 18, 66, 12, 39, 36, 45, 12, 72, 0, 48, 12,
21, 39, 33, 18, 60, 18, 36, 0, 78, 18, 39, 36, 24, 0, 30, 0,
30, 30, 54, 21, 66, 6, 30, 21, 39, 18, 60, 15, 72, 0, 30, 18,
45, 12, 39, 18, 60, 6, 66, 15, 36, 30, 12, 18, 60, 0, 60, 0,
18, 33, 57, 18, 24, 24, 42, 6, 66, 12, 81, 42, 18, 0, 36, 6,
42, 18, 24, 24, 72, 0, 18, 0, 30, 30, 87, 18, 36, 0, 42, 3,
45, 12, 36, 42, 24, 25, 30, 6, 72, 24, 18, 18, 60, 0, 102, 12,
42, 12, 90, 12, 24, 27, 24, 12, 69, 24, 30, 18, 42, 0, 48, 0,
42, 45, 39, 15, 60, 18, 30, 12, 33, 24, 72, 18, 36, 0, 24, 12,
51, 24, 39, 36, 24, 6, 120, 0, 72, 24, 30, 30, 30, 0, 24, 12,
72, 18, 54, 3, 84, 30, 30, 21, 42, 24, 30, 18, 30, 0, 54, 0,
36, 30, 24, 30, 72, 9, 72, 6, 30, 24, 36, 24, 30, 0, 30, 0,
90, 12, 48, 27, 24, 6, 54, 12, 39, 36, 18, 18, 78, 0, 36, 12,
18, 39, 66, 6, 54, 18, 36, 0, 54, 18, 42, 12, 30, 0, 78, 0,
48, 45, 27, 36, 36, 9, 54, 15, 6, 12, 99, 15, 48, 0, 24, 3,
60, 12, 45, 36, 36, 30, 24, 12, 57, 30, 42, 18, 54, 0, 36, 6,
45, 24, 63, 30, 60, 12, 42, 6, 102, 18, 30, 33, 18, 0, 84, 12,
54, 24, 39, 12, 42, 0, 36, 0, 54, 24, 60, 12, 42, 0, 48, 6,
30, 9, 93, 24, 18, 21, 60, 6, 21, 36, 18, 54, 102, 0, 30, 18,
36, 21, 48, 12, 30, 27, 42, 3, 54, 12, 66, 36, 36, 0, 48, 9,
45, 33, 30, 9, 84, 18, 30, 12, 33, 36, 51, 12, 54, 0, 36, 18,
42, 12, 30, 36, 24, 9, 72, 0, 48, 30, 36, 6, 78, 0, 42, 0,
18, 24, 63, 21, 36, 18, 24, 15, 66, 0, 42, 27, 54, 0, 30, 9,
51, 45, 45, 24, 48, 12, 72, 12, 33, 24, 39, 30, 66, 0, 18, 6,
69, 12, 36, 24, 36, 18, 90, 6, 60, 24, 36, 27, 36, 0, 60, 18,
33, 21, 84, 12, 36, 30, 18, 0, 33, 24, 51, 30, 24, 0, 84, 0,
57, 33, 36, 21, 84, 12, 30, 12, 33, 36, 63, 18, 24, 0, 30, 6,
90, 21, 66, 30, 30, 24, 36, 0, 54, 12, 51, 18, 78, 0, 36, 0,
18, 18, 54, 21, 48, 12, 66, 18, 21, 18, 33, 21, 42, 0, 66, 6,
48, 54, 21, 30, 66, 12, 66, 0, 24, 24, 63, 24, 36, 0, 42, 3,
60, 18, 30, 6, 36, 9, 54, 6, 72, 48, 36, 15, 54, 0, 30, 27,
12, 18, 60, 12, 66, 15, 48, 10, 84, 12, 39, 42, 12, 0, 66, 6,
24, 18, 21, 36, 54, 24, 24, 12, 51, 18, 66, 12, 90, 0, 18, 6,
87, 15, 75, 24, 30, 15, 60, 0, 24, 42, 24, 24, 48, 0, 84, 6,
51, 39, 60, 12, 18, 30, 36, 12, 60, 12, 60, 48, 36, 0, 54, 6,
42, 12, 6, 18, 78, 6, 48, 12, 12, 36, 84, 0, 48, 0, 54, 3,
48, 18, 45, 51, 54, 6, 72, 6, 51, 30, 45, 30, 48, 0, 36, 6,
36, 15, 78, 24, 42, 24, 24, 0, 90, 18, 36, 24, 24, 0, 36, 0,
36, 30, 30, 30, 66, 6, 78, 21, 30, 12, 21, 15, 60, 0, 36, 12,
66, 21, 36, 24, 30, 18, 60, 9, 54, 48, 24, 18, 48, 0, 30, 6,
42, 18, 81, 18, 54, 27, 24, 12, 30, 18, 84, 30, 24, 0, 102, 9,
42, 42, 36, 24, 90, 3, 30, 0, 60, 30, 42, 18, 24, 0, 18, 0,
78, 12, 42, 27, 42, 18, 66, 18, 45, 18, 42, 9, 84, 0, 54, 6,
15, 54, 63, 18, 54, 24, 24, 9, 57, 24, 45, 54, 36, 0, 60, 0,
66, 27, 33, 18, 30, 9, 60, 24, 30, 12, 54, 21, 24, 0, 12, 18,
108, 15, 66, 12, 30, 27, 66, 0, 36, 30, 36, 24, 66, 0, 60, 0,
9, 24, 54, 12, 90, 15, 42, 0, 51, 30, 18, 30, 48, 0, 84, 9,
48, 21, 54, 30, 24, 18, 36, 12, 45, 18, 96, 6, 30, 0, 30, 9,
30, 24, 42, 24, 24, 15, 66, 6, 69, 36, 15, 15, 84, 0, 36, 15,
48, 27, 45, 18, 42, 30, 36, 0, 66, 6, 72, 30, 48, 0, 42, 3,
51, 39, 30, 33, 78, 12, 24, 18, 30, 18, 105, 21, 72, 0, 42, 12,
39, 18, 27, 42, 24, 6, 66, 3, 60, 42, 30, 30, 60, 0, 54, 6,
54, 24, 57, 6, 54, 6, 24, 24, 54, 12, 57, 27, 42, 0, 48, 6,
36, 27, 57, 12, 84, 12, 60, 0, 12, 30, 54, 24, 48, 0, 18, 3,
105, 36, 48, 42, 24, 18, 48, 6, 30, 36, 45, 42, 42, 0, 54, 9,
36, 12, 48, 12, 54, 30, 30, 6, 48, 6, 51, 18, 36, 0, 102, 6,
18, 30, 33, 24, 48, 18, 60, 12, 60, 30, 45, 12, 36, 0, 54, 12,
60, 6, 48, 54, 12, 13, 60, 0, 72, 18, 24, 6, 90, 0, 48, 12,
15, 42, 96, 18, 36, 18, 36, 6, 78, 24, 48, 18, 30, 0, 48, 18,
78, 42, 24, 30, 60, 6, 60, 12, 18, 12, 42, 30, 42, 0, 24, 0,
81, 9, 54, 18, 60, 33, 48, 0, 27, 54, 51, 27, 90, 0, 60, 18,
24, 18, 54, 24, 36, 12, 42, 0, 87, 24, 33, 18, 24, 0, 96, 0,
87, 36, 30, 15, 42, 12, 36, 24, 24, 36, 42, 21, 48, 0, 30, 6,
42, 18, 48, 24, 24, 18, 84, 3, 36, 42, 42, 36, 72, 0, 54, 6,
30, 15, 60, 6, 78, 30, 24, 6, 72, 6, 66, 45, 24, 0, 42, 21,
36, 30, 36, 18, 48, 12, 30, 0, 39, 24, 102, 18, 36, 0, 12, 6,
54, 6, 30, 33, 66, 21, 90, 3, 78, 36, 9, 18, 36, 0, 84, 0,
30, 30, 93, 24, 30, 24, 30, 15, 63, 12, 48, 30, 54, 0, 48, 0,
54, 42, 42, 30, 78, 0, 36, 24, 39, 24, 60, 12, 78, 0, 60, 6,
51, 30, 36, 36, 30, 18, 60, 0, 30, 30, 51, 24, 60, 0, 42, 3,
24, 9, 54, 21, 24, 33, 30, 24, 66, 24, 69, 18, 30, 0, 102, 15,
54, 24, 15, 30, 120, 6, 30, 3, 51, 24, 54, 12, 30, 0, 36, 6,
36, 12, 90, 42, 12, 12, 60, 12, 60, 24, 42, 12, 90, 0, 24, 12,
42, 30, 30, 6, 78, 21, 42, 0, 54, 24, 27, 54, 24, 0, 66, 6,
45, 30, 12, 30, 42, 12, 84, 15, 36, 18, 84, 24, 36, 0, 30, 18,
72, 18, 60, 24, 48, 12, 54, 6, 36, 54, 42, 12, 42, 0, 60, 0,
51, 48, 54, 9, 36, 27, 24, 6, 84, 18, 48, 30, 42, 0, 78, 0,
48, 27, 27, 48, 42, 18, 36, 0, 39, 18, 99, 24, 102, 0, 18, 0,
48, 18, 72, 15, 36, 12, 84, 12, 24, 12, 30, 39, 84, 0, 36, 12,
39, 39, 63, 24, 42, 24, 66, 6, 72, 18, 18, 24, 30, 0, 60, 6,
48, 42, 36, 15, 78, 6, 48, 30, 12, 36, 54, 12, 36, 0, 42, 6,
45, 6, 69, 24, 72, 21, 48, 0, 57, 48, 12, 24, 48, 0, 48, 3,
48, 15, 78, 24, 60, 18, 12, 12, 111, 24, 54, 24, 24, 0, 48, 6,
36, 33, 42, 6, 54, 9, 72, 18, 27, 30, 30, 12, 54, 0, 66, 4,
78, 21, 24, 54, 18, 24, 54, 6, 60, 24, 54, 21, 78, 0, 36, 18,
54, 30, 66, 18, 48, 30, 24, 0, 42, 12, 99, 36, 30, 0, 90, 6,
18, 30, 30, 24, 78, 6, 66, 9, 24, 42, 78, 30, 42, 0, 18, 12,
102, 6, 33, 24, 18, 12, 66, 9, 54, 24, 24, 36, 84, 0, 60, 6,
39, 15, 78, 12, 42, 21, 42, 18, 42, 18, 18, 42, 24, 0, 48, 3,
105, 51, 42, 30, 42, 18, 72, 0, 24, 24, 102, 6, 36, 0, 36, 9,
99, 12, 48, 21, 48, 18, 42, 6, 36, 42, 18, 12, 78, 0, 48, 30,
30, 18, 36, 30, 42, 9, 42, 6, 60, 12, 39, 30, 24, 0, 78, 0,
48, 30, 39, 27, 102, 24, 30, 12, 51, 12, 66, 9, 48, 0, 30, 18,
45, 39, 87, 30, 36, 9, 72, 0, 60, 24, 30, 36, 54, 0, 48, 0,
45, 36, 45, 18, 42, 27, 60, 9, 66, 12, 78, 42, 18, 0, 60, 6,
60, 33, 36, 24, 96, 12, 18, 12, 12, 36, 72, 0, 78, 0, 36, 6,
60, 24, 27, 51, 42, 24, 84, 12, 57, 48, 30, 24, 42, 0, 60, 12,
24, 18, 96, 12, 30, 30, 30, 0, 93, 18, 48, 18, 60, 0, 48, 6,
54, 36, 30, 12, 42, 9, 60, 18, 12, 24, 69, 6, 60, 0, 54, 6,
33, 15, 60, 36, 30, 18, 90, 3, 72, 24, 54, 54, 42, 0, 18, 9,
60, 30, 84, 18, 48, 24, 12, 6, 66, 36, 24, 27, 24, 0, 42, 12,
39, 42, 27, 18, 108, 9, 78, 0, 48, 12, 54, 30, 30, 0, 36, 0,
48, 12, 75, 39, 30, 6, 42, 9, 66, 30, 33, 18, 96, 0, 48, 18,
39, 36, 102, 12, 54, 18, 24, 9, 45, 24, 72, 30, 36, 0, 78, 6,
63, 36, 36, 21, 60, 9, 36, 12, 54, 24, 78, 27, 42, 0, 42, 18,
60, 9, 24, 24, 54, 39, 84, 0, 27, 36, 39, 12, 84, 0, 66, 0,
21, 30, 30, 42, 66, 18, 18, 18, 78, 12, 48, 42, 36, 0, 90, 6,
48, 33, 39, 24, 48, 15, 54, 15, 54, 24, 48, 18, 60, 0, 24, 0,
48, 24, 78, 24, 36, 9, 90, 12, 42, 24, 30, 45, 54, 0, 66, 12,
24, 12, 60, 6, 48, 33, 48, 0, 60, 6, 51, 54, 12, 0, 30, 0,
69, 21, 42, 15, 72, 15, 48, 21, 33, 36, 96, 6, 30, 0, 54, 6,
87, 30, 42, 30, 36, 13, 42, 6, 84, 48, 18, 18, 72, 0, 54, 12,
30, 30, 75, 24, 36, 24, 42, 18, 78, 12, 36, 30, 72, 0, 48, 6,
33, 36, 57, 36, 66, 6, 54, 0, 27, 36, 66, 12, 90, 0, 24, 3,
96, 24, 27, 24, 18, 24, 108, 12, 42, 48, 24, 18, 30, 0, 54, 18,
48, 12, 75, 18, 90, 21, 36, 12, 72, 12, 45, 24, 24, 0, 114, 0,
27, 30, 39, 33, 48, 12, 54, 12, 18, 42, 45, 27, 48, 0, 48, 6,
90, 9, 60, 42, 36, 12, 48, 0, 36, 42, 42, 18, 78, 0, 30, 6,
24, 33, 78, 9, 84, 30, 18, 15, 63, 18, 51, 30, 48, 0, 72, 6,
36, 51, 24, 30, 48, 21, 96, 6, 24, 6, 93, 12, 48, 0, 18, 6,
69, 18, 36, 18, 24, 18, 24, 6, 54, 36, 51, 33, 96, 0, 36, 15,
27, 30, 54, 30, 42, 12, 36, 0, 117, 36, 54, 36, 24, 0, 96, 3,
72, 36, 57, 27, 54, 6, 54, 21, 36, 12, 66, 33, 60, 0, 30, 24,
24, 15, 63, 30, 42, 24, 78, 9, 39, 30, 24, 24, 138, 0, 42, 0,
54, 24, 57, 12, 30, 24, 42, 18, 54, 6, 60, 33, 24, 0, 72, 6,
84, 24, 42, 6, 66, 15, 36, 0, 42, 48, 51, 18, 66, 0, 60, 3,
60, 12, 60, 57, 42, 9, 72, 12, 60, 42, 27, 24, 60, 0, 42, 18,
24, 30, 48, 30, 36, 18, 30, 9, 78, 12, 51, 18, 30, 0, 60, 0,
12, 57, 51, 18, 78, 6, 102, 12, 30, 24, 48, 27, 36, 0, 30, 12,
126, 6, 27, 36, 30, 18, 66, 0, 60, 30, 48, 36, 48, 0, 24, 6,
39, 24, 96, 12, 90, 33, 36, 6, 39, 6, 90, 27, 36, 0, 60, 12,
45, 42, 30, 30, 72, 12, 36, 9, 39, 36, 69, 24, 48, 0, 36, 6,
66, 15, 72, 39, 36, 27, 54, 18, 57, 30, 42, 12, 60, 0, 84, 24,
36, 27, 72, 12, 48, 21, 60, 0, 51, 30, 27, 30, 90, 0, 78, 0,
42, 57, 12, 30, 48, 18, 42, 6, 48, 24, 90, 15, 42, 0, 12, 15,
84, 24, 72, 18, 48, 21, 66, 3, 54, 42, 30, 24, 48, 0, 36, 18,
27, 12, 42, 9, 108, 18, 36, 12, 96, 24, 21, 30, 24, 0, 96, 9,
54, 18, 75, 30, 54, 18, 36, 0, 39, 18, 84, 18, 42, 0, 24, 6,
54, 18, 57, 42, 24, 9, 84, 18, 48, 42, 27, 30, 78, 0, 60, 0,
30, 48, 36, 6, 30, 36, 6, 10, 78, 12, 51, 48, 48, 0, 90, 0,
75, 9, 42, 24, 48, 15, 72, 12, 33, 42, 108, 12, 54, 0, 54, 18,
51, 42, 36, 48, 48, 12, 72, 0, 42, 18, 45, 30, 66, 0, 78, 3,
36, 15, 78, 30, 30, 30, 30, 15, 102, 12, 54, 18, 30, 0, 36, 6,
81, 48, 12, 24, 108, 6, 78, 18, 24, 36, 33, 18, 30, 0, 30, 0,
108, 21, 54, 42, 18, 18, 90, 6, 30, 48, 69, 36, 48, 0, 24, 15,
24, 15, 84, 24, 114, 6, 30, 0, 48, 6, 60, 42, 24, 0, 102, 12,
42, 42, 27, 21, 78, 9, 42, 24, 51, 24, 42, 12, 48, 0, 60, 12,
66, 6, 42, 24, 30, 24, 42, 0, 78, 24, 54, 12, 66, 0, 30, 6,
24, 51, 99, 18, 60, 24, 42, 18, 54, 6, 45, 60, 36, 0, 54, 6,
39, 39, 39, 30, 66, 18, 72, 0, 51, 24, 102, 12, 54, 0, 24, 0,
102, 12, 48, 24, 42, 36, 60, 0, 12, 48, 18, 12, 54, 0, 84, 18,
39, 9, 84, 30, 66, 18, 48, 15, 72, 48, 39, 42, 48, 0, 60, 0,
84, 30, 45, 33, 54, 6, 54, 30, 33, 30, 90, 6, 54, 0, 24, 6,
72, 27, 78, 12, 24, 15, 66, 0, 54, 36, 21, 42, 114, 0, 60, 3,
30, 33, 54, 27, 30, 33, 60, 6, 54, 12, 48, 33, 36, 0, 42, 12,
45, 39, 24, 36, 96, 18, 24, 12, 33, 18, 99, 18, 66, 0, 36, 0,
51, 24, 30, 30, 36, 15, 84, 6, 102, 48, 48, 18, 60, 0, 72, 12,
36, 42, 60, 12, 24, 21, 30, 0, 54, 18, 60, 18, 42, 0, 66, 6,
24, 24, 54, 15, 78, 12, 42, 27, 27, 30, 51, 27, 78, 0, 48, 6,
120, 27, 48, 42, 24, 12, 54, 6, 54, 24, 48, 36, 66, 0, 78, 9,
57, 21, 48, 18, 54, 33, 24, 30, 84, 18, 45, 33, 30, 0, 126, 9,
36, 30, 27, 30, 66, 18, 54, 0, 36, 42, 48, 6, 42, 0, 54, 6,
57, 12, 84, 54, 48, 6, 60, 6, 63, 18, 42, 36, 78, 0, 24, 24,
33, 24, 105, 24, 66, 27, 48, 0, 48, 30, 60, 30, 54, 0, 42, 3,
75, 48, 24, 12, 66, 12, 96, 6, 30, 12, 87, 21, 36, 0, 30, 24,
69, 12, 57, 30, 48, 24, 54, 0, 42, 54, 24, 24, 72, 0, 60, 0,
48, 24, 69, 24, 42, 18, 36, 12, 66, 24, 36, 42, 18, 0, 78, 9,
48, 36, 42, 42, 36, 12, 36, 21, 78, 18, 48, 12, 102, 0, 18, 12,
54, 24, 45, 27, 42, 13, 108, 12, 39, 24, 42, 27, 102, 0, 60, 6,
39, 24, 54, 12, 54, 24, 24, 0, 114, 24, 63, 48, 30, 0, 48, 6,
69, 36, 18, 12, 72, 6, 48, 18, 33, 54, 117, 12, 42, 0, 66, 12,
48, 6, 54, 36, 42, 21, 102, 6, 48, 54, 33, 30, 48, 0, 72, 0,
30, 24, 75, 24, 84, 30, 30, 0, 72, 18, 30, 42, 54, 0, 60, 12,
36, 45, 42, 12, 96, 6, 66, 0, 12, 36, 78, 36, 42, 0, 36, 0,
78, 24, 48, 24, 18, 30, 90, 15, 96, 18, 27, 21, 54, 0, 24, 21,
48, 27, 84, 18, 48, 42, 36, 6, 66, 12, 108, 12, 42, 0, 48, 9,
27, 60, 21, 36, 84, 6, 36, 18, 42, 18, 54, 18, 60, 0, 60, 15,
72, 9, 99, 42, 12, 12, 60, 0, 57, 42, 18, 18, 78, 0, 42, 6,
36, 36, 63, 9, 42, 15, 30, 18, 78, 6, 24, 48, 42, 0, 102, 12,
75, 45, 42, 30, 84, 24, 66, 9, 24, 30, 90, 24, 42, 0, 24, 3,
84, 21, 84, 33, 66, 24, 36, 6, 36, 48, 51, 18, 72, 0, 66, 18,
54, 30, 24, 18, 48, 18, 30, 0, 102, 12, 45, 36, 24, 0, 102, 3,
42, 15, 42, 54, 54, 21, 66, 24, 66, 30, 102, 3, 66, 0, 48, 12,
24, 30, 45, 36, 54, 6, 78, 9, 48, 24, 39, 36, 96, 0, 66, 6,
27, 27, 60, 30, 18, 30, 48, 12, 90, 24, 60, 36, 6, 0, 42, 12,
78, 36, 36, 24, 114, 6, 60, 0, 18, 6, 69, 18, 84, 0, 36, 6,
48, 6, 39, 24, 42, 24, 54, 6, 72, 48, 36, 42, 60, 0, 48, 0,
36, 18, 138, 24, 30, 30, 42, 18, 75, 18, 48, 18, 24, 0, 78, 0,
78, 57, 60, 9, 48, 9, 36, 30, 30, 42, 42, 39, 84, 0, 24, 12,
87, 27, 30, 42, 24, 24, 90, 0, 36, 24, 60, 36, 84, 0, 42, 0,
30, 21, 87, 12, 72, 24, 42, 12, 60, 30, 72, 21, 60, 0, 96, 12,
30, 42, 39, 18, 66, 12, 84, 12, 63, 42, 42, 24, 42, 0, 18, 6,
78, 15, 75, 45, 54, 12, 54, 6, 84, 30, 30, 18, 54, 0, 42, 24,
39, 27, 96, 18, 42, 21, 48, 0, 54, 18, 33, 36, 66, 0, 84, 0,
75, 48, 30, 42, 54, 12, 54, 15, 42, 30, 96, 18, 42, 0, 18, 6,
123, 15, 48, 24, 48, 39, 42, 6, 21, 54, 45, 12, 60, 0, 90, 12,
30, 36, 45, 18, 72, 21, 78, 12, 30, 12, 60, 30, 18, 0, 78, 6,
60, 36, 33, 18, 60, 12, 30, 0, 60, 18, 90, 30, 54, 0, 36, 1,
78, 27, 84, 30, 18, 15, 102, 9, 27, 30, 24, 57, 90, 0, 42, 9,
48, 42, 42, 12, 72, 27, 48, 9, 108, 18, 48, 48, 18, 0, 84, 6,
66, 24, 48, 21, 114, 6, 78, 24, 30, 30, 42, 18, 60, 0, 18, 12,
63, 9, 51, 66, 48, 15, 54, 0, 66, 60, 36, 18, 48, 0, 66, 6,
36, 30, 96, 9, 36, 30, 30, 24, 93, 24, 72, 24, 66, 0, 60, 24,
48, 30, 24, 30, 72, 6, 60, 12, 30, 12, 93, 18, 72, 0, 30, 0,
81, 30, 36, 48, 36, 30, 90, 6, 54, 24, 57, 24, 36, 0, 54, 18,
36, 24, 78, 18, 72, 33, 12, 0, 51, 30, 48, 24, 42, 0, 90, 3,
78, 30, 30, 27, 138, 6, 30, 18, 36, 24, 75, 24, 12, 0, 54, 12,
42, 18, 84, 36, 30, 18, 66, 6, 45, 36, 36, 48, 114, 0, 24, 6,
30, 21, 108, 15, 48, 18, 36, 18, 57, 24, 63, 42, 54, 0, 78, 6,
81, 36, 18, 24, 42, 18, 120, 0, 24, 24, 66, 12, 54, 0, 48, 12,
66, 18, 42, 36, 48, 18, 72, 6, 48, 48, 33, 6, 102, 0, 54, 24,
39, 54, 60, 12, 90, 18, 36, 3, 111, 24, 51, 48, 42, 0, 90, 0,
45, 36, 54, 48, 54, 24, 18, 18, 51, 18, 72, 0, 54, 0, 18, 12,
54, 36, 57, 18, 42, 18, 120, 0, 63, 42, 27, 36, 48, 0, 54, 6,
39, 30, 81, 18, 72, 33, 54, 9, 72, 12, 54, 54, 24, 0, 54, 15,
75, 24, 60, 12, 78, 6, 30, 12, 39, 54, 72, 6, 54, 0, 72, 6,
78, 12, 54, 39, 30, 15, 48, 6, 57, 48, 18, 24, 90, 0, 90, 18,
42, 24, 39, 42, 24, 30, 42, 0, 84, 6, 66, 30, 30, 0, 30, 0,
27, 42, 39, 33, 90, 24, 84, 18, 51, 36, 69, 24, 54, 0, 42, 18,
87, 33, 51, 18, 42, 9, 126, 9, 84, 36, 66, 18, 54, 0, 36, 0,
66, 12, 48, 15, 54, 30, 18, 18, 60, 18, 96, 54, 42, 0, 102, 0,
27, 36, 30, 36, 108, 15, 54, 0, 24, 36, 60, 24, 66, 0, 30, 0,
54, 15, 75, 48, 36, 18, 48, 24, 36, 36, 54, 15, 108, 0, 84, 18};
rep(i, N) { cout << f.at(i) << endl; }
return 0;
}
| replace | 13 | 69 | 13 | 638 | 0 | |
p02608 | C++ | Runtime Error |
#include <algorithm>
#include <iomanip> // std::setprecision()
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define YES cout << "YES" << endl;
#define NO cout << "NO" << endl;
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define pai 3.14159265358979323846
ll gcd(ll a, ll b) {
if (a % b == 0)
return (b);
else
return (gcd(b, a % b));
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
/* map<string,int> */
/* 大文字を小文字に変換 tolower*/
/* 小文字を大文字に変換 toupper*/
/* 辞書順 next_permutation(a.begin(),a.end()) */
int main() {
int n;
cin >> n;
vector<ll> a(n, 0);
for (int x = 1; x < 100; x++) {
for (int y = 1; y < 100; y++) {
for (int z = 1; z < 100; z++) {
int tmp = x * x + y * y + z * z + x * y + y * z + z * x;
a[tmp]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
} |
#include <algorithm>
#include <iomanip> // std::setprecision()
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define YES cout << "YES" << endl;
#define NO cout << "NO" << endl;
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define pai 3.14159265358979323846
ll gcd(ll a, ll b) {
if (a % b == 0)
return (b);
else
return (gcd(b, a % b));
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
/* map<string,int> */
/* 大文字を小文字に変換 tolower*/
/* 小文字を大文字に変換 toupper*/
/* 辞書順 next_permutation(a.begin(),a.end()) */
int main() {
int n;
cin >> n;
vector<ll> a(100 * 100 * 100, 0);
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int tmp = x * x + y * y + z * z + x * y + y * z + z * x;
a[tmp]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
} | replace | 33 | 37 | 33 | 37 | -11 | |
p02608 | C++ | Time Limit Exceeded | // include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
int getDigit(int n); // 数字の桁数を取得する。
string upper(string str); // 英字を大文字に変換する。
string lower(string str); // 英字を小文字に変換する。
vector<pair<long long, long long>> prime_factorize(long long p); // 素因数分解
// class
// ------------------------------------------------
class Combi {
public:
Combi();
long long Combination(long long n, long long k);
long long nPk_modp(long long n, long long k, long long p);
private:
map<long long, map<long long, long long>> memo;
long long n_num;
long long k_num;
};
// define
// ------------------------------------------------
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define sz(a) int((a).size())
#define rep(i, n) for (long long(i) = 0; (i) < (n); (i)++)
#define repe(i, n) for (long long(i) = 0; (i) <= (n); (i)++)
#define vsort(v) sort((v).begin(), (v).end())
#define rvsort(v) sort(rall((v)))
#define vi vector<int>
#define GCD(a, b) __gcd((a), (b))
#define LCM(a, b) (a) / GCD((a), (b)) * (b)
#define kiriage(a, b) ((a) + (b)-1) / (b)
const int INF = 1e9;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<long> vll;
// code
// ------------------------------------------------
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
ll cnt = 0;
for (ll x = 1; i > x * x; x++)
for (ll y = 1; i > x * x + y * y; y++)
for (ll z = 1; i > x * x + y * y + z * z; z++) {
ll buf = x * x + y * y + z * z + x * y + y * z + z * x;
if (buf == i)
cnt++;
}
cout << cnt << endl;
}
return 0;
}
// funcの実体
// ------------------------------------------------
int getDigit(int n) {
int i = 1;
while (1) {
n = n / 10;
if (n == 1)
break;
i++;
}
return i;
}
int CalcSumOfDigit(int n) {
int s = 0;
while (n) {
s += n % 10;
n = n / 10;
}
return s;
}
string upper(string str) {
for (auto itr = str.begin(); itr != str.end(); itr++) {
if (97 <= *itr && *itr <= 122) {
*itr = *itr - 32;
}
}
return str;
}
string lower(string str) {
for (auto itr = str.begin(); itr != str.end(); itr++) {
if (65 <= *itr && *itr <= 90) {
*itr = *itr + 32;
}
}
return str;
}
Combi::Combi() {
n_num = -1;
k_num = -1;
};
ll Combi::Combination(ll n, ll k) {
ll ret;
if (memo[n][k] != 0) {
ret = memo[n][k];
} else if (n == k || k == 0) {
memo[n][k] = 1;
ret = 1;
} else {
ret = Combination(n - 1, k - 1) + Combination(n - 1, k);
memo[n][k] = ret;
}
return ret;
}
long long Combi::nPk_modp(long long n, long long k, long long p) {
ll ans = 1;
for (long long i = k; i <= n; i++) {
ans = (ans * i) % p;
}
return ans;
};
vector<pair<long long, long long>> prime_factorize(long long p) {
vector<pair<long long, long long>> ret;
for (long long x = 2; x * x <= p; ++x) {
if (p % x != 0)
continue;
long long num = 0;
while (p % x == 0) {
num++;
p /= x;
}
ret.push_back(make_pair(x, num));
}
if (p != 1)
ret.push_back(make_pair(p, 1));
return ret;
} | // include
// ------------------------------------------------
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
int getDigit(int n); // 数字の桁数を取得する。
string upper(string str); // 英字を大文字に変換する。
string lower(string str); // 英字を小文字に変換する。
vector<pair<long long, long long>> prime_factorize(long long p); // 素因数分解
// class
// ------------------------------------------------
class Combi {
public:
Combi();
long long Combination(long long n, long long k);
long long nPk_modp(long long n, long long k, long long p);
private:
map<long long, map<long long, long long>> memo;
long long n_num;
long long k_num;
};
// define
// ------------------------------------------------
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define sz(a) int((a).size())
#define rep(i, n) for (long long(i) = 0; (i) < (n); (i)++)
#define repe(i, n) for (long long(i) = 0; (i) <= (n); (i)++)
#define vsort(v) sort((v).begin(), (v).end())
#define rvsort(v) sort(rall((v)))
#define vi vector<int>
#define GCD(a, b) __gcd((a), (b))
#define LCM(a, b) (a) / GCD((a), (b)) * (b)
#define kiriage(a, b) ((a) + (b)-1) / (b)
const int INF = 1e9;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<long> vll;
// code
// ------------------------------------------------
int main() {
ll n;
cin >> n;
for (ll i = 1; i <= n; i++) {
ll cnt = 0;
for (ll x = 1; i > x * x; x++)
for (ll y = 1; i > x * x + y * y + x * y; y++)
for (ll z = 1; i >= x * x + y * y + z * z + x * y + y * z + z * x;
z++) {
ll buf = x * x + y * y + z * z + x * y + y * z + z * x;
if (buf == i)
cnt++;
}
cout << cnt << endl;
}
return 0;
}
// funcの実体
// ------------------------------------------------
int getDigit(int n) {
int i = 1;
while (1) {
n = n / 10;
if (n == 1)
break;
i++;
}
return i;
}
int CalcSumOfDigit(int n) {
int s = 0;
while (n) {
s += n % 10;
n = n / 10;
}
return s;
}
string upper(string str) {
for (auto itr = str.begin(); itr != str.end(); itr++) {
if (97 <= *itr && *itr <= 122) {
*itr = *itr - 32;
}
}
return str;
}
string lower(string str) {
for (auto itr = str.begin(); itr != str.end(); itr++) {
if (65 <= *itr && *itr <= 90) {
*itr = *itr + 32;
}
}
return str;
}
Combi::Combi() {
n_num = -1;
k_num = -1;
};
ll Combi::Combination(ll n, ll k) {
ll ret;
if (memo[n][k] != 0) {
ret = memo[n][k];
} else if (n == k || k == 0) {
memo[n][k] = 1;
ret = 1;
} else {
ret = Combination(n - 1, k - 1) + Combination(n - 1, k);
memo[n][k] = ret;
}
return ret;
}
long long Combi::nPk_modp(long long n, long long k, long long p) {
ll ans = 1;
for (long long i = k; i <= n; i++) {
ans = (ans * i) % p;
}
return ans;
};
vector<pair<long long, long long>> prime_factorize(long long p) {
vector<pair<long long, long long>> ret;
for (long long x = 2; x * x <= p; ++x) {
if (p % x != 0)
continue;
long long num = 0;
while (p % x == 0) {
num++;
p /= x;
}
ret.push_back(make_pair(x, num));
}
if (p != 1)
ret.push_back(make_pair(p, 1));
return ret;
} | replace | 58 | 60 | 58 | 61 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
for (int i = 1; i < n + 1; i++) {
int ans = 0;
for (int x = 1; x < 45; x++) {
for (int y = x; y < 99; y++) {
for (int z = y; z < 101; z++) {
if (pow(x + y, 2) + pow(y + z, 2) + pow(z + x, 2) == 2 * i) {
if (x < y && y < z)
ans += 6;
if (x < y && y == z)
ans += 3;
if (x == y && y < z)
ans += 3;
if (x == y && y == z)
ans += 1;
}
}
}
}
cout << ans << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
for (int i = 1; i < n + 1; i++) {
int ans = 0;
for (int x = 1; x < 45; x++) {
for (int y = x; y < 60; y++) {
for (int z = y; z < 101; z++) {
if (pow(x + y, 2) + pow(y + z, 2) + pow(z + x, 2) == 2 * i) {
if (x < y && y < z)
ans += 6;
if (x < y && y == z)
ans += 3;
if (x == y && y < z)
ans += 3;
if (x == y && y == z)
ans += 1;
}
}
}
}
cout << ans << endl;
}
} | replace | 11 | 12 | 11 | 12 | TLE | |
p02608 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma region Macros
/***
* @author uesugi
* @file AtCoder用テンプレート
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
#define _OVERLOAD3(_1, _2, _3, name, ...) name
#define _REP(i, n) REPI(i, 0, n)
#define REPI(i, a, b) for (int i = int(a), i##_len = (b); i < i##_len; ++i)
#define REP(...) \
_OVERLOAD3(__VA_ARGS__, REPI, _REP, ) \
(__VA_ARGS__)
#define ALL(x) (x).begin(), (x).end()
#define SIZE(x) ((ll)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
/**
* 最大値更新
* @param T &a 更新対象
* @param const T &b 判定対象
* @return 更新有無
*/
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
/**
* 最小値更新
* @param T &a 更新対象
* @param const T &b 判定対象
* @return 更新有無
*/
template <class T> inline bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
/**
* overload
* 入力を配列に格納
* 配列の長さ分入力を格納
* @param std::istream &is 入力ストリーム
* @param std::vector<T> &vec 格納先配列
* @return std::istream
*/
template <typename T>
inline std::istream &operator>>(std::istream &is, std::vector<T> &vec) {
for (T &element : vec) {
is >> element;
}
return is;
}
template <typename T1, typename T2>
inline std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
is >> p.first >> p.second;
return is;
}
/**
* overload
* コンテナの要素を出力する
* @param std::basic_ostream<Ch, Tr> &os 出力ストリーム
* @param Container const &x 出力対象コンテナ
* @return std::basic_ostream<Ch, Tr>
*/
template <class Ch, class Tr, class Container>
inline std::basic_ostream<Ch, Tr> &operator<<(std::basic_ostream<Ch, Tr> &os,
Container const &x) {
bool first = true;
for (auto &y : x) {
if (first) {
first = false;
} else {
os << " ";
}
os << y;
}
return os;
}
// debug methods
// usage: debug(x,y);
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define DEBUG_1(x1) cout << #x1 << ": " << x1 << "\n"
#define DEBUG_2(x1, x2) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << "\n"
#define DEBUG_3(x1, x2, x3) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << "\n"
#define DEBUG_4(x1, x2, x3, x4) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << ", " #x4 << ": " << x4 << "\n"
#define DEBUG_5(x1, x2, x3, x4, x5) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << ", " #x4 << ": " << x4 << ", " #x5 << ": " << x5 << "\n"
#ifdef _DEBUG
/**
* デバッグ用出力メソッド
* 変数名及び値を出力
* -D_DEBUG オプション付きビルド時のみ有効
* @param 可変長引数
*/
#define DEBUG(...) \
CHOOSE((__VA_ARGS__, DEBUG_5, DEBUG_4, DEBUG_3, DEBUG_2, DEBUG_1, ~)) \
(__VA_ARGS__)
#define DEBUG_TIME() cout << "debug_time: " << clock() - START_TIME << "\n"
clock_t START_TIME = clock();
#else
#define DEBUG(...)
#define DEBUG_TIME()
#endif
#pragma endregion
const long int AA[] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3,
0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0,
0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1,
6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3,
6, 0, 0, 0, 6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 0, 3, 6,
0, 0, 0, 0, 6, 1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3,
6, 0, 0, 0, 3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0,
0, 0, 3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0,
6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0, 6, 6,
12, 0, 0, 6, 0, 0, 6, 0, 12, 3, 6, 0, 6, 3, 9, 6, 3, 6,
6, 0, 6, 0, 6, 0, 15, 6, 0, 0, 6, 0, 3, 3, 12, 0, 12, 6,
6, 0, 3, 6, 6, 3, 12, 0, 6, 0, 9, 6, 0, 0, 6, 3, 12, 1,
6, 6, 6, 6, 0, 0, 18, 0, 12, 0, 3, 6, 12, 0, 0, 6, 3, 6,
12, 0, 12, 0, 0, 0, 9, 3, 9, 6, 12, 3, 12, 0, 3, 6, 6, 0,
12, 0, 12, 0, 9, 9, 0, 0, 6, 3, 6, 3, 12, 6, 9, 3, 6, 0,
12, 3, 6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6, 0, 12, 3,
6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0, 0, 6,
15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 3, 3,
18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0, 12, 0, 9, 6, 0, 3,
12, 3, 6, 6, 12, 6, 6, 0, 0, 0, 15, 3, 18, 3, 18, 3, 12, 6,
3, 6, 9, 0, 12, 0, 12, 0, 18, 12, 0, 0, 12, 3, 6, 0, 6, 6,
9, 6, 0, 0, 18, 1, 18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6,
18, 0, 0, 6, 0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0,
12, 0, 3, 6, 12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3,
27, 6, 6, 6, 6, 3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0, 9, 9,
15, 3, 12, 6, 6, 3, 9, 6, 12, 12, 18, 0, 18, 0, 6, 6, 21, 6,
0, 0, 6, 3, 15, 6, 12, 6, 18, 0, 0, 0, 12, 6, 6, 3, 6, 4,
18, 6, 12, 6, 3, 9, 30, 0, 18, 0, 6, 6, 12, 6, 6, 9, 12, 0,
18, 6, 18, 0, 6, 0, 12, 0, 6, 12, 6, 3, 18, 0, 6, 6, 6, 6,
15, 3, 24, 0, 6, 3, 18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6,
0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0,
12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 12, 0,
21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0, 12, 6,
24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3, 12, 6, 6, 12,
24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21, 12, 0, 6,
18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3, 18, 6,
21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12, 12,
18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12,
24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0,
12, 3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6,
0, 6, 9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0, 9, 12,
21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0,
18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6,
30, 3, 6, 12, 6, 12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6,
24, 0, 12, 6, 12, 0, 18, 0, 18, 15, 18, 3, 18, 6, 12, 6, 6, 12,
3, 6, 6, 0, 12, 3, 39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6,
18, 0, 12, 0, 9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0,
18, 0, 9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1,
18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6, 12, 15,
24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0, 12, 6, 12, 12,
18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6, 30, 9, 6, 12, 24, 12,
12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18, 3, 18, 3, 12, 6,
24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9, 12, 0, 3, 12,
36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9,
24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0,
6, 0, 27, 12, 18, 3, 30, 3, 18, 6, 0, 12, 15, 6, 18, 0, 24, 0,
9, 6, 9, 12, 18, 7, 24, 0, 24, 12, 15, 12, 24, 0, 24, 0, 6, 9,
30, 9, 6, 6, 0, 9, 33, 12, 36, 0, 12, 0, 18, 0, 6, 21, 12, 6,
36, 6, 0, 3, 18, 6, 12, 6, 24, 0, 12, 3, 24, 6, 9, 12, 6, 6,
30, 6, 18, 12, 9, 9, 12, 0, 30, 3, 18, 3, 27, 6, 30, 12, 12, 0,
24, 0, 27, 12, 6, 0, 24, 3, 18, 18, 9, 6, 18, 0, 12, 3, 33, 18,
12, 9, 6, 0, 12, 6, 30, 0, 24, 12, 12, 0, 30, 6, 6, 6, 0, 6,
24, 0, 12, 0, 18, 15, 33, 6, 30, 15, 18, 0, 9, 12, 24, 9, 12, 0,
18, 6, 27, 18, 15, 6, 18, 3, 24, 0, 6, 6, 36, 12, 18, 0, 12, 3,
30, 3, 12, 6, 12, 15, 6, 0, 18, 12, 15, 9, 30, 0, 18, 6, 12, 12,
18, 6, 6, 3, 24, 1, 27, 12, 18, 6, 18, 0, 24, 0, 18, 15, 15, 21,
30, 6, 12, 12, 18, 0, 30, 6, 24, 0, 6, 0, 18, 6, 36, 12, 6, 6,
36, 0, 6, 12, 12, 12, 24, 0, 30, 0, 9, 6, 18, 0, 18, 12, 12, 6,
24, 6, 9, 15, 12, 0, 12, 6, 30, 9, 18, 0, 42, 3, 18, 6, 12, 18,
33, 12, 12, 0, 18, 0, 21, 12, 12, 12, 24, 6, 30, 0, 27, 18, 6, 12,
6, 0, 24, 0, 18, 15, 30, 0, 18, 12, 6, 0, 21, 6, 21, 12, 24, 0,
30, 0, 6, 6, 6, 12, 24, 0, 30, 12, 9, 12, 21, 3, 24, 0, 12, 3,
21, 18, 9, 18, 18, 6, 30, 3, 42, 6, 21, 6, 30, 0, 6, 3, 24, 9,
36, 6, 6, 9, 12, 6, 18, 12, 33, 9, 12, 0, 24, 9, 9, 6, 3, 18,
36, 6, 18, 0, 24, 6, 6, 6, 18, 0, 12, 0, 30, 3, 39, 12, 12, 7,
18, 0, 15, 18, 18, 9, 36, 0, 24, 6, 6, 18, 30, 0, 18, 9, 18, 3,
24, 6, 21, 12, 24, 0, 30, 3, 33, 24, 12, 6, 18, 6, 6, 6, 18, 6,
18, 12, 18, 0, 24, 6, 36, 3, 18, 6, 0, 12, 30, 0, 9, 24, 18, 0,
24, 0, 18, 0, 0, 12, 30, 15, 30, 6, 18, 3, 30, 0, 24, 18, 12, 0,
36, 3, 24, 12, 15, 18, 18, 6, 24, 3, 24, 12, 18, 12, 24, 0, 0, 6,
39, 6, 24, 3, 18, 3, 42, 6, 12, 12, 15, 9, 30, 0, 12, 0, 18, 6,
18, 12, 24, 15, 12, 0, 12, 12, 30, 12, 12, 0, 18, 0, 15, 15, 18, 18,
30, 3, 24, 12, 9, 6, 48, 0, 18, 0, 30, 0, 21, 6, 12, 12, 24, 12,
18, 3, 48, 24, 6, 6, 18, 0, 36, 0, 12, 15, 27, 6, 12, 12, 18, 6,
27, 6, 12, 9, 18, 0, 24, 6, 18, 18, 21, 0, 36, 0, 12, 0, 18, 12,
21, 18, 24, 0, 12, 1, 18, 9, 21, 18, 6, 9, 42, 3, 36, 12, 12, 12,
30, 0, 12, 6, 21, 12, 36, 6, 24, 9, 12, 6, 12, 12, 24, 12, 18, 0,
42, 0, 15, 6, 15, 15, 42, 6, 30, 6, 12, 12, 18, 12, 18, 0, 6, 6,
36, 0, 30, 18, 6, 0, 6, 0, 30, 18, 18, 0, 42, 0, 18, 6, 15, 18,
24, 0, 12, 6, 36, 9, 33, 12, 12, 12, 18, 0, 36, 0, 21, 21, 15, 18,
18, 15, 18, 0, 18, 6, 42, 6, 24, 0, 18, 3, 42, 6, 18, 12, 12, 12,
18, 0, 15, 12, 18, 12, 36, 0, 30, 12, 3, 21, 18, 0, 30, 6, 24, 0,
27, 12, 18, 12, 6, 0, 12, 0, 36, 15, 15, 3, 36, 12, 18, 6, 30, 6,
33, 12, 12, 0, 12, 6, 24, 6, 54, 18, 12, 3, 36, 9, 9, 12, 12, 18,
36, 0, 6, 0, 21, 15, 27, 9, 24, 12, 30, 6, 24, 6, 27, 18, 12, 0,
30, 0, 21, 12, 18, 6, 30, 0, 18, 0, 21, 18, 21, 6, 30, 0, 24, 3,
6, 6, 15, 27, 12, 10, 42, 6, 36, 12, 12, 6, 24, 0, 24, 6, 12, 12,
48, 6, 18, 12, 0, 3, 51, 6, 30, 6, 24, 0, 24, 0, 30, 21, 15, 12,
24, 9, 18, 6, 18, 12, 30, 9, 24, 0, 18, 0, 27, 18, 9, 6, 18, 9,
54, 0, 18, 24, 21, 18, 12, 0, 24, 0, 12, 0, 30, 9, 30, 12, 6, 9,
24, 6, 15, 15, 18, 0, 30, 3, 33, 18, 21, 12, 42, 3, 30, 6, 6, 24,
27, 6, 12, 0, 24, 3, 42, 6, 42, 9, 12, 6, 18, 6, 24, 12, 12, 12,
54, 0, 6, 12, 18, 6, 18, 18, 30, 12, 30, 0, 18, 0, 27, 18, 24, 0,
18, 0, 15, 24, 21, 6, 24, 3, 36, 6, 6, 6, 45, 21, 18, 0, 18, 6,
33, 3, 18, 0, 24, 15, 30, 0, 30, 24, 12, 6, 36, 0, 24, 3, 21, 24,
18, 15, 30, 3, 12, 6, 42, 12, 12, 12, 6, 0, 54, 6, 30, 15, 24, 18,
24, 6, 12, 0, 9, 6, 30, 0, 48, 0, 24, 0, 15, 12, 39, 12, 24, 6,
24, 6, 15, 30, 12, 6, 24, 0, 24, 3, 24, 12, 24, 6, 6, 18, 12, 4,
54, 6, 21, 18, 18, 0, 36, 6, 24, 9, 30, 12, 24, 9, 36, 6, 12, 18,
42, 3, 30, 0, 6, 9, 21, 6, 12, 30, 30, 6, 30, 0, 27, 12, 9, 18,
30, 0, 36, 0, 18, 9, 42, 6, 24, 12, 0, 6, 51, 12, 24, 12, 12, 0,
18, 6, 12, 18, 6, 6, 36, 3, 54, 9, 18, 6, 27, 12, 18, 0, 30, 0,
39, 9, 18, 18, 12, 9, 30, 6, 21, 12, 27, 18, 24, 0, 12, 0, 42, 18,
42, 6, 24, 15, 18, 0, 24, 12, 45, 12, 6, 0, 54, 0, 15, 21, 6, 6,
30, 6, 18, 12, 24, 18, 30, 6, 36, 0, 12, 3, 24, 12, 18, 18, 18, 12,
24, 0, 33, 12, 27, 6, 42, 0, 18, 6, 9, 15, 30, 6, 30, 6, 12, 6,
18, 6, 33, 15, 30, 0, 36, 3, 27, 21, 33, 24, 30, 9, 24, 0, 12, 18,
33, 6, 6, 0, 18, 3, 57, 12, 24, 18, 30, 9, 18, 0, 18, 12, 27, 12,
36, 0, 36, 6, 12, 6, 27, 12, 30, 9, 24, 6, 39, 18, 12, 24, 12, 0,
30, 0, 30, 6, 15, 15, 18, 3, 24, 18, 9, 12, 30, 9, 30, 0, 18, 6,
42, 18, 30, 0, 6, 10, 48, 0, 24, 12, 12, 18, 48, 0, 30, 3, 30, 15,
18, 6, 24, 18, 18, 0, 42, 6, 36, 15, 24, 0, 42, 12, 21, 24, 12, 12,
24, 0, 12, 6, 18, 18, 60, 6, 30, 0, 12, 0, 24, 0, 12, 18, 30, 15,
42, 0, 33, 30, 6, 6, 12, 0, 42, 3, 27, 6, 33, 12, 36, 12, 18, 0,
30, 6, 18, 12, 12, 0, 18, 6, 15, 27, 27, 6, 42, 6, 36, 9, 18, 30,
33, 9, 30, 0, 6, 6, 54, 6, 36, 24, 24, 0, 30, 3, 12, 6, 21, 24,
30, 0, 24, 0, 24, 12, 42, 9, 42, 21, 12, 12, 27, 12, 27, 6, 12, 0,
48, 6, 12, 18, 12, 12, 36, 6, 30, 0, 24, 0, 42, 12, 12, 0, 36, 0,
24, 15, 21, 21, 18, 6, 12, 9, 36, 18, 18, 15, 42, 0, 18, 6, 9, 18,
48, 12, 30, 9, 24, 3, 33, 6, 18, 18, 18, 0, 36, 3, 54, 24, 3, 12,
36, 9, 36, 6, 30, 12, 36, 12, 24, 0, 18, 6, 24, 6, 42, 0, 24, 18,
18, 0, 9, 30, 39, 12, 42, 0, 36, 0, 12, 12, 21, 12, 18, 12, 24, 6,
45, 6, 18, 24, 18, 0, 36, 0, 42, 15, 18, 6, 24, 6, 12, 12, 18, 12,
30, 6, 18, 0, 30, 1, 30, 9, 57, 9, 12, 9, 48, 6, 21, 24, 18, 12,
66, 0, 18, 6, 9, 24, 24, 24, 30, 12, 18, 0, 48, 6, 24, 18, 18, 0,
24, 3, 27, 18, 24, 12, 36, 6, 48, 6, 15, 18, 42, 6, 24, 0, 12, 12,
36, 6, 6, 24, 12, 3, 48, 0, 48, 18, 0, 12, 18, 0, 36, 6, 18, 9,
54, 15, 12, 12, 6, 6, 39, 6, 24, 18, 42, 0, 30, 0, 33, 18, 24, 18,
18, 9, 18, 0, 15, 18, 54, 0, 36, 0, 24, 0, 48, 24, 15, 18, 18, 12,
42, 9, 24, 12, 36, 21, 30, 0, 36, 12, 24, 3, 30, 0, 48, 15, 12, 6,
15, 18, 18, 18, 24, 0, 30, 0, 24, 24, 18, 9, 72, 0, 30, 6, 21, 18,
30, 6, 24, 0, 0, 6, 24, 18, 42, 12, 6, 15, 36, 0, 30, 18, 30, 12,
24, 0, 6, 0, 18, 12, 54, 9, 36, 9, 36, 9, 30, 6, 27, 27, 24, 0,
54, 6, 21, 18, 21, 6, 36, 15, 36, 3, 30, 12, 6, 18, 30, 0, 18, 6,
54, 0, 30, 21, 36, 9, 30, 6, 30, 24, 24, 6, 30, 0, 36, 12, 9, 24,
24, 12, 18, 9, 30, 0, 48, 12, 24, 12, 12, 0, 48, 0, 18, 12, 24, 24,
30, 6, 18, 12, 21, 12, 24, 0, 66, 0, 12, 0, 30, 9, 24, 24, 18, 13,
42, 3, 18, 18, 27, 24, 24, 0, 30, 6, 15, 18, 39, 12, 12, 9, 36, 12,
54, 12, 42, 18, 6, 0, 36, 0, 51, 18, 12, 0, 66, 12, 24, 0, 6, 24,
51, 12, 24, 0, 24, 0, 33, 6, 18, 18, 30, 6, 42, 3, 18, 30, 15, 15,
30, 0, 30, 6, 30, 12, 48, 12, 24, 12, 12, 9, 36, 6, 36, 6, 12, 0,
30, 0, 24, 21, 24, 15, 42, 12, 24, 6, 9, 18, 15, 9, 42, 0, 24, 12,
66, 12, 30, 24, 6, 9, 54, 0, 36, 12, 21, 12, 36, 0, 24, 3, 24, 15,
36, 6, 30, 24, 12, 6, 33, 6, 39, 21, 30, 0, 42, 6, 12, 30, 30, 18,
36, 0, 48, 3, 36, 12, 30, 18, 18, 0, 24, 0, 30, 6, 33, 21, 24, 6,
18, 12, 24, 12, 12, 15, 48, 0, 24, 6, 21, 21, 60, 6, 24, 12, 18, 0,
30, 12, 15, 12, 24, 0, 24, 3, 60, 27, 18, 12, 30, 3, 24, 9, 21, 12,
60, 18, 24, 0, 24, 9, 33, 6, 36, 12, 24, 15, 42, 6, 27, 36, 27, 6,
42, 0, 42, 6, 12, 15, 15, 24, 42, 18, 12, 0, 33, 6, 21, 18, 24, 0,
48, 3, 36, 9, 24, 24, 30, 6, 36, 0, 39, 18, 60, 6, 18, 0, 12, 6,
21, 27, 30, 0, 18, 6, 42, 6, 42, 18, 24, 9, 48, 0, 6, 6, 18, 18,
18, 6, 18, 15, 30, 4, 60, 12, 30, 30, 18, 0, 36, 0, 27, 18, 30, 18,
48, 9, 30, 12, 18, 6, 42, 9, 48, 0, 18, 6, 42, 6, 30, 24, 12, 3,
36, 0, 36, 36, 15, 18, 30, 0, 66, 0, 12, 18, 42, 9, 24, 15, 18, 12,
54, 6, 18, 21, 36, 0, 30, 6, 24, 24, 12, 6, 24, 9, 36, 12, 6, 12,
45, 12, 36, 0, 36, 0, 48, 3, 24, 18, 12, 24, 36, 0, 30, 12, 30, 21,
30, 0, 6, 15, 18, 15, 66, 12, 42, 3, 12, 0, 39, 12, 30, 12, 18, 0,
54, 6, 30, 24, 9, 12, 60, 12, 30, 12, 30, 24, 24, 18, 30, 0, 36, 0,
27, 9, 45, 18, 24, 12, 24, 0, 36, 24, 12, 6, 60, 0, 18, 0, 24, 15,
51, 9, 24, 12, 30, 12, 27, 18, 51, 18, 24, 0, 36, 6, 27, 27, 12, 30,
36, 6, 30, 0, 12, 6, 42, 0, 18, 0, 18, 0, 48, 12, 45, 24, 6, 15,
42, 6, 12, 18, 27, 9, 54, 0, 42, 3, 33, 12, 15, 12, 54, 18, 30, 6,
36, 18, 21, 30, 18, 0, 48, 3, 30, 18, 36, 6, 18, 0, 18, 12, 57, 24,
42, 6, 24, 0, 18, 12, 36, 18, 30, 12, 36, 3, 78, 0, 24, 6, 6, 36,
42, 0, 24, 0, 21, 15, 33, 6, 42, 18, 12, 3, 30, 12, 30, 27, 24, 0,
42, 12, 39, 12, 30, 12, 30, 15, 30, 6, 12, 24, 54, 6, 24, 0, 18, 6,
33, 12, 18, 24, 24, 7, 30, 0, 60, 24, 21, 12, 30, 0, 48, 6, 18, 15,
39, 12, 18, 18, 18, 0, 48, 12, 54, 18, 42, 0, 30, 0, 15, 30, 27, 18,
72, 0, 30, 15, 12, 12, 30, 18, 36, 0, 6, 3, 60, 15, 24, 18, 6, 18,
54, 6, 21, 24, 24, 12, 30, 0, 30, 6, 30, 15, 54, 6, 48, 12, 30, 12,
36, 0, 24, 3, 24, 0, 54, 6, 18, 30, 15, 6, 42, 9, 36, 0, 21, 30,
15, 12, 12, 0, 24, 3, 72, 0, 51, 39, 24, 12, 30, 3, 33, 18, 15, 12,
42, 0, 30, 12, 27, 24, 51, 12, 42, 12, 18, 3, 42, 12, 39, 18, 12, 0,
30, 0, 24, 21, 21, 21, 30, 6, 66, 12, 12, 6, 69, 21, 30, 0, 24, 6,
45, 12, 12, 18, 42, 12, 18, 0, 39, 30, 33, 12, 54, 0, 12, 0, 12, 18,
36, 9, 30, 9, 24, 9, 60, 12, 30, 12, 12, 0, 42, 9, 42, 18, 45, 24,
42, 6, 12, 9, 24, 6, 30, 12, 42, 0, 30, 6, 15, 15, 30, 12, 18, 12,
54, 6, 21, 30, 12, 33, 60, 0, 48, 0, 30, 15, 42, 6, 24, 24, 30, 0,
36, 18, 33, 18, 12, 0, 60, 0, 72, 15, 12, 9, 30, 12, 24, 15, 21, 24,
51, 12, 24, 0, 24, 6, 12, 6, 33, 24, 36, 9, 54, 6, 27, 24, 30, 6,
48, 0, 24, 3, 36, 27, 42, 15, 18, 18, 12, 6, 54, 6, 30, 15, 36, 0,
12, 12, 18, 24, 21, 18, 30, 3, 60, 0, 33, 12, 36, 18, 48, 0, 24, 1,
39, 12, 24, 18, 24, 9, 66, 6, 48, 24, 12, 12, 42, 0, 24, 6, 18, 12,
63, 6, 36, 24, 18, 0, 39, 12, 39, 24, 24, 0, 54, 6, 15, 24, 15, 24,
48, 3, 36, 12, 12, 24, 39, 18, 36, 0, 42, 6, 42, 6, 60, 24, 12, 18,
18, 0, 45, 6, 6, 6, 72, 0, 30, 6, 24, 9, 36, 12, 24, 9, 30, 15,
36, 18, 33, 24, 6, 0, 54, 0, 33, 36, 18, 24, 36, 6, 18, 6, 24, 18,
75, 6, 18, 0, 18, 0, 48, 9, 36, 18, 42, 9, 30, 0, 27, 36, 24, 15,
42, 0, 42, 18, 36, 12, 18, 12, 72, 9, 24, 0, 54, 18, 21, 24, 12, 0,
60, 0, 24, 24, 39, 12, 42, 18, 30, 6, 9, 12, 48, 12, 30, 0, 18, 12,
36, 15, 48, 18, 18, 3, 42, 6, 42, 18, 18, 24, 54, 0, 36, 0, 24, 36,
42, 0, 12, 27, 30, 6, 60, 6, 30, 24, 12, 0, 36, 3, 42, 12, 18, 12,
36, 9, 30, 0, 15, 18, 33, 12, 54, 0, 30, 6, 33, 21, 27, 30, 42, 12,
54, 9, 42, 24, 27, 6, 36, 0, 24, 12, 24, 12, 45, 24, 12, 6, 30, 12,
69, 12, 42, 12, 30, 0, 24, 0, 42, 18, 24, 15, 60, 9, 48, 18, 18, 24,
27, 12, 36, 0, 30, 0, 54, 9, 30, 18, 24, 15, 48, 0, 24, 24, 45, 24,
24, 0, 18, 6, 36, 9, 54, 15, 24, 12, 12, 6, 18, 12, 54, 18, 12, 0,
60, 3, 48, 30, 12, 18, 60, 6, 24, 3, 36, 12, 33, 12, 36, 0, 36, 6,
36, 3, 33, 24, 12, 13, 42, 12, 27, 18, 30, 12, 54, 0, 30, 12, 21, 39,
54, 6, 54, 18, 18, 0, 33, 12, 36, 36, 36, 0, 30, 0, 42, 33, 18, 18,
36, 12, 30, 3, 30, 12, 66, 6, 30, 0, 18, 12, 63, 18, 24, 6, 30, 12,
48, 9, 6, 24, 30, 12, 42, 0, 72, 0, 30, 12, 48, 3, 24, 15, 12, 12,
66, 18, 9, 36, 12, 0, 54, 0, 54, 18, 15, 30, 36, 6, 12, 0, 21, 18,
54, 12, 30, 0, 6, 0, 36, 15, 60, 18, 18, 15, 48, 6, 27, 24, 21, 12,
54, 0, 54, 9, 12, 24, 48, 12, 48, 15, 54, 6, 36, 6, 39, 24, 24, 0,
24, 3, 33, 24, 18, 18, 66, 12, 18, 12, 30, 12, 75, 15, 36, 0, 30, 9,
24, 6, 21, 24, 24, 12, 60, 0, 66, 36, 12, 18, 36, 0, 24, 6, 30, 18,
39, 18, 30, 12, 24, 9, 30, 6, 36, 18, 18, 0, 54, 12, 33, 24, 36, 6,
66, 0, 30, 6, 12, 12, 33, 24, 54, 0, 18, 3, 60, 3, 30, 24, 24, 21,
48, 0, 18, 30, 51, 12, 18, 0, 30, 12, 33, 15, 18, 12, 30, 27, 24, 0,
48, 12, 45, 6, 30, 0, 72, 0, 51, 18, 27, 27, 54, 9, 48, 12, 27, 30,
36, 18, 18, 0, 42, 3, 36, 9, 45, 30, 6, 6, 36, 3, 51, 24, 24, 18,
72, 0, 18, 6, 9, 36, 42, 0, 36, 9, 30, 12, 60, 30, 24, 15, 24, 0,
36, 6, 30, 27, 27, 18, 42, 12, 48, 0, 42, 0, 33, 24, 24, 0, 30, 0,
42, 12, 48, 9, 36, 9, 24, 6, 27, 36, 12, 9, 60, 0, 30, 12, 15, 18,
42, 18, 36, 18, 24, 7, 48, 12, 54, 24, 30, 0, 78, 0, 18, 18, 27, 24,
24, 6, 30, 12, 33, 18, 60, 15, 54, 0, 12, 12, 36, 12, 36, 24, 30, 18,
54, 0, 18, 18, 18, 24, 84, 0, 54, 0, 27, 15, 42, 6, 36, 12, 18, 9,
54, 6, 30, 30, 24, 0, 30, 9, 60, 30, 36, 6, 42, 12, 30, 6, 6, 30,
60, 0, 18, 0, 24, 9, 51, 18, 24, 33, 30, 0, 42, 12, 60, 18, 18, 36,
18, 0, 24, 0, 18, 9, 78, 12, 48, 24, 12, 0, 48, 6, 12, 18, 42, 0,
48, 0, 30, 27, 18, 6, 48, 3, 66, 21, 18, 18, 33, 12, 48, 0, 30, 6,
63, 21, 18, 36, 24, 15, 60, 6, 36, 30, 36, 0, 48, 0, 48, 3, 36, 30,
42, 18, 24, 24, 12, 6, 21, 6, 72, 12, 36, 0, 60, 6, 12, 18, 15, 24,
60, 9, 30, 0, 39, 30, 54, 12, 18, 0, 18, 3, 60, 9, 57, 24, 6, 18,
48, 6, 60, 18, 18, 9, 48, 0, 24, 12, 18, 18, 39, 6, 42, 15, 36, 6,
36, 18, 18, 30, 18, 0, 42, 6, 39, 27, 27, 18, 48, 12, 42, 12, 24, 18,
27, 9, 30, 0, 24, 9, 81, 12, 72, 12, 30, 6, 36, 0, 33, 42, 39, 30,
42, 0, 12, 3, 12, 6, 24, 18, 48, 12, 48, 3, 63, 24, 24, 27, 30, 0,
78, 6, 36, 18, 36, 30, 30, 12, 36, 12, 30, 6, 60, 12, 48, 0, 24, 0,
36, 21, 30, 24, 30, 12, 48, 0, 36, 12, 24, 27, 36, 0, 42, 12, 27, 24,
54, 6, 18, 12, 48, 0, 30, 6, 72, 24, 12, 0, 30, 3, 45, 24, 0, 18,
78, 15, 18, 18, 39, 18, 39, 9, 36, 0, 24, 6, 39, 12, 30, 18, 30, 16,
48, 0, 36, 30, 12, 12, 60, 0, 42, 3, 24, 21, 84, 33, 30, 12, 18, 18,
48, 12, 36, 12, 30, 0, 48, 9, 42, 36, 42, 6, 48, 3, 42, 0, 33, 24,
30, 12, 36, 0, 36, 6, 54, 12, 30, 30, 6, 21, 66, 0, 39, 24, 36, 24,
36, 0, 24, 12, 30, 15, 54, 12, 78, 30, 6, 0, 33, 12, 27, 30, 30, 0,
36, 6, 18, 36, 36, 6, 66, 3, 60, 6, 18, 30, 42, 0, 12, 0, 36, 6,
54, 6, 33, 24, 24, 12, 54, 0, 42, 12, 15, 12, 60, 0, 30, 0, 21, 18,
75, 18, 48, 18, 18, 15, 30, 24, 42, 33, 36, 0, 30, 6, 45, 24, 9, 30,
36, 3, 54, 15, 24, 18, 63, 18, 42, 0, 24, 0, 75, 6, 30, 9, 30, 15,
42, 12, 33, 36, 21, 24, 60, 0, 54, 9, 30, 30, 48, 12, 18, 12, 24, 0,
66, 12, 24, 18, 36, 0, 72, 6, 36, 15, 27, 27, 30, 6, 12, 18, 24, 6,
78, 15, 42, 0, 12, 6, 27, 24, 51, 18, 36, 12, 60, 3, 51, 30, 12, 24,
36, 0, 30, 0, 48, 12, 21, 6, 36, 24, 54, 6, 42, 6, 36, 36, 6, 0,
54, 12, 27, 15, 18, 18, 66, 6, 42, 0, 15, 30, 63, 12, 48, 0, 36, 3,
63, 12, 36, 30, 18, 9, 48, 3, 48, 36, 30, 12, 42, 0, 72, 6, 36, 30,
30, 12, 24, 12, 6, 15, 75, 18, 30, 6, 36, 0, 24, 0, 18, 36, 48, 18,
60, 18, 60, 12, 33, 12, 33, 15, 72, 0, 18, 9, 54, 15, 21, 30, 36, 12,
30, 0, 42, 24, 48, 18, 36, 0, 24, 6, 18, 15, 81, 12, 12, 27, 36, 12,
30, 6, 36, 18, 24, 0, 48, 6, 36, 36, 27, 6, 48, 9, 36, 3, 36, 36,
36, 24, 30, 0, 24, 1, 42, 6, 66, 27, 24, 18, 48, 12, 51, 18, 24, 18,
84, 0, 24, 6, 12, 9, 63, 18, 48, 9, 30, 0, 36, 12, 33, 24, 30, 0,
72, 0, 42, 48, 36, 18, 42, 12, 42, 15, 24, 12, 60, 15, 24, 0, 12, 21,
72, 3, 42, 30, 24, 18, 36, 6, 42, 18, 30, 12, 42, 0, 48, 12, 12, 24,
24, 18, 66, 6, 24, 0, 93, 12, 51, 30, 12, 0, 54, 6, 18, 27, 24, 24,
36, 12, 30, 0, 45, 18, 60, 6, 54, 0, 24, 0, 51, 24, 21, 18, 30, 6,
72, 6, 6, 18, 21, 36, 42, 0, 48, 12, 27, 24, 36, 6, 30, 27, 30, 6,
39, 18, 51, 36, 30, 0, 42, 0, 66, 18, 36, 6, 66, 9, 24, 12, 24, 24,
78, 12, 36, 0, 36, 12, 60, 15, 42, 24, 6, 15, 54, 0, 33, 30, 21, 30,
42, 0, 54, 0, 24, 9, 60, 9, 36, 24, 24, 6, 66, 12, 48, 18, 54, 0,
30, 0, 30, 39, 30, 18, 48, 6, 42, 12, 33, 24, 33, 12, 60, 0, 18, 6,
42, 24, 42, 24, 6, 12, 72, 6, 42, 30, 18, 9, 30, 0, 24, 15, 30, 18,
60, 12, 54, 15, 24, 0, 48, 24, 33, 12, 36, 0, 66, 6, 36, 18, 21, 30,
72, 3, 24, 9, 27, 30, 30, 18, 42, 0, 42, 0, 72, 6, 39, 42, 24, 18,
60, 3, 24, 18, 36, 18, 30, 0, 54, 6, 27, 33, 60, 12, 24, 24, 18, 18,
30, 12, 21, 33, 48, 0, 78, 12, 78, 12, 30, 12, 42, 12, 48, 0, 24, 12,
75, 18, 24, 0, 18, 0, 33, 24, 30, 21, 42, 15, 30, 12, 39, 30, 51, 12,
54, 0, 36, 12, 18, 12, 48, 24, 78, 18, 18, 6, 78, 6, 24, 30, 12, 0,
42, 0, 45, 18, 15, 27, 42, 0, 54, 18, 36, 18, 36, 6, 48, 0, 30, 12,
36, 21, 45, 6, 24, 7, 54, 0, 27, 42, 33, 24, 72, 0, 42, 0, 48, 24,
45, 18, 18, 15, 36, 15, 66, 6, 66, 30, 18, 0, 48, 0, 27, 39, 30, 18,
66, 27, 12, 12, 18, 24, 60, 6, 66, 0, 42, 0, 42, 6, 33, 21, 36, 12,
42, 6, 21, 36, 33, 21, 48, 0, 66, 12, 6, 18, 75, 24, 36, 12, 18, 0,
81, 12, 42, 30, 36, 0, 24, 0, 30, 30, 30, 6, 60, 9, 60, 6, 24, 30,
30, 6, 30, 0, 30, 12, 75, 18, 30, 24, 24, 15, 78, 0, 42, 24, 18, 30,
42, 0, 30, 12, 21, 12, 48, 9, 60, 21, 30, 12, 24, 24, 39, 21, 24, 0,
54, 3, 39, 30, 33, 24, 72, 12, 60, 0, 18, 24, 57, 12, 24, 0, 24, 3,
90, 9, 12, 21, 36, 12, 30, 18, 84, 24, 30, 9, 60, 0, 36, 18, 18, 24,
78, 18, 24, 18, 48, 6, 24, 0, 45, 30, 24, 0, 66, 3, 60, 36, 21, 42,
42, 6, 30, 6, 33, 12, 60, 21, 36, 0, 6, 6, 36, 15, 36, 30, 48, 21,
48, 0, 39, 36, 36, 6, 54, 0, 66, 3, 18, 18, 33, 24, 36, 18, 30, 9,
66, 6, 15, 36, 24, 0, 96, 6, 30, 12, 42, 6, 36, 6, 36, 9, 27, 36,
42, 12, 42, 0, 18, 6, 51, 12, 78, 18, 30, 9, 54, 12, 39, 24, 24, 33,
66, 0, 36, 9, 45, 33, 36, 12, 18, 27, 36, 0, 78, 12, 48, 24, 30, 0,
42, 9, 48, 21, 18, 9, 60, 12, 54, 6, 21, 24, 72, 3, 66, 0, 18, 18,
33, 12, 21, 36, 36, 6, 36, 6, 60, 36, 36, 18, 48, 0, 24, 0, 30, 24,
87, 24, 24, 27, 42, 6, 60, 18, 66, 6, 18, 0, 36, 6, 39, 36, 30, 18,
36, 9, 30, 0, 18, 18, 51, 12, 48, 0, 54, 0, 48, 18, 36, 30, 36, 30,
66, 3, 12, 18, 15, 39, 60, 0, 24, 12, 66, 6, 54, 12, 48, 6, 18, 7,
30, 24, 48, 18, 30, 0, 84, 0, 30, 48, 12, 15, 60, 9, 42, 18, 42, 18,
42, 18, 48, 0, 30, 9, 48, 21, 69, 36, 12, 12, 48, 0, 57, 18, 24, 24,
66, 0, 36, 6, 24, 21, 69, 6, 54, 12, 30, 18, 72, 18, 30, 30, 18, 0,
42, 0, 42, 42, 12, 18, 42, 6, 54, 9, 42, 12, 72, 18, 24, 0, 24, 3,
78, 0, 24, 24, 30, 15, 60, 6, 42, 30, 39, 21, 36, 0, 54, 12, 27, 24,
42, 24, 72, 21, 30, 0, 48, 18, 24, 30, 12, 0, 30, 3, 24, 15, 72, 33,
42, 6, 24, 24, 12, 24, 66, 12, 60, 0, 24, 6, 63, 12, 42, 18, 24, 18,
84, 6, 30, 24, 24, 6, 90, 0, 72, 6, 21, 24, 30, 18, 18, 30, 24, 6,
66, 18, 54, 18, 36, 0, 36, 12, 60, 27, 30, 18, 90, 18, 18, 0, 18, 24,
48, 24, 30, 0, 36, 6, 36, 18, 66, 36, 30, 3, 66, 3, 57, 48, 12, 18,
36, 0, 48, 6, 36, 21, 48, 0, 60, 12, 36, 12, 72, 0, 36, 30, 30, 0,
48, 0, 33, 30, 48, 9, 54, 9, 36, 24, 18, 30, 42, 18, 54, 0, 12, 0,
54, 12, 21, 24, 30, 21, 72, 0, 66, 24, 27, 18, 36, 0, 24, 0, 45, 24,
78, 0, 42, 21, 24, 12, 39, 30, 54, 30, 24, 0, 84, 15, 24, 24, 9, 30,
54, 9, 48, 6, 33, 18, 57, 18, 30, 0, 60, 3, 54, 27, 33, 30, 36, 24,
42, 0, 54, 18, 39, 24, 54, 0, 60, 18, 24, 15, 75, 12, 24, 12, 42, 0,
39, 12, 36, 36, 36, 0, 30, 3, 66, 42, 15, 24, 72, 12, 48, 12, 42, 12,
48, 15, 24, 0, 18, 18, 60, 6, 60, 18, 36, 9, 24, 6, 27, 36, 30, 24,
90, 0, 60, 3, 21, 18, 54, 24, 48, 18, 18, 12, 51, 24, 39, 18, 18, 0,
72, 12, 42, 21, 36, 24, 36, 6, 36, 0, 33, 18, 42, 0, 60, 0, 18, 6,
42, 21, 39, 39, 36, 13, 84, 6, 24, 18, 30, 24, 78, 0, 36, 3, 54, 39,
51, 18, 30, 21, 24, 3, 60, 12, 87, 42, 30, 0, 36, 6, 30, 15, 36, 12,
54, 18, 42, 12, 27, 24, 84, 15, 42, 0, 18, 9, 54, 18, 30, 30, 48, 12,
72, 0, 54, 42, 9, 12, 36, 0, 60, 0, 27, 21, 78, 18, 42, 30, 30, 6,
54, 6, 30, 18, 24, 0, 60, 12, 42, 36, 48, 24, 54, 6, 36, 15, 12, 48,
21, 12, 30, 0, 36, 0, 102, 6, 18, 12, 24, 9, 60, 12, 48, 24, 33, 30,
66, 0, 30, 12, 30, 15, 60, 12, 54, 36, 30, 0, 36, 6, 72, 18, 36, 0,
54, 0, 30, 36, 9, 15, 60, 0, 60, 15, 39, 12, 63, 18, 42, 0, 30, 18,
60, 21, 57, 30, 0, 18, 54, 3, 75, 30, 48, 24, 42, 0, 24, 12, 36, 42,
57, 9, 48, 9, 36, 6, 45, 12, 24, 48, 54, 0, 66, 0, 45, 33, 30, 18,
54, 18, 36, 0, 36, 6, 54, 30, 54, 0, 36, 0, 66, 12, 42, 21, 24, 18,
48, 6, 21, 48, 42, 12, 60, 0, 84, 12, 0, 12, 54, 24, 36, 18, 18, 12,
81, 18, 33, 18, 12, 0, 66, 3, 66, 6, 33, 48, 48, 6, 24, 24, 36, 18,
60, 6, 36, 0, 24, 6, 39, 21, 42, 18, 42, 12, 60, 0, 24, 30, 33, 36,
72, 0, 30, 0, 36, 36, 42, 12, 36, 15, 24, 15, 75, 30, 63, 27, 24, 0,
42, 6, 63, 30, 18, 12, 108, 9, 48, 12, 24, 12, 72, 18, 30, 0, 54, 6,
30, 9, 63, 27, 48, 15, 36, 6, 48, 36, 18, 12, 54, 0, 42, 9, 36, 36,
63, 18, 36, 24, 36, 0, 75, 6, 63, 24, 36, 0, 48, 6, 27, 39, 30, 18,
30, 9, 54, 18, 36, 18, 39, 21, 66, 0, 30, 0, 54, 18, 42, 36, 12, 24,
108, 0, 30, 24, 42, 12, 48, 0, 24, 0, 15, 9, 48, 18, 66, 24, 24, 12,
54, 12, 36, 21, 54, 0, 54, 18, 45, 42, 36, 24, 42, 3, 36, 0, 42, 48,
42, 12, 36, 0, 36, 1, 60, 18, 36, 18, 36, 15, 54, 9, 60, 30, 24, 21,
48, 0, 24, 18, 24, 18, 90, 6, 72, 15, 36, 9, 48, 6, 36, 42, 48, 0,
78, 3, 54, 27, 18, 36, 48, 15, 54, 12, 30, 24, 84, 12, 18, 0, 18, 12,
105, 12, 24, 30, 30, 18, 36, 0, 60, 30, 27, 12, 48, 0, 90, 6, 18, 18,
33, 21, 42, 24, 24, 12, 45, 24, 60, 36, 36, 0, 66, 6, 27, 15, 42, 24,
60, 12, 18, 9, 30, 18, 84, 12, 72, 0, 12, 6, 42, 21, 45, 12, 18, 9,
96, 12, 21, 30, 30, 24, 66, 0, 48, 12, 42, 18, 36, 18, 24, 24, 24, 0,
30, 12, 27, 42, 18, 0, 72, 0, 84, 27, 54, 15, 102, 12, 36, 6, 39, 36,
36, 15, 36, 0, 30, 15, 57, 12, 57, 42, 30, 9, 60, 6, 27, 42, 27, 30,
36, 0, 54, 6, 24, 21, 78, 12, 42, 18, 18, 12, 84, 18, 54, 18, 48, 0,
66, 12, 15, 36, 30, 18, 72, 9, 66, 0, 27, 18, 24, 6, 78, 0, 42, 6,
81, 27, 27, 36, 24, 24, 48, 0, 72, 18, 39, 30, 42, 0, 18, 18, 30, 24,
78, 6, 18, 18, 36, 0, 48, 30, 84, 6, 18, 0, 54, 0, 42, 36, 12, 30,
90, 12, 48, 18, 24, 18, 21, 18, 48, 0, 60, 0, 60, 6, 30, 42, 24, 18,
66, 0, 27, 36, 24, 18, 54, 0, 48, 6, 30, 18, 90, 15, 42, 9, 48, 18,
42, 6, 45, 24, 36, 0, 48, 0, 78, 39, 27, 12, 42, 27, 48, 6, 45, 18,
72, 36, 48, 0, 18, 9, 66, 9, 54, 33, 18, 18, 66, 12, 39, 36, 45, 12,
72, 0, 48, 12, 21, 39, 33, 18, 60, 18, 36, 0, 78, 18, 39, 36, 24, 0,
30, 0, 30, 30, 54, 21, 66, 6, 30, 21, 39, 18, 60, 15, 72, 0, 30, 18,
45, 12, 39, 18, 60, 6, 66, 15, 36, 30, 12, 18, 60, 0, 60, 0, 18, 33,
57, 18, 24, 24, 42, 6, 66, 12, 81, 42, 18, 0, 36, 6, 42, 18, 24, 24,
72, 0, 18, 0, 30, 30, 87, 18, 36, 0, 42, 3, 45, 12, 36, 42, 24, 25,
30, 6, 72, 24, 18, 18, 60, 0, 102, 12, 42, 12, 90, 12, 24, 27, 24, 12,
69, 24, 30, 18, 42, 0, 48, 0, 42, 45, 39, 15, 60, 18, 30, 12, 33, 24,
72, 18, 36, 0, 24, 12, 51, 24, 39, 36, 24, 6, 120, 0, 72, 24, 30, 30,
30, 0, 24, 12, 72, 18, 54, 3, 84, 30, 30, 21, 42, 24, 30, 18, 30, 0,
54, 0, 36, 30, 24, 30, 72, 9, 72, 6, 30, 24, 36, 24, 30, 0, 30, 0,
90, 12, 48, 27, 24, 6, 54, 12, 39, 36, 18, 18, 78, 0, 36, 12, 18, 39,
66, 6, 54, 18, 36, 0, 54, 18, 42, 12, 30, 0, 78, 0, 48, 45, 27, 36,
36, 9, 54, 15, 6, 12, 99, 15, 48, 0, 24, 3, 60, 12, 45, 36, 36, 30,
24, 12, 57, 30, 42, 18, 54, 0, 36, 6, 45, 24, 63, 30, 60, 12, 42, 6,
102, 18, 30, 33, 18, 0, 84, 12, 54, 24, 39, 12, 42, 0, 36, 0, 54, 24,
60, 12, 42, 0, 48, 6, 30, 9, 93, 24, 18, 21, 60, 6, 21, 36, 18, 54,
102, 0, 30, 18, 36, 21, 48, 12, 30, 27, 42, 3, 54, 12, 66, 36, 36, 0,
48, 9, 45, 33, 30, 9, 84, 18, 30, 12, 33, 36, 51, 12, 54, 0, 36, 18,
42, 12, 30, 36, 24, 9, 72, 0, 48, 30, 36, 6, 78, 0, 42, 0, 18, 24,
63, 21, 36, 18, 24, 15, 66, 0, 42, 27, 54, 0, 30, 9, 51, 45, 45, 24,
48, 12, 72, 12, 33, 24, 39, 30, 66, 0, 18, 6, 69, 12, 36, 24, 36, 18,
90, 6, 60, 24, 36, 27, 36, 0, 60, 18, 33, 21, 84, 12, 36, 30, 18, 0,
33, 24, 51, 30, 24, 0, 84, 0, 57, 33, 36, 21, 84, 12, 30, 12, 33, 36,
63, 18, 24, 0, 30, 6, 90, 21, 66, 30, 30, 24, 36, 0, 54, 12, 51, 18,
78, 0, 36, 0, 18, 18, 54, 21, 48, 12, 66, 18, 21, 18, 33, 21, 42, 0,
66, 6, 48, 54, 21, 30, 66, 12, 66, 0, 24, 24, 63, 24, 36, 0, 42, 3,
60, 18, 30, 6, 36, 9, 54, 6, 72, 48, 36, 15, 54, 0, 30, 27, 12, 18,
60, 12, 66, 15, 48, 10, 84, 12, 39, 42, 12, 0, 66, 6, 24, 18, 21, 36,
54, 24, 24, 12, 51, 18, 66, 12, 90, 0, 18, 6, 87, 15, 75, 24, 30, 15,
60, 0, 24, 42, 24, 24, 48, 0, 84, 6, 51, 39, 60, 12, 18, 30, 36, 12,
60, 12, 60, 48, 36, 0, 54, 6, 42, 12, 6, 18, 78, 6, 48, 12, 12, 36,
84, 0, 48, 0, 54, 3, 48, 18, 45, 51, 54, 6, 72, 6, 51, 30, 45, 30,
48, 0, 36, 6, 36, 15, 78, 24, 42, 24, 24, 0, 90, 18, 36, 24, 24, 0,
36, 0, 36, 30, 30, 30, 66, 6, 78, 21, 30, 12, 21, 15, 60, 0, 36, 12,
66, 21, 36, 24, 30, 18, 60, 9, 54, 48, 24, 18, 48, 0, 30, 6, 42, 18,
81, 18, 54, 27, 24, 12, 30, 18, 84, 30, 24, 0, 102, 9, 42, 42, 36, 24,
90, 3, 30, 0, 60, 30, 42, 18, 24, 0, 18, 0, 78, 12, 42, 27, 42, 18,
66, 18, 45, 18, 42, 9, 84, 0, 54, 6, 15, 54, 63, 18, 54, 24, 24, 9,
57, 24, 45, 54, 36, 0, 60, 0, 66, 27, 33, 18, 30, 9, 60, 24, 30, 12,
54, 21, 24, 0, 12, 18, 108, 15, 66, 12, 30, 27, 66, 0, 36, 30, 36, 24,
66, 0, 60, 0, 9, 24, 54, 12, 90, 15, 42, 0, 51, 30, 18, 30, 48, 0,
84, 9, 48, 21, 54, 30, 24, 18, 36, 12, 45, 18, 96, 6, 30, 0, 30, 9,
30, 24, 42, 24, 24, 15, 66, 6, 69, 36, 15, 15, 84, 0, 36, 15, 48, 27,
45, 18, 42, 30, 36, 0, 66, 6, 72, 30, 48, 0, 42, 3, 51, 39, 30, 33,
78, 12, 24, 18, 30, 18, 105, 21, 72, 0, 42, 12, 39, 18, 27, 42, 24, 6,
66, 3, 60, 42, 30, 30, 60, 0, 54, 6, 54, 24, 57, 6, 54, 6, 24, 24,
54, 12, 57, 27, 42, 0, 48, 6, 36, 27, 57, 12, 84, 12, 60, 0, 12, 30,
54, 24, 48, 0, 18, 3, 105, 36, 48, 42, 24, 18, 48, 6, 30, 36, 45, 42,
42, 0, 54, 9, 36, 12, 48, 12, 54, 30, 30, 6, 48, 6, 51, 18, 36, 0,
102, 6, 18, 30, 33, 24, 48, 18, 60, 12, 60, 30, 45, 12, 36, 0, 54, 12,
60, 6, 48, 54, 12, 13, 60, 0, 72, 18, 24, 6, 90, 0, 48, 12, 15, 42,
96, 18, 36, 18, 36, 6, 78, 24, 48, 18, 30, 0, 48, 18, 78, 42, 24, 30,
60, 6, 60, 12, 18, 12, 42, 30, 42, 0, 24, 0, 81, 9, 54, 18, 60, 33,
48, 0, 27, 54, 51, 27, 90, 0, 60, 18, 24, 18, 54, 24, 36, 12, 42, 0,
87, 24, 33, 18, 24, 0, 96, 0, 87, 36, 30, 15, 42, 12, 36, 24, 24, 36,
42, 21, 48, 0, 30, 6, 42, 18, 48, 24, 24, 18, 84, 3, 36, 42, 42, 36,
72, 0, 54, 6, 30, 15, 60, 6, 78, 30, 24, 6, 72, 6, 66, 45, 24, 0,
42, 21, 36, 30, 36, 18, 48, 12, 30, 0, 39, 24, 102, 18, 36, 0, 12, 6,
54, 6, 30, 33, 66, 21, 90, 3, 78, 36, 9, 18, 36, 0, 84, 0, 30, 30,
93, 24, 30, 24, 30, 15, 63, 12, 48, 30, 54, 0, 48, 0, 54, 42, 42, 30,
78, 0, 36, 24, 39, 24, 60, 12, 78, 0, 60, 6, 51, 30, 36, 36, 30, 18,
60, 0, 30, 30, 51, 24, 60, 0, 42, 3, 24, 9, 54, 21, 24, 33, 30, 24,
66, 24, 69, 18, 30, 0, 102, 15, 54, 24, 15, 30, 120, 6, 30, 3, 51, 24,
54, 12, 30, 0, 36, 6, 36, 12, 90, 42, 12, 12, 60, 12, 60, 24, 42, 12,
90, 0, 24, 12, 42, 30, 30, 6, 78, 21, 42, 0, 54, 24, 27, 54, 24, 0,
66, 6, 45, 30, 12, 30, 42, 12, 84, 15, 36, 18, 84, 24, 36, 0, 30, 18,
72, 18, 60, 24, 48, 12, 54, 6, 36, 54, 42, 12, 42, 0, 60, 0, 51, 48,
54, 9, 36, 27, 24, 6, 84, 18, 48, 30, 42, 0, 78, 0, 48, 27, 27, 48,
42, 18, 36, 0, 39, 18, 99, 24, 102, 0, 18, 0, 48, 18, 72, 15, 36, 12,
84, 12, 24, 12, 30, 39, 84, 0, 36, 12, 39, 39, 63, 24, 42, 24, 66, 6,
72, 18, 18, 24, 30, 0, 60, 6, 48, 42, 36, 15, 78, 6, 48, 30, 12, 36,
54, 12, 36, 0, 42, 6, 45, 6, 69, 24, 72, 21, 48, 0, 57, 48, 12, 24,
48, 0, 48, 3, 48, 15, 78, 24, 60, 18, 12, 12, 111, 24, 54, 24, 24, 0,
48, 6, 36, 33, 42, 6, 54, 9, 72, 18, 27, 30, 30, 12, 54, 0, 66, 4,
78, 21, 24, 54, 18, 24, 54, 6, 60, 24, 54, 21, 78, 0, 36, 18, 54, 30,
66, 18, 48, 30, 24, 0, 42, 12, 99, 36, 30, 0, 90, 6, 18, 30, 30, 24,
78, 6, 66, 9, 24, 42, 78, 30, 42, 0, 18, 12, 102, 6, 33, 24, 18, 12,
66, 9, 54, 24, 24, 36, 84, 0, 60, 6, 39, 15, 78, 12, 42, 21, 42, 18,
42, 18, 18, 42, 24, 0, 48, 3, 105, 51, 42, 30, 42, 18, 72, 0, 24, 24,
102, 6, 36, 0, 36, 9, 99, 12, 48, 21, 48, 18, 42, 6, 36, 42, 18, 12,
78, 0, 48, 30, 30, 18, 36, 30, 42, 9, 42, 6, 60, 12, 39, 30, 24, 0,
78, 0, 48, 30, 39, 27, 102, 24, 30, 12, 51, 12, 66, 9, 48, 0, 30, 18,
45, 39, 87, 30, 36, 9, 72, 0, 60, 24, 30, 36, 54, 0, 48, 0, 45, 36,
45, 18, 42, 27, 60, 9, 66, 12, 78, 42, 18, 0, 60, 6, 60, 33, 36, 24,
96, 12, 18, 12, 12, 36, 72, 0, 78, 0, 36, 6, 60, 24, 27, 51, 42, 24,
84, 12, 57, 48, 30, 24, 42, 0, 60, 12, 24, 18, 96, 12, 30, 30, 30, 0,
93, 18, 48, 18, 60, 0, 48, 6, 54, 36, 30, 12, 42, 9, 60, 18, 12, 24,
69, 6, 60, 0, 54, 6, 33, 15, 60, 36, 30, 18, 90, 3, 72, 24, 54, 54,
42, 0, 18, 9, 60, 30, 84, 18, 48, 24, 12, 6, 66, 36, 24, 27, 24, 0,
42, 12, 39, 42, 27, 18, 108, 9, 78, 0, 48, 12, 54, 30, 30, 0, 36, 0,
48, 12, 75, 39, 30, 6, 42, 9, 66, 30, 33, 18, 96, 0, 48, 18, 39, 36,
102, 12, 54, 18, 24, 9, 45, 24, 72, 30, 36, 0, 78, 6, 63, 36, 36, 21,
60, 9, 36, 12, 54, 24, 78, 27, 42, 0, 42, 18, 60, 9, 24, 24, 54, 39,
84, 0, 27, 36, 39, 12, 84, 0, 66, 0, 21, 30, 30, 42, 66, 18, 18, 18,
78, 12, 48, 42, 36, 0, 90, 6, 48, 33, 39, 24, 48, 15, 54, 15, 54, 24,
48, 18, 60, 0, 24, 0, 48, 24, 78, 24, 36, 9, 90, 12, 42, 24, 30, 45,
54, 0, 66, 12, 24, 12, 60, 6, 48, 33, 48, 0, 60, 6, 51, 54, 12, 0,
30, 0, 69, 21, 42, 15, 72, 15, 48, 21, 33, 36, 96, 6, 30, 0, 54, 6,
87, 30, 42, 30, 36, 13, 42, 6, 84, 48, 18, 18, 72, 0, 54, 12, 30, 30,
75, 24, 36, 24, 42, 18, 78, 12, 36, 30, 72, 0, 48, 6, 33, 36, 57, 36,
66, 6, 54, 0, 27, 36, 66, 12, 90, 0, 24, 3, 96, 24, 27, 24, 18, 24,
108, 12, 42, 48, 24, 18, 30, 0, 54, 18, 48, 12, 75, 18, 90, 21, 36, 12,
72, 12, 45, 24, 24, 0, 114, 0, 27, 30, 39, 33, 48, 12, 54, 12, 18, 42,
45, 27, 48, 0, 48, 6, 90, 9, 60, 42, 36, 12, 48, 0, 36, 42, 42, 18,
78, 0, 30, 6, 24, 33, 78, 9, 84, 30, 18, 15, 63, 18, 51, 30, 48, 0,
72, 6, 36, 51, 24, 30, 48, 21, 96, 6, 24, 6, 93, 12, 48, 0, 18, 6,
69, 18, 36, 18, 24, 18, 24, 6, 54, 36, 51, 33, 96, 0, 36, 15, 27, 30,
54, 30, 42, 12, 36, 0, 117, 36, 54, 36, 24, 0, 96, 3, 72, 36, 57, 27,
54, 6, 54, 21, 36, 12, 66, 33, 60, 0, 30, 24, 24, 15, 63, 30, 42, 24,
78, 9, 39, 30, 24, 24, 138, 0, 42, 0, 54, 24, 57, 12, 30, 24, 42, 18,
54, 6, 60, 33, 24, 0, 72, 6, 84, 24, 42, 6, 66, 15, 36, 0, 42, 48,
51, 18, 66, 0, 60, 3, 60, 12, 60, 57, 42, 9, 72, 12, 60, 42, 27, 24,
60, 0, 42, 18, 24, 30, 48, 30, 36, 18, 30, 9, 78, 12, 51, 18, 30, 0,
60, 0, 12, 57, 51, 18, 78, 6, 102, 12, 30, 24, 48, 27, 36, 0, 30, 12,
126, 6, 27, 36, 30, 18, 66, 0, 60, 30, 48, 36, 48, 0, 24, 6, 39, 24,
96, 12, 90, 33, 36, 6, 39, 6, 90, 27, 36, 0, 60, 12, 45, 42, 30, 30,
72, 12, 36, 9, 39, 36, 69, 24, 48, 0, 36, 6, 66, 15, 72, 39, 36, 27,
54, 18, 57, 30, 42, 12, 60, 0, 84, 24, 36, 27, 72, 12, 48, 21, 60, 0,
51, 30, 27, 30, 90, 0, 78, 0, 42, 57, 12, 30, 48, 18, 42, 6, 48, 24,
90, 15, 42, 0, 12, 15, 84, 24, 72, 18, 48, 21, 66, 3, 54, 42, 30, 24,
48, 0, 36, 18, 27, 12, 42, 9, 108, 18, 36, 12, 96, 24, 21, 30, 24, 0,
96, 9, 54, 18, 75, 30, 54, 18, 36, 0, 39, 18, 84, 18, 42, 0, 24, 6,
54, 18, 57, 42, 24, 9, 84, 18, 48, 42, 27, 30, 78, 0, 60, 0, 30, 48,
36, 6, 30, 36, 6, 10, 78, 12, 51, 48, 48, 0, 90, 0, 75, 9, 42, 24,
48, 15, 72, 12, 33, 42, 108, 12, 54, 0, 54, 18, 51, 42, 36, 48, 48, 12,
72, 0, 42, 18, 45, 30, 66, 0, 78, 3, 36, 15, 78, 30, 30, 30, 30, 15,
102, 12, 54, 18, 30, 0, 36, 6, 81, 48, 12, 24, 108, 6, 78, 18, 24, 36,
33, 18, 30, 0, 30, 0, 108, 21, 54, 42, 18, 18, 90, 6, 30, 48, 69, 36,
48, 0, 24, 15, 24, 15, 84, 24, 114, 6, 30, 0, 48, 6, 60, 42, 24, 0,
102, 12, 42, 42, 27, 21, 78, 9, 42, 24, 51, 24, 42, 12, 48, 0, 60, 12,
66, 6, 42, 24, 30, 24, 42, 0, 78, 24, 54, 12, 66, 0, 30, 6, 24, 51,
99, 18, 60, 24, 42, 18, 54, 6, 45, 60, 36, 0, 54, 6, 39, 39, 39, 30,
66, 18, 72, 0, 51, 24, 102, 12, 54, 0, 24, 0, 102, 12, 48, 24, 42, 36,
60, 0, 12, 48, 18, 12, 54, 0, 84, 18, 39, 9, 84, 30, 66, 18, 48, 15,
72, 48, 39, 42, 48, 0, 60, 0, 84, 30, 45, 33, 54, 6, 54, 30, 33, 30,
90, 6, 54, 0, 24, 6, 72, 27, 78, 12, 24, 15, 66, 0, 54, 36, 21, 42,
114, 0, 60, 3, 30, 33, 54, 27, 30, 33, 60, 6, 54, 12, 48, 33, 36, 0,
42, 12, 45, 39, 24, 36, 96, 18, 24, 12, 33, 18, 99, 18, 66, 0, 36, 0,
51, 24, 30, 30, 36, 15, 84, 6, 102, 48, 48, 18, 60, 0, 72, 12, 36, 42,
60, 12, 24, 21, 30, 0, 54, 18, 60, 18, 42, 0, 66, 6, 24, 24, 54, 15,
78, 12, 42, 27, 27, 30, 51, 27, 78, 0, 48, 6, 120, 27, 48, 42, 24, 12,
54, 6, 54, 24, 48, 36, 66, 0, 78, 9, 57, 21, 48, 18, 54, 33, 24, 30,
84, 18, 45, 33, 30, 0, 126, 9, 36, 30, 27, 30, 66, 18, 54, 0, 36, 42,
48, 6, 42, 0, 54, 6, 57, 12, 84, 54, 48, 6, 60, 6, 63, 18, 42, 36,
78, 0, 24, 24, 33, 24, 105, 24, 66, 27, 48, 0, 48, 30, 60, 30, 54, 0,
42, 3, 75, 48, 24, 12, 66, 12, 96, 6, 30, 12, 87, 21, 36, 0, 30, 24,
69, 12, 57, 30, 48, 24, 54, 0, 42, 54, 24, 24, 72, 0, 60, 0, 48, 24,
69, 24, 42, 18, 36, 12, 66, 24, 36, 42, 18, 0, 78, 9, 48, 36, 42, 42,
36, 12, 36, 21, 78, 18, 48, 12, 102, 0, 18, 12, 54, 24, 45, 27, 42, 13,
108, 12, 39, 24, 42, 27, 102, 0, 60, 6, 39, 24, 54, 12, 54, 24, 24, 0,
114, 24, 63, 48, 30, 0, 48, 6, 69, 36, 18, 12, 72, 6, 48, 18, 33, 54,
117, 12, 42, 0, 66, 12, 48, 6, 54, 36, 42, 21, 102, 6, 48, 54, 33, 30,
48, 0, 72, 0, 30, 24, 75, 24, 84, 30, 30, 0, 72, 18, 30, 42, 54, 0,
60, 12, 36, 45, 42, 12, 96, 6, 66, 0, 12, 36, 78, 36, 42, 0, 36, 0,
78, 24, 48, 24, 18, 30, 90, 15, 96, 18, 27, 21, 54, 0, 24, 21, 48, 27,
84, 18, 48, 42, 36, 6, 66, 12, 108, 12, 42, 0, 48, 9, 27, 60, 21, 36,
84, 6, 36, 18, 42, 18, 54, 18, 60, 0, 60, 15, 72, 9, 99, 42, 12, 12,
60, 0, 57, 42, 18, 18, 78, 0, 42, 6, 36, 36, 63, 9, 42, 15, 30, 18,
78, 6, 24, 48, 42, 0, 102, 12, 75, 45, 42, 30, 84, 24, 66, 9, 24, 30,
90, 24, 42, 0, 24, 3, 84, 21, 84, 33, 66, 24, 36, 6, 36, 48, 51, 18,
72, 0, 66, 18, 54, 30, 24, 18, 48, 18, 30, 0, 102, 12, 45, 36, 24, 0,
102, 3, 42, 15, 42, 54, 54, 21, 66, 24, 66, 30, 102, 3, 66, 0, 48, 12,
24, 30, 45, 36, 54, 6, 78, 9, 48, 24, 39, 36, 96, 0, 66, 6, 27, 27,
60, 30, 18, 30, 48, 12, 90, 24, 60, 36, 6, 0, 42, 12, 78, 36, 36, 24,
114, 6, 60, 0, 18, 6, 69, 18, 84, 0, 36, 6, 48, 6, 39, 24, 42, 24,
54, 6, 72, 48, 36, 42, 60, 0, 48, 0, 36, 18, 138, 24, 30, 30, 42, 18,
75, 18, 48, 18, 24, 0, 78, 0, 78, 57, 60, 9, 48, 9, 36, 30, 30, 42,
42, 39, 84, 0, 24, 12, 87, 27, 30, 42, 24, 24, 90, 0, 36, 24, 60, 36,
84, 0, 42, 0, 30, 21, 87, 12, 72, 24, 42, 12, 60, 30, 72, 21, 60, 0,
96, 12, 30, 42, 39, 18, 66, 12, 84, 12, 63, 42, 42, 24, 42, 0, 18, 6,
78, 15, 75, 45, 54, 12, 54, 6, 84, 30, 30, 18, 54, 0, 42, 24, 39, 27,
96, 18, 42, 21, 48, 0, 54, 18, 33, 36, 66, 0, 84, 0, 75, 48, 30, 42,
54, 12, 54, 15, 42, 30, 96, 18, 42, 0, 18, 6, 123, 15, 48, 24, 48, 39,
42, 6, 21, 54, 45, 12, 60, 0, 90, 12, 30, 36, 45, 18, 72, 21, 78, 12,
30, 12, 60, 30, 18, 0, 78, 6, 60, 36, 33, 18, 60, 12, 30, 0, 60, 18,
90, 30, 54, 0, 36, 1, 78, 27, 84, 30, 18, 15, 102, 9, 27, 30, 24, 57,
90, 0, 42, 9, 48, 42, 42, 12, 72, 27, 48, 9, 108, 18, 48, 48, 18, 0,
84, 6, 66, 24, 48, 21, 114, 6, 78, 24, 30, 30, 42, 18, 60, 0, 18, 12,
63, 9, 51, 66, 48, 15, 54, 0, 66, 60, 36, 18, 48, 0, 66, 6, 36, 30,
96, 9, 36, 30, 30, 24, 93, 24, 72, 24, 66, 0, 60, 24, 48, 30, 24, 30,
72, 6, 60, 12, 30, 12, 93, 18, 72, 0, 30, 0, 81, 30, 36, 48, 36, 30,
90, 6, 54, 24, 57, 24, 36, 0, 54, 18, 36, 24, 78, 18, 72, 33, 12, 0,
51, 30, 48, 24, 42, 0, 90, 3, 78, 30, 30, 27, 138, 6, 30, 18, 36, 24,
75, 24, 12, 0, 54, 12, 42, 18, 84, 36, 30, 18, 66, 6, 45, 36, 36, 48,
114, 0, 24, 6, 30, 21, 108, 15, 48, 18, 36, 18, 57, 24, 63, 42, 54, 0,
78, 6, 81, 36, 18, 24, 42, 18, 120, 0, 24, 24, 66, 12, 54, 0, 48, 12,
66, 18, 42, 36, 48, 18, 72, 6, 48, 48, 33, 6, 102, 0, 54, 24, 39, 54,
60, 12, 90, 18, 36, 3, 111, 24, 51, 48, 42, 0, 90, 0, 45, 36, 54, 48,
54, 24, 18, 18, 51, 18, 72, 0, 54, 0, 18, 12, 54, 36, 57, 18, 42, 18,
120, 0, 63, 42, 27, 36, 48, 0, 54, 6, 39, 30, 81, 18, 72, 33, 54, 9,
72, 12, 54, 54, 24, 0, 54, 15, 75, 24, 60, 12, 78, 6, 30, 12, 39, 54,
72, 6, 54, 0, 72, 6, 78, 12, 54, 39, 30, 15, 48, 6, 57, 48, 18, 24,
90, 0, 90, 18, 42, 24, 39, 42, 24, 30, 42, 0, 84, 6, 66, 30, 30, 0,
30, 0, 27, 42, 39, 33, 90, 24, 84, 18, 51, 36, 69, 24, 54, 0, 42, 18,
87, 33, 51, 18, 42, 9, 126, 9, 84, 36, 66, 18, 54, 0, 36, 0, 66, 12,
48, 15, 54, 30, 18, 18, 60, 18, 96, 54, 42, 0, 102, 0, 27, 36, 30, 36,
108, 15, 54, 0, 24, 36, 60, 24, 66, 0, 30, 0, 54, 15, 75, 48, 36, 18,
48, 24, 36, 36, 54, 15, 108, 0, 84, 18};
#pragma region main
/**
* main
* 共通処理
* @return signed
*/
signed main() {
long int n;
scanf("%dl", &n);
for (int i = 1; i <= n; ++i) {
printf("%dl\n", AA[i]);
}
return 0;
}
#pragma endregion
| #pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma region Macros
/***
* @author uesugi
* @file AtCoder用テンプレート
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
#define _OVERLOAD3(_1, _2, _3, name, ...) name
#define _REP(i, n) REPI(i, 0, n)
#define REPI(i, a, b) for (int i = int(a), i##_len = (b); i < i##_len; ++i)
#define REP(...) \
_OVERLOAD3(__VA_ARGS__, REPI, _REP, ) \
(__VA_ARGS__)
#define ALL(x) (x).begin(), (x).end()
#define SIZE(x) ((ll)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
/**
* 最大値更新
* @param T &a 更新対象
* @param const T &b 判定対象
* @return 更新有無
*/
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
/**
* 最小値更新
* @param T &a 更新対象
* @param const T &b 判定対象
* @return 更新有無
*/
template <class T> inline bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
/**
* overload
* 入力を配列に格納
* 配列の長さ分入力を格納
* @param std::istream &is 入力ストリーム
* @param std::vector<T> &vec 格納先配列
* @return std::istream
*/
template <typename T>
inline std::istream &operator>>(std::istream &is, std::vector<T> &vec) {
for (T &element : vec) {
is >> element;
}
return is;
}
template <typename T1, typename T2>
inline std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
is >> p.first >> p.second;
return is;
}
/**
* overload
* コンテナの要素を出力する
* @param std::basic_ostream<Ch, Tr> &os 出力ストリーム
* @param Container const &x 出力対象コンテナ
* @return std::basic_ostream<Ch, Tr>
*/
template <class Ch, class Tr, class Container>
inline std::basic_ostream<Ch, Tr> &operator<<(std::basic_ostream<Ch, Tr> &os,
Container const &x) {
bool first = true;
for (auto &y : x) {
if (first) {
first = false;
} else {
os << " ";
}
os << y;
}
return os;
}
// debug methods
// usage: debug(x,y);
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define DEBUG_1(x1) cout << #x1 << ": " << x1 << "\n"
#define DEBUG_2(x1, x2) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << "\n"
#define DEBUG_3(x1, x2, x3) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << "\n"
#define DEBUG_4(x1, x2, x3, x4) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << ", " #x4 << ": " << x4 << "\n"
#define DEBUG_5(x1, x2, x3, x4, x5) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << ", " #x3 << ": " \
<< x3 << ", " #x4 << ": " << x4 << ", " #x5 << ": " << x5 << "\n"
#ifdef _DEBUG
/**
* デバッグ用出力メソッド
* 変数名及び値を出力
* -D_DEBUG オプション付きビルド時のみ有効
* @param 可変長引数
*/
#define DEBUG(...) \
CHOOSE((__VA_ARGS__, DEBUG_5, DEBUG_4, DEBUG_3, DEBUG_2, DEBUG_1, ~)) \
(__VA_ARGS__)
#define DEBUG_TIME() cout << "debug_time: " << clock() - START_TIME << "\n"
clock_t START_TIME = clock();
#else
#define DEBUG(...)
#define DEBUG_TIME()
#endif
#pragma endregion
const long int AA[] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3,
0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0,
0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1,
6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3,
6, 0, 0, 0, 6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 0, 3, 6,
0, 0, 0, 0, 6, 1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3,
6, 0, 0, 0, 3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0,
0, 0, 3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0,
6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0, 6, 6,
12, 0, 0, 6, 0, 0, 6, 0, 12, 3, 6, 0, 6, 3, 9, 6, 3, 6,
6, 0, 6, 0, 6, 0, 15, 6, 0, 0, 6, 0, 3, 3, 12, 0, 12, 6,
6, 0, 3, 6, 6, 3, 12, 0, 6, 0, 9, 6, 0, 0, 6, 3, 12, 1,
6, 6, 6, 6, 0, 0, 18, 0, 12, 0, 3, 6, 12, 0, 0, 6, 3, 6,
12, 0, 12, 0, 0, 0, 9, 3, 9, 6, 12, 3, 12, 0, 3, 6, 6, 0,
12, 0, 12, 0, 9, 9, 0, 0, 6, 3, 6, 3, 12, 6, 9, 3, 6, 0,
12, 3, 6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6, 0, 12, 3,
6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0, 0, 6,
15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 3, 3,
18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0, 12, 0, 9, 6, 0, 3,
12, 3, 6, 6, 12, 6, 6, 0, 0, 0, 15, 3, 18, 3, 18, 3, 12, 6,
3, 6, 9, 0, 12, 0, 12, 0, 18, 12, 0, 0, 12, 3, 6, 0, 6, 6,
9, 6, 0, 0, 18, 1, 18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6,
18, 0, 0, 6, 0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0,
12, 0, 3, 6, 12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3,
27, 6, 6, 6, 6, 3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0, 9, 9,
15, 3, 12, 6, 6, 3, 9, 6, 12, 12, 18, 0, 18, 0, 6, 6, 21, 6,
0, 0, 6, 3, 15, 6, 12, 6, 18, 0, 0, 0, 12, 6, 6, 3, 6, 4,
18, 6, 12, 6, 3, 9, 30, 0, 18, 0, 6, 6, 12, 6, 6, 9, 12, 0,
18, 6, 18, 0, 6, 0, 12, 0, 6, 12, 6, 3, 18, 0, 6, 6, 6, 6,
15, 3, 24, 0, 6, 3, 18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6,
0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0,
12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 12, 0,
21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0, 12, 6,
24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3, 12, 6, 6, 12,
24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21, 12, 0, 6,
18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3, 18, 6,
21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12, 12,
18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12,
24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0,
12, 3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6,
0, 6, 9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0, 9, 12,
21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0,
18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6,
30, 3, 6, 12, 6, 12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6,
24, 0, 12, 6, 12, 0, 18, 0, 18, 15, 18, 3, 18, 6, 12, 6, 6, 12,
3, 6, 6, 0, 12, 3, 39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6,
18, 0, 12, 0, 9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0,
18, 0, 9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1,
18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6, 12, 15,
24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0, 12, 6, 12, 12,
18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6, 30, 9, 6, 12, 24, 12,
12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18, 3, 18, 3, 12, 6,
24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9, 12, 0, 3, 12,
36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9,
24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0,
6, 0, 27, 12, 18, 3, 30, 3, 18, 6, 0, 12, 15, 6, 18, 0, 24, 0,
9, 6, 9, 12, 18, 7, 24, 0, 24, 12, 15, 12, 24, 0, 24, 0, 6, 9,
30, 9, 6, 6, 0, 9, 33, 12, 36, 0, 12, 0, 18, 0, 6, 21, 12, 6,
36, 6, 0, 3, 18, 6, 12, 6, 24, 0, 12, 3, 24, 6, 9, 12, 6, 6,
30, 6, 18, 12, 9, 9, 12, 0, 30, 3, 18, 3, 27, 6, 30, 12, 12, 0,
24, 0, 27, 12, 6, 0, 24, 3, 18, 18, 9, 6, 18, 0, 12, 3, 33, 18,
12, 9, 6, 0, 12, 6, 30, 0, 24, 12, 12, 0, 30, 6, 6, 6, 0, 6,
24, 0, 12, 0, 18, 15, 33, 6, 30, 15, 18, 0, 9, 12, 24, 9, 12, 0,
18, 6, 27, 18, 15, 6, 18, 3, 24, 0, 6, 6, 36, 12, 18, 0, 12, 3,
30, 3, 12, 6, 12, 15, 6, 0, 18, 12, 15, 9, 30, 0, 18, 6, 12, 12,
18, 6, 6, 3, 24, 1, 27, 12, 18, 6, 18, 0, 24, 0, 18, 15, 15, 21,
30, 6, 12, 12, 18, 0, 30, 6, 24, 0, 6, 0, 18, 6, 36, 12, 6, 6,
36, 0, 6, 12, 12, 12, 24, 0, 30, 0, 9, 6, 18, 0, 18, 12, 12, 6,
24, 6, 9, 15, 12, 0, 12, 6, 30, 9, 18, 0, 42, 3, 18, 6, 12, 18,
33, 12, 12, 0, 18, 0, 21, 12, 12, 12, 24, 6, 30, 0, 27, 18, 6, 12,
6, 0, 24, 0, 18, 15, 30, 0, 18, 12, 6, 0, 21, 6, 21, 12, 24, 0,
30, 0, 6, 6, 6, 12, 24, 0, 30, 12, 9, 12, 21, 3, 24, 0, 12, 3,
21, 18, 9, 18, 18, 6, 30, 3, 42, 6, 21, 6, 30, 0, 6, 3, 24, 9,
36, 6, 6, 9, 12, 6, 18, 12, 33, 9, 12, 0, 24, 9, 9, 6, 3, 18,
36, 6, 18, 0, 24, 6, 6, 6, 18, 0, 12, 0, 30, 3, 39, 12, 12, 7,
18, 0, 15, 18, 18, 9, 36, 0, 24, 6, 6, 18, 30, 0, 18, 9, 18, 3,
24, 6, 21, 12, 24, 0, 30, 3, 33, 24, 12, 6, 18, 6, 6, 6, 18, 6,
18, 12, 18, 0, 24, 6, 36, 3, 18, 6, 0, 12, 30, 0, 9, 24, 18, 0,
24, 0, 18, 0, 0, 12, 30, 15, 30, 6, 18, 3, 30, 0, 24, 18, 12, 0,
36, 3, 24, 12, 15, 18, 18, 6, 24, 3, 24, 12, 18, 12, 24, 0, 0, 6,
39, 6, 24, 3, 18, 3, 42, 6, 12, 12, 15, 9, 30, 0, 12, 0, 18, 6,
18, 12, 24, 15, 12, 0, 12, 12, 30, 12, 12, 0, 18, 0, 15, 15, 18, 18,
30, 3, 24, 12, 9, 6, 48, 0, 18, 0, 30, 0, 21, 6, 12, 12, 24, 12,
18, 3, 48, 24, 6, 6, 18, 0, 36, 0, 12, 15, 27, 6, 12, 12, 18, 6,
27, 6, 12, 9, 18, 0, 24, 6, 18, 18, 21, 0, 36, 0, 12, 0, 18, 12,
21, 18, 24, 0, 12, 1, 18, 9, 21, 18, 6, 9, 42, 3, 36, 12, 12, 12,
30, 0, 12, 6, 21, 12, 36, 6, 24, 9, 12, 6, 12, 12, 24, 12, 18, 0,
42, 0, 15, 6, 15, 15, 42, 6, 30, 6, 12, 12, 18, 12, 18, 0, 6, 6,
36, 0, 30, 18, 6, 0, 6, 0, 30, 18, 18, 0, 42, 0, 18, 6, 15, 18,
24, 0, 12, 6, 36, 9, 33, 12, 12, 12, 18, 0, 36, 0, 21, 21, 15, 18,
18, 15, 18, 0, 18, 6, 42, 6, 24, 0, 18, 3, 42, 6, 18, 12, 12, 12,
18, 0, 15, 12, 18, 12, 36, 0, 30, 12, 3, 21, 18, 0, 30, 6, 24, 0,
27, 12, 18, 12, 6, 0, 12, 0, 36, 15, 15, 3, 36, 12, 18, 6, 30, 6,
33, 12, 12, 0, 12, 6, 24, 6, 54, 18, 12, 3, 36, 9, 9, 12, 12, 18,
36, 0, 6, 0, 21, 15, 27, 9, 24, 12, 30, 6, 24, 6, 27, 18, 12, 0,
30, 0, 21, 12, 18, 6, 30, 0, 18, 0, 21, 18, 21, 6, 30, 0, 24, 3,
6, 6, 15, 27, 12, 10, 42, 6, 36, 12, 12, 6, 24, 0, 24, 6, 12, 12,
48, 6, 18, 12, 0, 3, 51, 6, 30, 6, 24, 0, 24, 0, 30, 21, 15, 12,
24, 9, 18, 6, 18, 12, 30, 9, 24, 0, 18, 0, 27, 18, 9, 6, 18, 9,
54, 0, 18, 24, 21, 18, 12, 0, 24, 0, 12, 0, 30, 9, 30, 12, 6, 9,
24, 6, 15, 15, 18, 0, 30, 3, 33, 18, 21, 12, 42, 3, 30, 6, 6, 24,
27, 6, 12, 0, 24, 3, 42, 6, 42, 9, 12, 6, 18, 6, 24, 12, 12, 12,
54, 0, 6, 12, 18, 6, 18, 18, 30, 12, 30, 0, 18, 0, 27, 18, 24, 0,
18, 0, 15, 24, 21, 6, 24, 3, 36, 6, 6, 6, 45, 21, 18, 0, 18, 6,
33, 3, 18, 0, 24, 15, 30, 0, 30, 24, 12, 6, 36, 0, 24, 3, 21, 24,
18, 15, 30, 3, 12, 6, 42, 12, 12, 12, 6, 0, 54, 6, 30, 15, 24, 18,
24, 6, 12, 0, 9, 6, 30, 0, 48, 0, 24, 0, 15, 12, 39, 12, 24, 6,
24, 6, 15, 30, 12, 6, 24, 0, 24, 3, 24, 12, 24, 6, 6, 18, 12, 4,
54, 6, 21, 18, 18, 0, 36, 6, 24, 9, 30, 12, 24, 9, 36, 6, 12, 18,
42, 3, 30, 0, 6, 9, 21, 6, 12, 30, 30, 6, 30, 0, 27, 12, 9, 18,
30, 0, 36, 0, 18, 9, 42, 6, 24, 12, 0, 6, 51, 12, 24, 12, 12, 0,
18, 6, 12, 18, 6, 6, 36, 3, 54, 9, 18, 6, 27, 12, 18, 0, 30, 0,
39, 9, 18, 18, 12, 9, 30, 6, 21, 12, 27, 18, 24, 0, 12, 0, 42, 18,
42, 6, 24, 15, 18, 0, 24, 12, 45, 12, 6, 0, 54, 0, 15, 21, 6, 6,
30, 6, 18, 12, 24, 18, 30, 6, 36, 0, 12, 3, 24, 12, 18, 18, 18, 12,
24, 0, 33, 12, 27, 6, 42, 0, 18, 6, 9, 15, 30, 6, 30, 6, 12, 6,
18, 6, 33, 15, 30, 0, 36, 3, 27, 21, 33, 24, 30, 9, 24, 0, 12, 18,
33, 6, 6, 0, 18, 3, 57, 12, 24, 18, 30, 9, 18, 0, 18, 12, 27, 12,
36, 0, 36, 6, 12, 6, 27, 12, 30, 9, 24, 6, 39, 18, 12, 24, 12, 0,
30, 0, 30, 6, 15, 15, 18, 3, 24, 18, 9, 12, 30, 9, 30, 0, 18, 6,
42, 18, 30, 0, 6, 10, 48, 0, 24, 12, 12, 18, 48, 0, 30, 3, 30, 15,
18, 6, 24, 18, 18, 0, 42, 6, 36, 15, 24, 0, 42, 12, 21, 24, 12, 12,
24, 0, 12, 6, 18, 18, 60, 6, 30, 0, 12, 0, 24, 0, 12, 18, 30, 15,
42, 0, 33, 30, 6, 6, 12, 0, 42, 3, 27, 6, 33, 12, 36, 12, 18, 0,
30, 6, 18, 12, 12, 0, 18, 6, 15, 27, 27, 6, 42, 6, 36, 9, 18, 30,
33, 9, 30, 0, 6, 6, 54, 6, 36, 24, 24, 0, 30, 3, 12, 6, 21, 24,
30, 0, 24, 0, 24, 12, 42, 9, 42, 21, 12, 12, 27, 12, 27, 6, 12, 0,
48, 6, 12, 18, 12, 12, 36, 6, 30, 0, 24, 0, 42, 12, 12, 0, 36, 0,
24, 15, 21, 21, 18, 6, 12, 9, 36, 18, 18, 15, 42, 0, 18, 6, 9, 18,
48, 12, 30, 9, 24, 3, 33, 6, 18, 18, 18, 0, 36, 3, 54, 24, 3, 12,
36, 9, 36, 6, 30, 12, 36, 12, 24, 0, 18, 6, 24, 6, 42, 0, 24, 18,
18, 0, 9, 30, 39, 12, 42, 0, 36, 0, 12, 12, 21, 12, 18, 12, 24, 6,
45, 6, 18, 24, 18, 0, 36, 0, 42, 15, 18, 6, 24, 6, 12, 12, 18, 12,
30, 6, 18, 0, 30, 1, 30, 9, 57, 9, 12, 9, 48, 6, 21, 24, 18, 12,
66, 0, 18, 6, 9, 24, 24, 24, 30, 12, 18, 0, 48, 6, 24, 18, 18, 0,
24, 3, 27, 18, 24, 12, 36, 6, 48, 6, 15, 18, 42, 6, 24, 0, 12, 12,
36, 6, 6, 24, 12, 3, 48, 0, 48, 18, 0, 12, 18, 0, 36, 6, 18, 9,
54, 15, 12, 12, 6, 6, 39, 6, 24, 18, 42, 0, 30, 0, 33, 18, 24, 18,
18, 9, 18, 0, 15, 18, 54, 0, 36, 0, 24, 0, 48, 24, 15, 18, 18, 12,
42, 9, 24, 12, 36, 21, 30, 0, 36, 12, 24, 3, 30, 0, 48, 15, 12, 6,
15, 18, 18, 18, 24, 0, 30, 0, 24, 24, 18, 9, 72, 0, 30, 6, 21, 18,
30, 6, 24, 0, 0, 6, 24, 18, 42, 12, 6, 15, 36, 0, 30, 18, 30, 12,
24, 0, 6, 0, 18, 12, 54, 9, 36, 9, 36, 9, 30, 6, 27, 27, 24, 0,
54, 6, 21, 18, 21, 6, 36, 15, 36, 3, 30, 12, 6, 18, 30, 0, 18, 6,
54, 0, 30, 21, 36, 9, 30, 6, 30, 24, 24, 6, 30, 0, 36, 12, 9, 24,
24, 12, 18, 9, 30, 0, 48, 12, 24, 12, 12, 0, 48, 0, 18, 12, 24, 24,
30, 6, 18, 12, 21, 12, 24, 0, 66, 0, 12, 0, 30, 9, 24, 24, 18, 13,
42, 3, 18, 18, 27, 24, 24, 0, 30, 6, 15, 18, 39, 12, 12, 9, 36, 12,
54, 12, 42, 18, 6, 0, 36, 0, 51, 18, 12, 0, 66, 12, 24, 0, 6, 24,
51, 12, 24, 0, 24, 0, 33, 6, 18, 18, 30, 6, 42, 3, 18, 30, 15, 15,
30, 0, 30, 6, 30, 12, 48, 12, 24, 12, 12, 9, 36, 6, 36, 6, 12, 0,
30, 0, 24, 21, 24, 15, 42, 12, 24, 6, 9, 18, 15, 9, 42, 0, 24, 12,
66, 12, 30, 24, 6, 9, 54, 0, 36, 12, 21, 12, 36, 0, 24, 3, 24, 15,
36, 6, 30, 24, 12, 6, 33, 6, 39, 21, 30, 0, 42, 6, 12, 30, 30, 18,
36, 0, 48, 3, 36, 12, 30, 18, 18, 0, 24, 0, 30, 6, 33, 21, 24, 6,
18, 12, 24, 12, 12, 15, 48, 0, 24, 6, 21, 21, 60, 6, 24, 12, 18, 0,
30, 12, 15, 12, 24, 0, 24, 3, 60, 27, 18, 12, 30, 3, 24, 9, 21, 12,
60, 18, 24, 0, 24, 9, 33, 6, 36, 12, 24, 15, 42, 6, 27, 36, 27, 6,
42, 0, 42, 6, 12, 15, 15, 24, 42, 18, 12, 0, 33, 6, 21, 18, 24, 0,
48, 3, 36, 9, 24, 24, 30, 6, 36, 0, 39, 18, 60, 6, 18, 0, 12, 6,
21, 27, 30, 0, 18, 6, 42, 6, 42, 18, 24, 9, 48, 0, 6, 6, 18, 18,
18, 6, 18, 15, 30, 4, 60, 12, 30, 30, 18, 0, 36, 0, 27, 18, 30, 18,
48, 9, 30, 12, 18, 6, 42, 9, 48, 0, 18, 6, 42, 6, 30, 24, 12, 3,
36, 0, 36, 36, 15, 18, 30, 0, 66, 0, 12, 18, 42, 9, 24, 15, 18, 12,
54, 6, 18, 21, 36, 0, 30, 6, 24, 24, 12, 6, 24, 9, 36, 12, 6, 12,
45, 12, 36, 0, 36, 0, 48, 3, 24, 18, 12, 24, 36, 0, 30, 12, 30, 21,
30, 0, 6, 15, 18, 15, 66, 12, 42, 3, 12, 0, 39, 12, 30, 12, 18, 0,
54, 6, 30, 24, 9, 12, 60, 12, 30, 12, 30, 24, 24, 18, 30, 0, 36, 0,
27, 9, 45, 18, 24, 12, 24, 0, 36, 24, 12, 6, 60, 0, 18, 0, 24, 15,
51, 9, 24, 12, 30, 12, 27, 18, 51, 18, 24, 0, 36, 6, 27, 27, 12, 30,
36, 6, 30, 0, 12, 6, 42, 0, 18, 0, 18, 0, 48, 12, 45, 24, 6, 15,
42, 6, 12, 18, 27, 9, 54, 0, 42, 3, 33, 12, 15, 12, 54, 18, 30, 6,
36, 18, 21, 30, 18, 0, 48, 3, 30, 18, 36, 6, 18, 0, 18, 12, 57, 24,
42, 6, 24, 0, 18, 12, 36, 18, 30, 12, 36, 3, 78, 0, 24, 6, 6, 36,
42, 0, 24, 0, 21, 15, 33, 6, 42, 18, 12, 3, 30, 12, 30, 27, 24, 0,
42, 12, 39, 12, 30, 12, 30, 15, 30, 6, 12, 24, 54, 6, 24, 0, 18, 6,
33, 12, 18, 24, 24, 7, 30, 0, 60, 24, 21, 12, 30, 0, 48, 6, 18, 15,
39, 12, 18, 18, 18, 0, 48, 12, 54, 18, 42, 0, 30, 0, 15, 30, 27, 18,
72, 0, 30, 15, 12, 12, 30, 18, 36, 0, 6, 3, 60, 15, 24, 18, 6, 18,
54, 6, 21, 24, 24, 12, 30, 0, 30, 6, 30, 15, 54, 6, 48, 12, 30, 12,
36, 0, 24, 3, 24, 0, 54, 6, 18, 30, 15, 6, 42, 9, 36, 0, 21, 30,
15, 12, 12, 0, 24, 3, 72, 0, 51, 39, 24, 12, 30, 3, 33, 18, 15, 12,
42, 0, 30, 12, 27, 24, 51, 12, 42, 12, 18, 3, 42, 12, 39, 18, 12, 0,
30, 0, 24, 21, 21, 21, 30, 6, 66, 12, 12, 6, 69, 21, 30, 0, 24, 6,
45, 12, 12, 18, 42, 12, 18, 0, 39, 30, 33, 12, 54, 0, 12, 0, 12, 18,
36, 9, 30, 9, 24, 9, 60, 12, 30, 12, 12, 0, 42, 9, 42, 18, 45, 24,
42, 6, 12, 9, 24, 6, 30, 12, 42, 0, 30, 6, 15, 15, 30, 12, 18, 12,
54, 6, 21, 30, 12, 33, 60, 0, 48, 0, 30, 15, 42, 6, 24, 24, 30, 0,
36, 18, 33, 18, 12, 0, 60, 0, 72, 15, 12, 9, 30, 12, 24, 15, 21, 24,
51, 12, 24, 0, 24, 6, 12, 6, 33, 24, 36, 9, 54, 6, 27, 24, 30, 6,
48, 0, 24, 3, 36, 27, 42, 15, 18, 18, 12, 6, 54, 6, 30, 15, 36, 0,
12, 12, 18, 24, 21, 18, 30, 3, 60, 0, 33, 12, 36, 18, 48, 0, 24, 1,
39, 12, 24, 18, 24, 9, 66, 6, 48, 24, 12, 12, 42, 0, 24, 6, 18, 12,
63, 6, 36, 24, 18, 0, 39, 12, 39, 24, 24, 0, 54, 6, 15, 24, 15, 24,
48, 3, 36, 12, 12, 24, 39, 18, 36, 0, 42, 6, 42, 6, 60, 24, 12, 18,
18, 0, 45, 6, 6, 6, 72, 0, 30, 6, 24, 9, 36, 12, 24, 9, 30, 15,
36, 18, 33, 24, 6, 0, 54, 0, 33, 36, 18, 24, 36, 6, 18, 6, 24, 18,
75, 6, 18, 0, 18, 0, 48, 9, 36, 18, 42, 9, 30, 0, 27, 36, 24, 15,
42, 0, 42, 18, 36, 12, 18, 12, 72, 9, 24, 0, 54, 18, 21, 24, 12, 0,
60, 0, 24, 24, 39, 12, 42, 18, 30, 6, 9, 12, 48, 12, 30, 0, 18, 12,
36, 15, 48, 18, 18, 3, 42, 6, 42, 18, 18, 24, 54, 0, 36, 0, 24, 36,
42, 0, 12, 27, 30, 6, 60, 6, 30, 24, 12, 0, 36, 3, 42, 12, 18, 12,
36, 9, 30, 0, 15, 18, 33, 12, 54, 0, 30, 6, 33, 21, 27, 30, 42, 12,
54, 9, 42, 24, 27, 6, 36, 0, 24, 12, 24, 12, 45, 24, 12, 6, 30, 12,
69, 12, 42, 12, 30, 0, 24, 0, 42, 18, 24, 15, 60, 9, 48, 18, 18, 24,
27, 12, 36, 0, 30, 0, 54, 9, 30, 18, 24, 15, 48, 0, 24, 24, 45, 24,
24, 0, 18, 6, 36, 9, 54, 15, 24, 12, 12, 6, 18, 12, 54, 18, 12, 0,
60, 3, 48, 30, 12, 18, 60, 6, 24, 3, 36, 12, 33, 12, 36, 0, 36, 6,
36, 3, 33, 24, 12, 13, 42, 12, 27, 18, 30, 12, 54, 0, 30, 12, 21, 39,
54, 6, 54, 18, 18, 0, 33, 12, 36, 36, 36, 0, 30, 0, 42, 33, 18, 18,
36, 12, 30, 3, 30, 12, 66, 6, 30, 0, 18, 12, 63, 18, 24, 6, 30, 12,
48, 9, 6, 24, 30, 12, 42, 0, 72, 0, 30, 12, 48, 3, 24, 15, 12, 12,
66, 18, 9, 36, 12, 0, 54, 0, 54, 18, 15, 30, 36, 6, 12, 0, 21, 18,
54, 12, 30, 0, 6, 0, 36, 15, 60, 18, 18, 15, 48, 6, 27, 24, 21, 12,
54, 0, 54, 9, 12, 24, 48, 12, 48, 15, 54, 6, 36, 6, 39, 24, 24, 0,
24, 3, 33, 24, 18, 18, 66, 12, 18, 12, 30, 12, 75, 15, 36, 0, 30, 9,
24, 6, 21, 24, 24, 12, 60, 0, 66, 36, 12, 18, 36, 0, 24, 6, 30, 18,
39, 18, 30, 12, 24, 9, 30, 6, 36, 18, 18, 0, 54, 12, 33, 24, 36, 6,
66, 0, 30, 6, 12, 12, 33, 24, 54, 0, 18, 3, 60, 3, 30, 24, 24, 21,
48, 0, 18, 30, 51, 12, 18, 0, 30, 12, 33, 15, 18, 12, 30, 27, 24, 0,
48, 12, 45, 6, 30, 0, 72, 0, 51, 18, 27, 27, 54, 9, 48, 12, 27, 30,
36, 18, 18, 0, 42, 3, 36, 9, 45, 30, 6, 6, 36, 3, 51, 24, 24, 18,
72, 0, 18, 6, 9, 36, 42, 0, 36, 9, 30, 12, 60, 30, 24, 15, 24, 0,
36, 6, 30, 27, 27, 18, 42, 12, 48, 0, 42, 0, 33, 24, 24, 0, 30, 0,
42, 12, 48, 9, 36, 9, 24, 6, 27, 36, 12, 9, 60, 0, 30, 12, 15, 18,
42, 18, 36, 18, 24, 7, 48, 12, 54, 24, 30, 0, 78, 0, 18, 18, 27, 24,
24, 6, 30, 12, 33, 18, 60, 15, 54, 0, 12, 12, 36, 12, 36, 24, 30, 18,
54, 0, 18, 18, 18, 24, 84, 0, 54, 0, 27, 15, 42, 6, 36, 12, 18, 9,
54, 6, 30, 30, 24, 0, 30, 9, 60, 30, 36, 6, 42, 12, 30, 6, 6, 30,
60, 0, 18, 0, 24, 9, 51, 18, 24, 33, 30, 0, 42, 12, 60, 18, 18, 36,
18, 0, 24, 0, 18, 9, 78, 12, 48, 24, 12, 0, 48, 6, 12, 18, 42, 0,
48, 0, 30, 27, 18, 6, 48, 3, 66, 21, 18, 18, 33, 12, 48, 0, 30, 6,
63, 21, 18, 36, 24, 15, 60, 6, 36, 30, 36, 0, 48, 0, 48, 3, 36, 30,
42, 18, 24, 24, 12, 6, 21, 6, 72, 12, 36, 0, 60, 6, 12, 18, 15, 24,
60, 9, 30, 0, 39, 30, 54, 12, 18, 0, 18, 3, 60, 9, 57, 24, 6, 18,
48, 6, 60, 18, 18, 9, 48, 0, 24, 12, 18, 18, 39, 6, 42, 15, 36, 6,
36, 18, 18, 30, 18, 0, 42, 6, 39, 27, 27, 18, 48, 12, 42, 12, 24, 18,
27, 9, 30, 0, 24, 9, 81, 12, 72, 12, 30, 6, 36, 0, 33, 42, 39, 30,
42, 0, 12, 3, 12, 6, 24, 18, 48, 12, 48, 3, 63, 24, 24, 27, 30, 0,
78, 6, 36, 18, 36, 30, 30, 12, 36, 12, 30, 6, 60, 12, 48, 0, 24, 0,
36, 21, 30, 24, 30, 12, 48, 0, 36, 12, 24, 27, 36, 0, 42, 12, 27, 24,
54, 6, 18, 12, 48, 0, 30, 6, 72, 24, 12, 0, 30, 3, 45, 24, 0, 18,
78, 15, 18, 18, 39, 18, 39, 9, 36, 0, 24, 6, 39, 12, 30, 18, 30, 16,
48, 0, 36, 30, 12, 12, 60, 0, 42, 3, 24, 21, 84, 33, 30, 12, 18, 18,
48, 12, 36, 12, 30, 0, 48, 9, 42, 36, 42, 6, 48, 3, 42, 0, 33, 24,
30, 12, 36, 0, 36, 6, 54, 12, 30, 30, 6, 21, 66, 0, 39, 24, 36, 24,
36, 0, 24, 12, 30, 15, 54, 12, 78, 30, 6, 0, 33, 12, 27, 30, 30, 0,
36, 6, 18, 36, 36, 6, 66, 3, 60, 6, 18, 30, 42, 0, 12, 0, 36, 6,
54, 6, 33, 24, 24, 12, 54, 0, 42, 12, 15, 12, 60, 0, 30, 0, 21, 18,
75, 18, 48, 18, 18, 15, 30, 24, 42, 33, 36, 0, 30, 6, 45, 24, 9, 30,
36, 3, 54, 15, 24, 18, 63, 18, 42, 0, 24, 0, 75, 6, 30, 9, 30, 15,
42, 12, 33, 36, 21, 24, 60, 0, 54, 9, 30, 30, 48, 12, 18, 12, 24, 0,
66, 12, 24, 18, 36, 0, 72, 6, 36, 15, 27, 27, 30, 6, 12, 18, 24, 6,
78, 15, 42, 0, 12, 6, 27, 24, 51, 18, 36, 12, 60, 3, 51, 30, 12, 24,
36, 0, 30, 0, 48, 12, 21, 6, 36, 24, 54, 6, 42, 6, 36, 36, 6, 0,
54, 12, 27, 15, 18, 18, 66, 6, 42, 0, 15, 30, 63, 12, 48, 0, 36, 3,
63, 12, 36, 30, 18, 9, 48, 3, 48, 36, 30, 12, 42, 0, 72, 6, 36, 30,
30, 12, 24, 12, 6, 15, 75, 18, 30, 6, 36, 0, 24, 0, 18, 36, 48, 18,
60, 18, 60, 12, 33, 12, 33, 15, 72, 0, 18, 9, 54, 15, 21, 30, 36, 12,
30, 0, 42, 24, 48, 18, 36, 0, 24, 6, 18, 15, 81, 12, 12, 27, 36, 12,
30, 6, 36, 18, 24, 0, 48, 6, 36, 36, 27, 6, 48, 9, 36, 3, 36, 36,
36, 24, 30, 0, 24, 1, 42, 6, 66, 27, 24, 18, 48, 12, 51, 18, 24, 18,
84, 0, 24, 6, 12, 9, 63, 18, 48, 9, 30, 0, 36, 12, 33, 24, 30, 0,
72, 0, 42, 48, 36, 18, 42, 12, 42, 15, 24, 12, 60, 15, 24, 0, 12, 21,
72, 3, 42, 30, 24, 18, 36, 6, 42, 18, 30, 12, 42, 0, 48, 12, 12, 24,
24, 18, 66, 6, 24, 0, 93, 12, 51, 30, 12, 0, 54, 6, 18, 27, 24, 24,
36, 12, 30, 0, 45, 18, 60, 6, 54, 0, 24, 0, 51, 24, 21, 18, 30, 6,
72, 6, 6, 18, 21, 36, 42, 0, 48, 12, 27, 24, 36, 6, 30, 27, 30, 6,
39, 18, 51, 36, 30, 0, 42, 0, 66, 18, 36, 6, 66, 9, 24, 12, 24, 24,
78, 12, 36, 0, 36, 12, 60, 15, 42, 24, 6, 15, 54, 0, 33, 30, 21, 30,
42, 0, 54, 0, 24, 9, 60, 9, 36, 24, 24, 6, 66, 12, 48, 18, 54, 0,
30, 0, 30, 39, 30, 18, 48, 6, 42, 12, 33, 24, 33, 12, 60, 0, 18, 6,
42, 24, 42, 24, 6, 12, 72, 6, 42, 30, 18, 9, 30, 0, 24, 15, 30, 18,
60, 12, 54, 15, 24, 0, 48, 24, 33, 12, 36, 0, 66, 6, 36, 18, 21, 30,
72, 3, 24, 9, 27, 30, 30, 18, 42, 0, 42, 0, 72, 6, 39, 42, 24, 18,
60, 3, 24, 18, 36, 18, 30, 0, 54, 6, 27, 33, 60, 12, 24, 24, 18, 18,
30, 12, 21, 33, 48, 0, 78, 12, 78, 12, 30, 12, 42, 12, 48, 0, 24, 12,
75, 18, 24, 0, 18, 0, 33, 24, 30, 21, 42, 15, 30, 12, 39, 30, 51, 12,
54, 0, 36, 12, 18, 12, 48, 24, 78, 18, 18, 6, 78, 6, 24, 30, 12, 0,
42, 0, 45, 18, 15, 27, 42, 0, 54, 18, 36, 18, 36, 6, 48, 0, 30, 12,
36, 21, 45, 6, 24, 7, 54, 0, 27, 42, 33, 24, 72, 0, 42, 0, 48, 24,
45, 18, 18, 15, 36, 15, 66, 6, 66, 30, 18, 0, 48, 0, 27, 39, 30, 18,
66, 27, 12, 12, 18, 24, 60, 6, 66, 0, 42, 0, 42, 6, 33, 21, 36, 12,
42, 6, 21, 36, 33, 21, 48, 0, 66, 12, 6, 18, 75, 24, 36, 12, 18, 0,
81, 12, 42, 30, 36, 0, 24, 0, 30, 30, 30, 6, 60, 9, 60, 6, 24, 30,
30, 6, 30, 0, 30, 12, 75, 18, 30, 24, 24, 15, 78, 0, 42, 24, 18, 30,
42, 0, 30, 12, 21, 12, 48, 9, 60, 21, 30, 12, 24, 24, 39, 21, 24, 0,
54, 3, 39, 30, 33, 24, 72, 12, 60, 0, 18, 24, 57, 12, 24, 0, 24, 3,
90, 9, 12, 21, 36, 12, 30, 18, 84, 24, 30, 9, 60, 0, 36, 18, 18, 24,
78, 18, 24, 18, 48, 6, 24, 0, 45, 30, 24, 0, 66, 3, 60, 36, 21, 42,
42, 6, 30, 6, 33, 12, 60, 21, 36, 0, 6, 6, 36, 15, 36, 30, 48, 21,
48, 0, 39, 36, 36, 6, 54, 0, 66, 3, 18, 18, 33, 24, 36, 18, 30, 9,
66, 6, 15, 36, 24, 0, 96, 6, 30, 12, 42, 6, 36, 6, 36, 9, 27, 36,
42, 12, 42, 0, 18, 6, 51, 12, 78, 18, 30, 9, 54, 12, 39, 24, 24, 33,
66, 0, 36, 9, 45, 33, 36, 12, 18, 27, 36, 0, 78, 12, 48, 24, 30, 0,
42, 9, 48, 21, 18, 9, 60, 12, 54, 6, 21, 24, 72, 3, 66, 0, 18, 18,
33, 12, 21, 36, 36, 6, 36, 6, 60, 36, 36, 18, 48, 0, 24, 0, 30, 24,
87, 24, 24, 27, 42, 6, 60, 18, 66, 6, 18, 0, 36, 6, 39, 36, 30, 18,
36, 9, 30, 0, 18, 18, 51, 12, 48, 0, 54, 0, 48, 18, 36, 30, 36, 30,
66, 3, 12, 18, 15, 39, 60, 0, 24, 12, 66, 6, 54, 12, 48, 6, 18, 7,
30, 24, 48, 18, 30, 0, 84, 0, 30, 48, 12, 15, 60, 9, 42, 18, 42, 18,
42, 18, 48, 0, 30, 9, 48, 21, 69, 36, 12, 12, 48, 0, 57, 18, 24, 24,
66, 0, 36, 6, 24, 21, 69, 6, 54, 12, 30, 18, 72, 18, 30, 30, 18, 0,
42, 0, 42, 42, 12, 18, 42, 6, 54, 9, 42, 12, 72, 18, 24, 0, 24, 3,
78, 0, 24, 24, 30, 15, 60, 6, 42, 30, 39, 21, 36, 0, 54, 12, 27, 24,
42, 24, 72, 21, 30, 0, 48, 18, 24, 30, 12, 0, 30, 3, 24, 15, 72, 33,
42, 6, 24, 24, 12, 24, 66, 12, 60, 0, 24, 6, 63, 12, 42, 18, 24, 18,
84, 6, 30, 24, 24, 6, 90, 0, 72, 6, 21, 24, 30, 18, 18, 30, 24, 6,
66, 18, 54, 18, 36, 0, 36, 12, 60, 27, 30, 18, 90, 18, 18, 0, 18, 24,
48, 24, 30, 0, 36, 6, 36, 18, 66, 36, 30, 3, 66, 3, 57, 48, 12, 18,
36, 0, 48, 6, 36, 21, 48, 0, 60, 12, 36, 12, 72, 0, 36, 30, 30, 0,
48, 0, 33, 30, 48, 9, 54, 9, 36, 24, 18, 30, 42, 18, 54, 0, 12, 0,
54, 12, 21, 24, 30, 21, 72, 0, 66, 24, 27, 18, 36, 0, 24, 0, 45, 24,
78, 0, 42, 21, 24, 12, 39, 30, 54, 30, 24, 0, 84, 15, 24, 24, 9, 30,
54, 9, 48, 6, 33, 18, 57, 18, 30, 0, 60, 3, 54, 27, 33, 30, 36, 24,
42, 0, 54, 18, 39, 24, 54, 0, 60, 18, 24, 15, 75, 12, 24, 12, 42, 0,
39, 12, 36, 36, 36, 0, 30, 3, 66, 42, 15, 24, 72, 12, 48, 12, 42, 12,
48, 15, 24, 0, 18, 18, 60, 6, 60, 18, 36, 9, 24, 6, 27, 36, 30, 24,
90, 0, 60, 3, 21, 18, 54, 24, 48, 18, 18, 12, 51, 24, 39, 18, 18, 0,
72, 12, 42, 21, 36, 24, 36, 6, 36, 0, 33, 18, 42, 0, 60, 0, 18, 6,
42, 21, 39, 39, 36, 13, 84, 6, 24, 18, 30, 24, 78, 0, 36, 3, 54, 39,
51, 18, 30, 21, 24, 3, 60, 12, 87, 42, 30, 0, 36, 6, 30, 15, 36, 12,
54, 18, 42, 12, 27, 24, 84, 15, 42, 0, 18, 9, 54, 18, 30, 30, 48, 12,
72, 0, 54, 42, 9, 12, 36, 0, 60, 0, 27, 21, 78, 18, 42, 30, 30, 6,
54, 6, 30, 18, 24, 0, 60, 12, 42, 36, 48, 24, 54, 6, 36, 15, 12, 48,
21, 12, 30, 0, 36, 0, 102, 6, 18, 12, 24, 9, 60, 12, 48, 24, 33, 30,
66, 0, 30, 12, 30, 15, 60, 12, 54, 36, 30, 0, 36, 6, 72, 18, 36, 0,
54, 0, 30, 36, 9, 15, 60, 0, 60, 15, 39, 12, 63, 18, 42, 0, 30, 18,
60, 21, 57, 30, 0, 18, 54, 3, 75, 30, 48, 24, 42, 0, 24, 12, 36, 42,
57, 9, 48, 9, 36, 6, 45, 12, 24, 48, 54, 0, 66, 0, 45, 33, 30, 18,
54, 18, 36, 0, 36, 6, 54, 30, 54, 0, 36, 0, 66, 12, 42, 21, 24, 18,
48, 6, 21, 48, 42, 12, 60, 0, 84, 12, 0, 12, 54, 24, 36, 18, 18, 12,
81, 18, 33, 18, 12, 0, 66, 3, 66, 6, 33, 48, 48, 6, 24, 24, 36, 18,
60, 6, 36, 0, 24, 6, 39, 21, 42, 18, 42, 12, 60, 0, 24, 30, 33, 36,
72, 0, 30, 0, 36, 36, 42, 12, 36, 15, 24, 15, 75, 30, 63, 27, 24, 0,
42, 6, 63, 30, 18, 12, 108, 9, 48, 12, 24, 12, 72, 18, 30, 0, 54, 6,
30, 9, 63, 27, 48, 15, 36, 6, 48, 36, 18, 12, 54, 0, 42, 9, 36, 36,
63, 18, 36, 24, 36, 0, 75, 6, 63, 24, 36, 0, 48, 6, 27, 39, 30, 18,
30, 9, 54, 18, 36, 18, 39, 21, 66, 0, 30, 0, 54, 18, 42, 36, 12, 24,
108, 0, 30, 24, 42, 12, 48, 0, 24, 0, 15, 9, 48, 18, 66, 24, 24, 12,
54, 12, 36, 21, 54, 0, 54, 18, 45, 42, 36, 24, 42, 3, 36, 0, 42, 48,
42, 12, 36, 0, 36, 1, 60, 18, 36, 18, 36, 15, 54, 9, 60, 30, 24, 21,
48, 0, 24, 18, 24, 18, 90, 6, 72, 15, 36, 9, 48, 6, 36, 42, 48, 0,
78, 3, 54, 27, 18, 36, 48, 15, 54, 12, 30, 24, 84, 12, 18, 0, 18, 12,
105, 12, 24, 30, 30, 18, 36, 0, 60, 30, 27, 12, 48, 0, 90, 6, 18, 18,
33, 21, 42, 24, 24, 12, 45, 24, 60, 36, 36, 0, 66, 6, 27, 15, 42, 24,
60, 12, 18, 9, 30, 18, 84, 12, 72, 0, 12, 6, 42, 21, 45, 12, 18, 9,
96, 12, 21, 30, 30, 24, 66, 0, 48, 12, 42, 18, 36, 18, 24, 24, 24, 0,
30, 12, 27, 42, 18, 0, 72, 0, 84, 27, 54, 15, 102, 12, 36, 6, 39, 36,
36, 15, 36, 0, 30, 15, 57, 12, 57, 42, 30, 9, 60, 6, 27, 42, 27, 30,
36, 0, 54, 6, 24, 21, 78, 12, 42, 18, 18, 12, 84, 18, 54, 18, 48, 0,
66, 12, 15, 36, 30, 18, 72, 9, 66, 0, 27, 18, 24, 6, 78, 0, 42, 6,
81, 27, 27, 36, 24, 24, 48, 0, 72, 18, 39, 30, 42, 0, 18, 18, 30, 24,
78, 6, 18, 18, 36, 0, 48, 30, 84, 6, 18, 0, 54, 0, 42, 36, 12, 30,
90, 12, 48, 18, 24, 18, 21, 18, 48, 0, 60, 0, 60, 6, 30, 42, 24, 18,
66, 0, 27, 36, 24, 18, 54, 0, 48, 6, 30, 18, 90, 15, 42, 9, 48, 18,
42, 6, 45, 24, 36, 0, 48, 0, 78, 39, 27, 12, 42, 27, 48, 6, 45, 18,
72, 36, 48, 0, 18, 9, 66, 9, 54, 33, 18, 18, 66, 12, 39, 36, 45, 12,
72, 0, 48, 12, 21, 39, 33, 18, 60, 18, 36, 0, 78, 18, 39, 36, 24, 0,
30, 0, 30, 30, 54, 21, 66, 6, 30, 21, 39, 18, 60, 15, 72, 0, 30, 18,
45, 12, 39, 18, 60, 6, 66, 15, 36, 30, 12, 18, 60, 0, 60, 0, 18, 33,
57, 18, 24, 24, 42, 6, 66, 12, 81, 42, 18, 0, 36, 6, 42, 18, 24, 24,
72, 0, 18, 0, 30, 30, 87, 18, 36, 0, 42, 3, 45, 12, 36, 42, 24, 25,
30, 6, 72, 24, 18, 18, 60, 0, 102, 12, 42, 12, 90, 12, 24, 27, 24, 12,
69, 24, 30, 18, 42, 0, 48, 0, 42, 45, 39, 15, 60, 18, 30, 12, 33, 24,
72, 18, 36, 0, 24, 12, 51, 24, 39, 36, 24, 6, 120, 0, 72, 24, 30, 30,
30, 0, 24, 12, 72, 18, 54, 3, 84, 30, 30, 21, 42, 24, 30, 18, 30, 0,
54, 0, 36, 30, 24, 30, 72, 9, 72, 6, 30, 24, 36, 24, 30, 0, 30, 0,
90, 12, 48, 27, 24, 6, 54, 12, 39, 36, 18, 18, 78, 0, 36, 12, 18, 39,
66, 6, 54, 18, 36, 0, 54, 18, 42, 12, 30, 0, 78, 0, 48, 45, 27, 36,
36, 9, 54, 15, 6, 12, 99, 15, 48, 0, 24, 3, 60, 12, 45, 36, 36, 30,
24, 12, 57, 30, 42, 18, 54, 0, 36, 6, 45, 24, 63, 30, 60, 12, 42, 6,
102, 18, 30, 33, 18, 0, 84, 12, 54, 24, 39, 12, 42, 0, 36, 0, 54, 24,
60, 12, 42, 0, 48, 6, 30, 9, 93, 24, 18, 21, 60, 6, 21, 36, 18, 54,
102, 0, 30, 18, 36, 21, 48, 12, 30, 27, 42, 3, 54, 12, 66, 36, 36, 0,
48, 9, 45, 33, 30, 9, 84, 18, 30, 12, 33, 36, 51, 12, 54, 0, 36, 18,
42, 12, 30, 36, 24, 9, 72, 0, 48, 30, 36, 6, 78, 0, 42, 0, 18, 24,
63, 21, 36, 18, 24, 15, 66, 0, 42, 27, 54, 0, 30, 9, 51, 45, 45, 24,
48, 12, 72, 12, 33, 24, 39, 30, 66, 0, 18, 6, 69, 12, 36, 24, 36, 18,
90, 6, 60, 24, 36, 27, 36, 0, 60, 18, 33, 21, 84, 12, 36, 30, 18, 0,
33, 24, 51, 30, 24, 0, 84, 0, 57, 33, 36, 21, 84, 12, 30, 12, 33, 36,
63, 18, 24, 0, 30, 6, 90, 21, 66, 30, 30, 24, 36, 0, 54, 12, 51, 18,
78, 0, 36, 0, 18, 18, 54, 21, 48, 12, 66, 18, 21, 18, 33, 21, 42, 0,
66, 6, 48, 54, 21, 30, 66, 12, 66, 0, 24, 24, 63, 24, 36, 0, 42, 3,
60, 18, 30, 6, 36, 9, 54, 6, 72, 48, 36, 15, 54, 0, 30, 27, 12, 18,
60, 12, 66, 15, 48, 10, 84, 12, 39, 42, 12, 0, 66, 6, 24, 18, 21, 36,
54, 24, 24, 12, 51, 18, 66, 12, 90, 0, 18, 6, 87, 15, 75, 24, 30, 15,
60, 0, 24, 42, 24, 24, 48, 0, 84, 6, 51, 39, 60, 12, 18, 30, 36, 12,
60, 12, 60, 48, 36, 0, 54, 6, 42, 12, 6, 18, 78, 6, 48, 12, 12, 36,
84, 0, 48, 0, 54, 3, 48, 18, 45, 51, 54, 6, 72, 6, 51, 30, 45, 30,
48, 0, 36, 6, 36, 15, 78, 24, 42, 24, 24, 0, 90, 18, 36, 24, 24, 0,
36, 0, 36, 30, 30, 30, 66, 6, 78, 21, 30, 12, 21, 15, 60, 0, 36, 12,
66, 21, 36, 24, 30, 18, 60, 9, 54, 48, 24, 18, 48, 0, 30, 6, 42, 18,
81, 18, 54, 27, 24, 12, 30, 18, 84, 30, 24, 0, 102, 9, 42, 42, 36, 24,
90, 3, 30, 0, 60, 30, 42, 18, 24, 0, 18, 0, 78, 12, 42, 27, 42, 18,
66, 18, 45, 18, 42, 9, 84, 0, 54, 6, 15, 54, 63, 18, 54, 24, 24, 9,
57, 24, 45, 54, 36, 0, 60, 0, 66, 27, 33, 18, 30, 9, 60, 24, 30, 12,
54, 21, 24, 0, 12, 18, 108, 15, 66, 12, 30, 27, 66, 0, 36, 30, 36, 24,
66, 0, 60, 0, 9, 24, 54, 12, 90, 15, 42, 0, 51, 30, 18, 30, 48, 0,
84, 9, 48, 21, 54, 30, 24, 18, 36, 12, 45, 18, 96, 6, 30, 0, 30, 9,
30, 24, 42, 24, 24, 15, 66, 6, 69, 36, 15, 15, 84, 0, 36, 15, 48, 27,
45, 18, 42, 30, 36, 0, 66, 6, 72, 30, 48, 0, 42, 3, 51, 39, 30, 33,
78, 12, 24, 18, 30, 18, 105, 21, 72, 0, 42, 12, 39, 18, 27, 42, 24, 6,
66, 3, 60, 42, 30, 30, 60, 0, 54, 6, 54, 24, 57, 6, 54, 6, 24, 24,
54, 12, 57, 27, 42, 0, 48, 6, 36, 27, 57, 12, 84, 12, 60, 0, 12, 30,
54, 24, 48, 0, 18, 3, 105, 36, 48, 42, 24, 18, 48, 6, 30, 36, 45, 42,
42, 0, 54, 9, 36, 12, 48, 12, 54, 30, 30, 6, 48, 6, 51, 18, 36, 0,
102, 6, 18, 30, 33, 24, 48, 18, 60, 12, 60, 30, 45, 12, 36, 0, 54, 12,
60, 6, 48, 54, 12, 13, 60, 0, 72, 18, 24, 6, 90, 0, 48, 12, 15, 42,
96, 18, 36, 18, 36, 6, 78, 24, 48, 18, 30, 0, 48, 18, 78, 42, 24, 30,
60, 6, 60, 12, 18, 12, 42, 30, 42, 0, 24, 0, 81, 9, 54, 18, 60, 33,
48, 0, 27, 54, 51, 27, 90, 0, 60, 18, 24, 18, 54, 24, 36, 12, 42, 0,
87, 24, 33, 18, 24, 0, 96, 0, 87, 36, 30, 15, 42, 12, 36, 24, 24, 36,
42, 21, 48, 0, 30, 6, 42, 18, 48, 24, 24, 18, 84, 3, 36, 42, 42, 36,
72, 0, 54, 6, 30, 15, 60, 6, 78, 30, 24, 6, 72, 6, 66, 45, 24, 0,
42, 21, 36, 30, 36, 18, 48, 12, 30, 0, 39, 24, 102, 18, 36, 0, 12, 6,
54, 6, 30, 33, 66, 21, 90, 3, 78, 36, 9, 18, 36, 0, 84, 0, 30, 30,
93, 24, 30, 24, 30, 15, 63, 12, 48, 30, 54, 0, 48, 0, 54, 42, 42, 30,
78, 0, 36, 24, 39, 24, 60, 12, 78, 0, 60, 6, 51, 30, 36, 36, 30, 18,
60, 0, 30, 30, 51, 24, 60, 0, 42, 3, 24, 9, 54, 21, 24, 33, 30, 24,
66, 24, 69, 18, 30, 0, 102, 15, 54, 24, 15, 30, 120, 6, 30, 3, 51, 24,
54, 12, 30, 0, 36, 6, 36, 12, 90, 42, 12, 12, 60, 12, 60, 24, 42, 12,
90, 0, 24, 12, 42, 30, 30, 6, 78, 21, 42, 0, 54, 24, 27, 54, 24, 0,
66, 6, 45, 30, 12, 30, 42, 12, 84, 15, 36, 18, 84, 24, 36, 0, 30, 18,
72, 18, 60, 24, 48, 12, 54, 6, 36, 54, 42, 12, 42, 0, 60, 0, 51, 48,
54, 9, 36, 27, 24, 6, 84, 18, 48, 30, 42, 0, 78, 0, 48, 27, 27, 48,
42, 18, 36, 0, 39, 18, 99, 24, 102, 0, 18, 0, 48, 18, 72, 15, 36, 12,
84, 12, 24, 12, 30, 39, 84, 0, 36, 12, 39, 39, 63, 24, 42, 24, 66, 6,
72, 18, 18, 24, 30, 0, 60, 6, 48, 42, 36, 15, 78, 6, 48, 30, 12, 36,
54, 12, 36, 0, 42, 6, 45, 6, 69, 24, 72, 21, 48, 0, 57, 48, 12, 24,
48, 0, 48, 3, 48, 15, 78, 24, 60, 18, 12, 12, 111, 24, 54, 24, 24, 0,
48, 6, 36, 33, 42, 6, 54, 9, 72, 18, 27, 30, 30, 12, 54, 0, 66, 4,
78, 21, 24, 54, 18, 24, 54, 6, 60, 24, 54, 21, 78, 0, 36, 18, 54, 30,
66, 18, 48, 30, 24, 0, 42, 12, 99, 36, 30, 0, 90, 6, 18, 30, 30, 24,
78, 6, 66, 9, 24, 42, 78, 30, 42, 0, 18, 12, 102, 6, 33, 24, 18, 12,
66, 9, 54, 24, 24, 36, 84, 0, 60, 6, 39, 15, 78, 12, 42, 21, 42, 18,
42, 18, 18, 42, 24, 0, 48, 3, 105, 51, 42, 30, 42, 18, 72, 0, 24, 24,
102, 6, 36, 0, 36, 9, 99, 12, 48, 21, 48, 18, 42, 6, 36, 42, 18, 12,
78, 0, 48, 30, 30, 18, 36, 30, 42, 9, 42, 6, 60, 12, 39, 30, 24, 0,
78, 0, 48, 30, 39, 27, 102, 24, 30, 12, 51, 12, 66, 9, 48, 0, 30, 18,
45, 39, 87, 30, 36, 9, 72, 0, 60, 24, 30, 36, 54, 0, 48, 0, 45, 36,
45, 18, 42, 27, 60, 9, 66, 12, 78, 42, 18, 0, 60, 6, 60, 33, 36, 24,
96, 12, 18, 12, 12, 36, 72, 0, 78, 0, 36, 6, 60, 24, 27, 51, 42, 24,
84, 12, 57, 48, 30, 24, 42, 0, 60, 12, 24, 18, 96, 12, 30, 30, 30, 0,
93, 18, 48, 18, 60, 0, 48, 6, 54, 36, 30, 12, 42, 9, 60, 18, 12, 24,
69, 6, 60, 0, 54, 6, 33, 15, 60, 36, 30, 18, 90, 3, 72, 24, 54, 54,
42, 0, 18, 9, 60, 30, 84, 18, 48, 24, 12, 6, 66, 36, 24, 27, 24, 0,
42, 12, 39, 42, 27, 18, 108, 9, 78, 0, 48, 12, 54, 30, 30, 0, 36, 0,
48, 12, 75, 39, 30, 6, 42, 9, 66, 30, 33, 18, 96, 0, 48, 18, 39, 36,
102, 12, 54, 18, 24, 9, 45, 24, 72, 30, 36, 0, 78, 6, 63, 36, 36, 21,
60, 9, 36, 12, 54, 24, 78, 27, 42, 0, 42, 18, 60, 9, 24, 24, 54, 39,
84, 0, 27, 36, 39, 12, 84, 0, 66, 0, 21, 30, 30, 42, 66, 18, 18, 18,
78, 12, 48, 42, 36, 0, 90, 6, 48, 33, 39, 24, 48, 15, 54, 15, 54, 24,
48, 18, 60, 0, 24, 0, 48, 24, 78, 24, 36, 9, 90, 12, 42, 24, 30, 45,
54, 0, 66, 12, 24, 12, 60, 6, 48, 33, 48, 0, 60, 6, 51, 54, 12, 0,
30, 0, 69, 21, 42, 15, 72, 15, 48, 21, 33, 36, 96, 6, 30, 0, 54, 6,
87, 30, 42, 30, 36, 13, 42, 6, 84, 48, 18, 18, 72, 0, 54, 12, 30, 30,
75, 24, 36, 24, 42, 18, 78, 12, 36, 30, 72, 0, 48, 6, 33, 36, 57, 36,
66, 6, 54, 0, 27, 36, 66, 12, 90, 0, 24, 3, 96, 24, 27, 24, 18, 24,
108, 12, 42, 48, 24, 18, 30, 0, 54, 18, 48, 12, 75, 18, 90, 21, 36, 12,
72, 12, 45, 24, 24, 0, 114, 0, 27, 30, 39, 33, 48, 12, 54, 12, 18, 42,
45, 27, 48, 0, 48, 6, 90, 9, 60, 42, 36, 12, 48, 0, 36, 42, 42, 18,
78, 0, 30, 6, 24, 33, 78, 9, 84, 30, 18, 15, 63, 18, 51, 30, 48, 0,
72, 6, 36, 51, 24, 30, 48, 21, 96, 6, 24, 6, 93, 12, 48, 0, 18, 6,
69, 18, 36, 18, 24, 18, 24, 6, 54, 36, 51, 33, 96, 0, 36, 15, 27, 30,
54, 30, 42, 12, 36, 0, 117, 36, 54, 36, 24, 0, 96, 3, 72, 36, 57, 27,
54, 6, 54, 21, 36, 12, 66, 33, 60, 0, 30, 24, 24, 15, 63, 30, 42, 24,
78, 9, 39, 30, 24, 24, 138, 0, 42, 0, 54, 24, 57, 12, 30, 24, 42, 18,
54, 6, 60, 33, 24, 0, 72, 6, 84, 24, 42, 6, 66, 15, 36, 0, 42, 48,
51, 18, 66, 0, 60, 3, 60, 12, 60, 57, 42, 9, 72, 12, 60, 42, 27, 24,
60, 0, 42, 18, 24, 30, 48, 30, 36, 18, 30, 9, 78, 12, 51, 18, 30, 0,
60, 0, 12, 57, 51, 18, 78, 6, 102, 12, 30, 24, 48, 27, 36, 0, 30, 12,
126, 6, 27, 36, 30, 18, 66, 0, 60, 30, 48, 36, 48, 0, 24, 6, 39, 24,
96, 12, 90, 33, 36, 6, 39, 6, 90, 27, 36, 0, 60, 12, 45, 42, 30, 30,
72, 12, 36, 9, 39, 36, 69, 24, 48, 0, 36, 6, 66, 15, 72, 39, 36, 27,
54, 18, 57, 30, 42, 12, 60, 0, 84, 24, 36, 27, 72, 12, 48, 21, 60, 0,
51, 30, 27, 30, 90, 0, 78, 0, 42, 57, 12, 30, 48, 18, 42, 6, 48, 24,
90, 15, 42, 0, 12, 15, 84, 24, 72, 18, 48, 21, 66, 3, 54, 42, 30, 24,
48, 0, 36, 18, 27, 12, 42, 9, 108, 18, 36, 12, 96, 24, 21, 30, 24, 0,
96, 9, 54, 18, 75, 30, 54, 18, 36, 0, 39, 18, 84, 18, 42, 0, 24, 6,
54, 18, 57, 42, 24, 9, 84, 18, 48, 42, 27, 30, 78, 0, 60, 0, 30, 48,
36, 6, 30, 36, 6, 10, 78, 12, 51, 48, 48, 0, 90, 0, 75, 9, 42, 24,
48, 15, 72, 12, 33, 42, 108, 12, 54, 0, 54, 18, 51, 42, 36, 48, 48, 12,
72, 0, 42, 18, 45, 30, 66, 0, 78, 3, 36, 15, 78, 30, 30, 30, 30, 15,
102, 12, 54, 18, 30, 0, 36, 6, 81, 48, 12, 24, 108, 6, 78, 18, 24, 36,
33, 18, 30, 0, 30, 0, 108, 21, 54, 42, 18, 18, 90, 6, 30, 48, 69, 36,
48, 0, 24, 15, 24, 15, 84, 24, 114, 6, 30, 0, 48, 6, 60, 42, 24, 0,
102, 12, 42, 42, 27, 21, 78, 9, 42, 24, 51, 24, 42, 12, 48, 0, 60, 12,
66, 6, 42, 24, 30, 24, 42, 0, 78, 24, 54, 12, 66, 0, 30, 6, 24, 51,
99, 18, 60, 24, 42, 18, 54, 6, 45, 60, 36, 0, 54, 6, 39, 39, 39, 30,
66, 18, 72, 0, 51, 24, 102, 12, 54, 0, 24, 0, 102, 12, 48, 24, 42, 36,
60, 0, 12, 48, 18, 12, 54, 0, 84, 18, 39, 9, 84, 30, 66, 18, 48, 15,
72, 48, 39, 42, 48, 0, 60, 0, 84, 30, 45, 33, 54, 6, 54, 30, 33, 30,
90, 6, 54, 0, 24, 6, 72, 27, 78, 12, 24, 15, 66, 0, 54, 36, 21, 42,
114, 0, 60, 3, 30, 33, 54, 27, 30, 33, 60, 6, 54, 12, 48, 33, 36, 0,
42, 12, 45, 39, 24, 36, 96, 18, 24, 12, 33, 18, 99, 18, 66, 0, 36, 0,
51, 24, 30, 30, 36, 15, 84, 6, 102, 48, 48, 18, 60, 0, 72, 12, 36, 42,
60, 12, 24, 21, 30, 0, 54, 18, 60, 18, 42, 0, 66, 6, 24, 24, 54, 15,
78, 12, 42, 27, 27, 30, 51, 27, 78, 0, 48, 6, 120, 27, 48, 42, 24, 12,
54, 6, 54, 24, 48, 36, 66, 0, 78, 9, 57, 21, 48, 18, 54, 33, 24, 30,
84, 18, 45, 33, 30, 0, 126, 9, 36, 30, 27, 30, 66, 18, 54, 0, 36, 42,
48, 6, 42, 0, 54, 6, 57, 12, 84, 54, 48, 6, 60, 6, 63, 18, 42, 36,
78, 0, 24, 24, 33, 24, 105, 24, 66, 27, 48, 0, 48, 30, 60, 30, 54, 0,
42, 3, 75, 48, 24, 12, 66, 12, 96, 6, 30, 12, 87, 21, 36, 0, 30, 24,
69, 12, 57, 30, 48, 24, 54, 0, 42, 54, 24, 24, 72, 0, 60, 0, 48, 24,
69, 24, 42, 18, 36, 12, 66, 24, 36, 42, 18, 0, 78, 9, 48, 36, 42, 42,
36, 12, 36, 21, 78, 18, 48, 12, 102, 0, 18, 12, 54, 24, 45, 27, 42, 13,
108, 12, 39, 24, 42, 27, 102, 0, 60, 6, 39, 24, 54, 12, 54, 24, 24, 0,
114, 24, 63, 48, 30, 0, 48, 6, 69, 36, 18, 12, 72, 6, 48, 18, 33, 54,
117, 12, 42, 0, 66, 12, 48, 6, 54, 36, 42, 21, 102, 6, 48, 54, 33, 30,
48, 0, 72, 0, 30, 24, 75, 24, 84, 30, 30, 0, 72, 18, 30, 42, 54, 0,
60, 12, 36, 45, 42, 12, 96, 6, 66, 0, 12, 36, 78, 36, 42, 0, 36, 0,
78, 24, 48, 24, 18, 30, 90, 15, 96, 18, 27, 21, 54, 0, 24, 21, 48, 27,
84, 18, 48, 42, 36, 6, 66, 12, 108, 12, 42, 0, 48, 9, 27, 60, 21, 36,
84, 6, 36, 18, 42, 18, 54, 18, 60, 0, 60, 15, 72, 9, 99, 42, 12, 12,
60, 0, 57, 42, 18, 18, 78, 0, 42, 6, 36, 36, 63, 9, 42, 15, 30, 18,
78, 6, 24, 48, 42, 0, 102, 12, 75, 45, 42, 30, 84, 24, 66, 9, 24, 30,
90, 24, 42, 0, 24, 3, 84, 21, 84, 33, 66, 24, 36, 6, 36, 48, 51, 18,
72, 0, 66, 18, 54, 30, 24, 18, 48, 18, 30, 0, 102, 12, 45, 36, 24, 0,
102, 3, 42, 15, 42, 54, 54, 21, 66, 24, 66, 30, 102, 3, 66, 0, 48, 12,
24, 30, 45, 36, 54, 6, 78, 9, 48, 24, 39, 36, 96, 0, 66, 6, 27, 27,
60, 30, 18, 30, 48, 12, 90, 24, 60, 36, 6, 0, 42, 12, 78, 36, 36, 24,
114, 6, 60, 0, 18, 6, 69, 18, 84, 0, 36, 6, 48, 6, 39, 24, 42, 24,
54, 6, 72, 48, 36, 42, 60, 0, 48, 0, 36, 18, 138, 24, 30, 30, 42, 18,
75, 18, 48, 18, 24, 0, 78, 0, 78, 57, 60, 9, 48, 9, 36, 30, 30, 42,
42, 39, 84, 0, 24, 12, 87, 27, 30, 42, 24, 24, 90, 0, 36, 24, 60, 36,
84, 0, 42, 0, 30, 21, 87, 12, 72, 24, 42, 12, 60, 30, 72, 21, 60, 0,
96, 12, 30, 42, 39, 18, 66, 12, 84, 12, 63, 42, 42, 24, 42, 0, 18, 6,
78, 15, 75, 45, 54, 12, 54, 6, 84, 30, 30, 18, 54, 0, 42, 24, 39, 27,
96, 18, 42, 21, 48, 0, 54, 18, 33, 36, 66, 0, 84, 0, 75, 48, 30, 42,
54, 12, 54, 15, 42, 30, 96, 18, 42, 0, 18, 6, 123, 15, 48, 24, 48, 39,
42, 6, 21, 54, 45, 12, 60, 0, 90, 12, 30, 36, 45, 18, 72, 21, 78, 12,
30, 12, 60, 30, 18, 0, 78, 6, 60, 36, 33, 18, 60, 12, 30, 0, 60, 18,
90, 30, 54, 0, 36, 1, 78, 27, 84, 30, 18, 15, 102, 9, 27, 30, 24, 57,
90, 0, 42, 9, 48, 42, 42, 12, 72, 27, 48, 9, 108, 18, 48, 48, 18, 0,
84, 6, 66, 24, 48, 21, 114, 6, 78, 24, 30, 30, 42, 18, 60, 0, 18, 12,
63, 9, 51, 66, 48, 15, 54, 0, 66, 60, 36, 18, 48, 0, 66, 6, 36, 30,
96, 9, 36, 30, 30, 24, 93, 24, 72, 24, 66, 0, 60, 24, 48, 30, 24, 30,
72, 6, 60, 12, 30, 12, 93, 18, 72, 0, 30, 0, 81, 30, 36, 48, 36, 30,
90, 6, 54, 24, 57, 24, 36, 0, 54, 18, 36, 24, 78, 18, 72, 33, 12, 0,
51, 30, 48, 24, 42, 0, 90, 3, 78, 30, 30, 27, 138, 6, 30, 18, 36, 24,
75, 24, 12, 0, 54, 12, 42, 18, 84, 36, 30, 18, 66, 6, 45, 36, 36, 48,
114, 0, 24, 6, 30, 21, 108, 15, 48, 18, 36, 18, 57, 24, 63, 42, 54, 0,
78, 6, 81, 36, 18, 24, 42, 18, 120, 0, 24, 24, 66, 12, 54, 0, 48, 12,
66, 18, 42, 36, 48, 18, 72, 6, 48, 48, 33, 6, 102, 0, 54, 24, 39, 54,
60, 12, 90, 18, 36, 3, 111, 24, 51, 48, 42, 0, 90, 0, 45, 36, 54, 48,
54, 24, 18, 18, 51, 18, 72, 0, 54, 0, 18, 12, 54, 36, 57, 18, 42, 18,
120, 0, 63, 42, 27, 36, 48, 0, 54, 6, 39, 30, 81, 18, 72, 33, 54, 9,
72, 12, 54, 54, 24, 0, 54, 15, 75, 24, 60, 12, 78, 6, 30, 12, 39, 54,
72, 6, 54, 0, 72, 6, 78, 12, 54, 39, 30, 15, 48, 6, 57, 48, 18, 24,
90, 0, 90, 18, 42, 24, 39, 42, 24, 30, 42, 0, 84, 6, 66, 30, 30, 0,
30, 0, 27, 42, 39, 33, 90, 24, 84, 18, 51, 36, 69, 24, 54, 0, 42, 18,
87, 33, 51, 18, 42, 9, 126, 9, 84, 36, 66, 18, 54, 0, 36, 0, 66, 12,
48, 15, 54, 30, 18, 18, 60, 18, 96, 54, 42, 0, 102, 0, 27, 36, 30, 36,
108, 15, 54, 0, 24, 36, 60, 24, 66, 0, 30, 0, 54, 15, 75, 48, 36, 18,
48, 24, 36, 36, 54, 15, 108, 0, 84, 18};
#pragma region main
/**
* main
* 共通処理
* @return signed
*/
signed main() {
long int n;
scanf("%ld", &n);
for (long int i = 1; i <= n; ++i) {
printf("%ld\n", AA[i - 1]);
}
return 0;
}
#pragma endregion
| replace | 701 | 704 | 701 | 704 | -11 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long double ld;
typedef long long ll;
const int MOD = 1000000007;
const int IINF = INT_MAX;
const ll INF = 1LL << 60;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int cnt = 0;
for (int x = 1; x * x <= n; x++) {
for (int y = 1; y * y <= n; y++) {
for (int z = 1; z * z <= n; z++) {
if (i == (x * x + y * y + z * z + x * y + y * z + z * x))
cnt++;
}
}
}
cout << cnt << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long double ld;
typedef long long ll;
const int MOD = 1000000007;
const int IINF = INT_MAX;
const ll INF = 1LL << 60;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int cnt = 0;
for (int x = 1; x <= 100; x++) {
for (int y = 1; y <= 100; y++) {
for (int z = 1; z <= 100; z++) {
int sum = x * x + y * y + z * z + x * y + y * z + z * x;
if (sum > i)
break;
if (i == sum)
cnt++;
}
}
}
cout << cnt << endl;
}
return 0;
}
| replace | 18 | 22 | 18 | 25 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
#define ld long double
#define ll long long
const int MOD = 1000000007;
const int IINF = INT_MAX;
const ll INF = 1LL << 60;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int j = 1; j <= i; j++) {
for (int k = 1; k <= i; k++) {
for (int l = 1; l <= i; l++) {
int sum = j * j + k * k + l * l + j * k + k * l + l * j;
if (sum > i)
break;
if (sum == i)
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
#define ld long double
#define ll long long
const int MOD = 1000000007;
const int IINF = INT_MAX;
const ll INF = 1LL << 60;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int j = 1; j * j <= i; j++) {
for (int k = 1; k * k <= i; k++) {
for (int l = 1; l * l <= i; l++) {
int sum = j * j + k * k + l * l + j * k + k * l + l * j;
if (sum > i)
break;
if (sum == i)
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
| replace | 19 | 22 | 19 | 22 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> vect;
int k = 3;
int product = 1, j = 1, a, b, c, i = 1;
while (product <= ((N + 10) * (N + 10))) {
product = j * j;
vect.push_back(product);
j++;
}
// cout<<vect.size()<<"\n";
vector<int> vect1(N, 0);
for (i = 0; i < vect.size(); i++) {
for (a = 1; a <= i + 1; a++) {
for (b = 1; b <= i + 1; b++) {
c = i + 1 - (a + b);
if (c > 0) {
j = vect[i] - (a * b + b * c + c * a) - 1;
if ((j < N) && (j > 0))
vect1[j]++;
}
}
}
}
for (i = 0; i < N; i++)
cout << vect1[i] << "\n";
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> vect;
int k = 3;
int product = 1, j = 1, a, b, c, i = 1;
while (product <= 10 * N) {
product = j * j;
vect.push_back(product);
j++;
}
// cout<<vect.size()<<"\n";
vector<int> vect1(N, 0);
for (i = 0; i < vect.size(); i++) {
for (a = 1; a <= i + 1; a++) {
for (b = 1; b <= i + 1; b++) {
c = i + 1 - (a + b);
if (c > 0) {
j = vect[i] - (a * b + b * c + c * a) - 1;
if ((j < N) && (j > 0))
vect1[j]++;
}
}
}
}
for (i = 0; i < N; i++)
cout << vect1[i] << "\n";
return 0;
} | replace | 9 | 10 | 9 | 10 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int func(int n) {
int cnt = 0;
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= sqrt(n); j++) {
for (int k = 1; k <= sqrt(n); k++) {
if (i * i + j * j + k * k + i * j + j * k + k * i == n)
cnt++;
}
}
}
return cnt;
}
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << func(i) << endl;
}
return 0;
}
| #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int func(int n) {
int cnt = 0;
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= i; j++) {
for (int k = 1; k <= j; k++) {
if (i * i + j * j + k * k + i * j + j * k + k * i == n) {
if (i > j && j > k)
cnt += 6;
else if (i > j && j == k)
cnt += 3;
else if (i == j && j > k)
cnt += 3;
else
cnt++;
}
}
}
}
return cnt;
}
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << func(i) << endl;
}
return 0;
}
| replace | 7 | 11 | 7 | 19 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#define ALL(vec) (vec).begin(), (vec).end()
#define ASORT(vec) sort(ALL(vec))
#define DSORT(vec) sort(ALL(vec), greater<int>());
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define YES(ans) \
if (ans) \
cout << "YES" << endl; \
else \
cout << "NO" << endl;
#define Yes(ans) \
if (ans) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
#define yes(ans) \
if (ans) \
cout << "yes" << endl; \
else \
cout << "no" << endl;
int main() {
int n, s;
cin >> n;
REP(i, n) {
s = 0;
for (int j = 0; j < 100; j++) {
for (int k = j; k < 100; k++) {
for (int l = k; l < 100; l++) {
if ((j + k + 2) * (j + k + 2) + (k + l + 2) * (k + l + 2) +
(l + j + 2) * (l + j + 2) ==
2 * (i + 1)) {
if ((j != k) && (k != l)) {
s = s + 6;
} else if ((j != k) || (k != l)) {
s = s + 3;
} else {
s = s + 1;
}
}
}
}
}
cout << s << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define FOR(i, f, t) for (int i = int(f); i <= int(t); i++)
#define RFOR(i, f, t) for (int i = int(f); i >= int(t); i--)
#define ALL(vec) (vec).begin(), (vec).end()
#define ASORT(vec) sort(ALL(vec))
#define DSORT(vec) sort(ALL(vec), greater<int>());
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define YES(ans) \
if (ans) \
cout << "YES" << endl; \
else \
cout << "NO" << endl;
#define Yes(ans) \
if (ans) \
cout << "Yes" << endl; \
else \
cout << "No" << endl;
#define yes(ans) \
if (ans) \
cout << "yes" << endl; \
else \
cout << "no" << endl;
int main() {
int n, s;
cin >> n;
REP(i, n) {
s = 0;
for (int j = 0; j < 58; j++) {
for (int k = j; k < 82; k++) {
for (int l = k; l < 100; l++) {
if ((j + k + 2) * (j + k + 2) + (k + l + 2) * (k + l + 2) +
(l + j + 2) * (l + j + 2) ==
2 * (i + 1)) {
if ((j != k) && (k != l)) {
s = s + 6;
} else if ((j != k) || (k != l)) {
s = s + 3;
} else {
s = s + 1;
}
}
}
}
}
cout << s << endl;
}
}
| replace | 34 | 36 | 34 | 36 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
// エイシングプロコン2020
// C問題
int main() {
int n;
cin >> n;
int ans[10050] = {0};
for (int i = 1; i <= n; i++) {
int v;
for (int j = 1; j * j <= n; j++) {
for (int k = 1; k * k <= n; k++) {
for (int l = 1; l * l <= n; l++) {
v = j * j + k * k + l * l + j * k + k * l + l * j;
if (v == i) {
ans[v] += 1;
}
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
} | #include <iostream>
using namespace std;
// エイシングプロコン2020
// C問題
int main() {
int n;
cin >> n;
int ans[10050] = {0};
int v;
for (int i = 1; i <= 105; i++) {
for (int j = 1; j <= 105; j++) {
for (int k = 1; k <= 105; k++) {
v = i * i + j * j + k * k + i * j + j * k + k * i;
if (v < 10050) {
ans[v] += 1;
}
}
}
}
for (int i = 1; i <= n; i++) {
cout << ans[i] << endl;
}
return 0;
} | replace | 8 | 17 | 8 | 15 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string.h>
#include <string>
using namespace std;
void c_xys_triplets(void) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i < 6) {
cout << 0 << endl;
continue;
}
int max = (i + 3) / 6;
int cnt = 0;
for (int a = 1; a <= max; a++) {
if (a * a > i)
break;
for (int b = 1; b <= max; b++) {
if ((a * a + b * b) > i)
break;
for (int c = 1; c <= max; c++) {
if (a * a + b * b + c * c + a * b + b * c + c * a == i) {
cnt++;
break;
}
}
}
}
cout << cnt << endl;
}
}
int main() {
c_xys_triplets();
return 0;
} | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string.h>
#include <string>
using namespace std;
void c_xys_triplets(void) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i < 6) {
cout << 0 << endl;
continue;
}
int max = (i + 3) / 6;
int cnt = 0;
for (int a = 1; a <= max; a++) {
if (a * a > i)
break;
for (int b = 1; b <= max; b++) {
if ((a * a + b * b) > i)
break;
// for (int c = 1; c <= max; c++) {
// if (a *a + b*b + c*c + a * b + b * c + c * a == i) {
// cnt++;
// break;
// }
// }
int remain = i - a * a - a * b - b * b;
if (remain < 0)
break;
int l = int(sqrt(double(remain)));
for (int c = 1; c <= l; c++) {
if (c * c + a * c + b * c == remain) {
cnt++;
break;
}
}
}
}
cout << cnt << endl;
}
}
int main() {
c_xys_triplets();
return 0;
} | replace | 24 | 26 | 24 | 36 | TLE | |
p02608 | C++ | Runtime Error | /// in the name of ALLAH
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
/// pre calculate
int ar[10005];
int mx = 10000;
memset(ar, 0, sizeof(ar));
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= sqrt(n); j++) {
for (int k = 1; k <= sqrt(n); k++) {
ll p = i * i + j * j + k * k + i * j + j * k + k * i;
ar[p]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ar[i] << endl;
}
| /// in the name of ALLAH
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
/// pre calculate
int ar[10005];
int mx = 10000;
memset(ar, 0, sizeof(ar));
for (int i = 1; i <= sqrt(n); i++) {
for (int j = 1; j <= sqrt(n); j++) {
for (int k = 1; k <= sqrt(n); k++) {
ll p = i * i + j * j + k * k + i * j + j * k + k * i;
if (p <= n)
ar[p]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ar[i] << endl;
}
| replace | 15 | 16 | 15 | 17 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;
const int INF32 = 1 << 30;
const ll INF64 = 1LL << 60;
void solve() {
int n;
cin >> n;
vector<int> a(4e4, 0);
for (int x = 1; x <= sqrt(n); x++) {
for (int y = 1; y <= sqrt(n); y++)
for (int z = 1; z <= sqrt(n); z++)
a[x * x + y * y + z * z + x * y + y * z + x * z]++;
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
}
| #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;
const int INF32 = 1 << 30;
const ll INF64 = 1LL << 60;
void solve() {
int n;
cin >> n;
vector<int> a(2e5, 0);
for (int x = 1; x <= sqrt(n); x++) {
for (int y = 1; y <= sqrt(n); y++)
for (int z = 1; z <= sqrt(n); z++)
a[x * x + y * y + z * z + x * y + y * z + x * z]++;
}
for (int i = 1; i <= n; i++) {
cout << a[i] << endl;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
} | replace | 18 | 19 | 18 | 19 | 0 | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<int> ans(N);
for (int x = 1; x * x <= N; x++) {
for (int y = 1; y * y <= N; y++) {
for (int z = 1; z * z <= N; z++) {
ans[x * x + y * y + z * z + x * y + y * z + z * x - 1]++;
}
}
}
rep(i, N) cout << ans[i] << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<int> ans(N);
for (int x = 1; x * x <= N; x++) {
for (int y = 1; y * y <= N; y++) {
for (int z = 1; z * z <= N; z++) {
int calc = x * x + y * y + z * z + x * y + y * z + z * x;
if (calc <= N) {
ans[calc - 1]++;
}
}
}
}
rep(i, N) cout << ans[i] << endl;
return 0;
} | replace | 14 | 15 | 14 | 18 | -6 | malloc(): corrupted top size
|
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
vector<int> x(10000);
int main() {
int n, a = 0;
cin >> n;
if (n % 3 == 0) {
a = n / 3;
} else {
a = n / 3 + 1;
}
int z = sqrt(a) + 1;
for (int i = 1; i <= a; i++) {
for (int j = 1; j <= a; ++j) {
for (int k = 1; k <= a; ++k) {
if (i * i + j * j + k * k + i * j + i * k + j * k <= n) {
x[i * i + j * j + k * k + i * j + i * k + j * k - 1]++;
}
}
}
}
for (int i = 0; i < n; ++i) {
cout << x[i] << endl;
}
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
vector<int> x(10000);
int main() {
int n, a = 0;
cin >> n;
for (int i = 1; i <= 99; i++) {
for (int j = 1; j <= 99; ++j) {
for (int k = 1; k <= 99; ++k) {
if (i * i + j * j + k * k + i * j + i * k + j * k <= n) {
x[i * i + j * j + k * k + i * j + i * k + j * k - 1]++;
}
}
}
}
for (int i = 0; i < n; ++i) {
cout << x[i] << endl;
}
} | replace | 9 | 18 | 9 | 12 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int s = 1; s <= n; s++) {
int count = 0;
for (int i = 1; i <= sqrt(s); i++) {
for (int j = 1; j < sqrt(s); j++) {
for (int k = 1; k < sqrt(s); k++) {
if ((i * i) + (j * j) + (k * k) + (i * j) + (j * k) + (k * i) == s) {
count++;
}
}
}
}
cout << count << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int s = 1; s <= n; s++) {
int count = 0;
for (int i = 1; i <= sqrt(s); i++) {
for (int j = 1; j < sqrt(s); j++) {
for (int k = 1; k < sqrt(s); k++) {
if ((i * i) + (j * j) + (k * k) + (i * j) + (j * k) + (k * i) == s) {
count++;
} else if ((i * i) + (j * j) + (k * k) + (i * j) + (j * k) + (k * i) >
s) {
break;
}
}
}
}
cout << count << endl;
}
return 0;
}
| insert | 14 | 14 | 14 | 17 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
int main() {
int N;
cin >> N;
vector<ll> ret(N + 1, 0);
for (ll x = 1; x * x <= N; x++) {
for (ll y = 1; y * y <= N; y++) {
for (ll z = 1; z * z <= N; z++) {
ll res = x * x + y * y + z * z + x * y + y * z + z * x;
ret[res]++;
}
}
}
REP(i, 1, N + 1) { cout << ret[i] << endl; }
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
int main() {
int N;
cin >> N;
vector<ll> ret(N + 1, 0);
for (ll x = 1; x * x <= N; x++) {
for (ll y = 1; y * y <= N; y++) {
for (ll z = 1; z * z <= N; z++) {
ll res = x * x + y * y + z * z + x * y + y * z + z * x;
if (res <= N)
ret[res]++;
}
}
}
REP(i, 1, N + 1) { cout << ret[i] << endl; }
return 0;
}
| replace | 21 | 22 | 21 | 23 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <iostream>
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int N;
std::cin >> N;
int f;
for (int n = 1; n <= N; ++n) {
f = 0;
for (int x = 1; x * x < N; ++x) {
for (int y = 1; y * y < N - x * x; ++y) {
for (int z = 1; z * z < N - x * x - y * y; ++z) {
if (x * x + y * y + z * z + x * y + y * z + z * x == n) {
++f;
}
}
}
}
std::cout << f << std::endl;
}
return 0;
}
| #include <iostream>
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int N;
std::cin >> N;
int f;
for (int n = 1; n <= N; ++n) {
f = 0;
for (int x = 1; x * x < n; ++x) {
for (int y = 1; y * y < n - x * x - x * y; ++y) {
for (int z = 1; z * z <= n - x * x - y * y - x * y - y * z - z * x;
++z) {
if (x * x + y * y + z * z + x * y + y * z + z * x == n) {
++f;
}
}
}
}
std::cout << f << std::endl;
}
return 0;
} | replace | 12 | 15 | 12 | 16 | TLE | |
p02608 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define cinf(n, x) \
for (int i = 0; i < (n); i++) \
cin >> x[i];
#define ft first
#define sc second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(), (v).end()
#define LB(a, x) lb(all(a), x) - a.begin()
#define UB(a, x) ub(all(a), x) - a.begin()
#define mod 1000000007
#define FS fixed << setprecision(15)
using namespace std;
typedef long long ll;
const double pi = 3.141592653589793;
template <class T> using V = vector<T>;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
typedef unsigned long long ull;
typedef long double ldouble;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
const ll INF = 1e18;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
set<ll> st;
V<ll> mp(n + 2, 0);
for (ll i = 1; i <= n; i++) {
for (ll j = 1; j <= n; j++) {
for (ll k = 1; k <= n; k++) {
if (n >= i * i + j * j + k * k + i * j + j * k + k * i) {
ll m = i * i + j * j + k * k + i * j + j * k + k * i;
mp[m]++;
}
}
}
}
for (ll i = 1; i <= n; i++)
cout << mp[i] << '\n';
}
// ペナルティ出しても焦らない ACできると信じろ!!!
// どうしてもわからないときはサンプルで実験 何か見えてくるかも
// 頭で考えてダメなら紙におこせ!!
/*
V,P(大文字)使用不可
乗算などの際にオーバーフローに注意せよ!
(適切にmodをとれ にぶたんで途中で切り上げろ)
制約をよく読め!
{
・全探索できるなら全探索しろ
・異常な制約ならそこに注目
}
stringの計算量(扱い)注意
コーナー注意!(特に数値が小さいものについては要検証)
N行出力のときは'¥n'
グリッド上では行先が範囲内におさまるかif文で確認(RE注意)
if文ではちゃんと比較演算子==を使え('='でもエラー出ない)
配列(vector)の大きさが0か1以上かで場合分けせよ(RE注意)
(vector<int> a(m)でm==0というものはできない)
modはなるべく最後に取れ!
doubleを扱うときには(abs)ではなく'fabs'!!!
*/ | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define cinf(n, x) \
for (int i = 0; i < (n); i++) \
cin >> x[i];
#define ft first
#define sc second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(), (v).end()
#define LB(a, x) lb(all(a), x) - a.begin()
#define UB(a, x) ub(all(a), x) - a.begin()
#define mod 1000000007
#define FS fixed << setprecision(15)
using namespace std;
typedef long long ll;
const double pi = 3.141592653589793;
template <class T> using V = vector<T>;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
typedef unsigned long long ull;
typedef long double ldouble;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
const ll INF = 1e18;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
set<ll> st;
V<ll> mp(n + 2, 0), a;
// for(ll i=1;i*i<=n;i++)a.push_back()
for (ll i = 1; i * i <= n; i++) {
for (ll j = 1; j * j <= n; j++) {
for (ll k = 1; k * k <= n; k++) {
if (n >= i * i + j * j + k * k + i * j + j * k + k * i) {
ll m = i * i + j * j + k * k + i * j + j * k + k * i;
mp[m]++;
}
}
}
}
for (ll i = 1; i <= n; i++)
cout << mp[i] << '\n';
}
// ペナルティ出しても焦らない ACできると信じろ!!!
// どうしてもわからないときはサンプルで実験 何か見えてくるかも
// 頭で考えてダメなら紙におこせ!!
/*
V,P(大文字)使用不可
乗算などの際にオーバーフローに注意せよ!
(適切にmodをとれ にぶたんで途中で切り上げろ)
制約をよく読め!
{
・全探索できるなら全探索しろ
・異常な制約ならそこに注目
}
stringの計算量(扱い)注意
コーナー注意!(特に数値が小さいものについては要検証)
N行出力のときは'¥n'
グリッド上では行先が範囲内におさまるかif文で確認(RE注意)
if文ではちゃんと比較演算子==を使え('='でもエラー出ない)
配列(vector)の大きさが0か1以上かで場合分けせよ(RE注意)
(vector<int> a(m)でm==0というものはできない)
modはなるべく最後に取れ!
doubleを扱うときには(abs)ではなく'fabs'!!!
*/ | replace | 47 | 51 | 47 | 52 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define rep(i, j) for (int i = 0; i < j; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using ull = unsigned long long;
ll gcd(ll x, ll y);
int fac(ll n, vector<int> num);
const int INF = 1001001001;
// mint�p�̒萔 (10��9��)
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x += a.x) >= mod)
x -= mod;
return *this;
}
mint &operator-=(const mint a) {
if ((x += mod - a.x) >= mod)
x -= mod;
return *this;
}
mint &operator*=(const mint a) {
(x *= a.x) %= mod;
return *this;
}
mint operator+(const mint a) const { return mint(*this) += a; }
mint operator-(const mint a) const { return mint(*this) -= a; }
mint operator*(const mint a) const { return mint(*this) *= a; }
mint pow(ll t) const {
if (!t)
return 1;
mint a = pow(t >> 1);
a *= a;
if (t & 1)
a *= *this;
return a;
}
// for prime mod
mint inv() const { return pow(mod - 2); }
mint &operator/=(const mint a) { return *this *= a.inv(); }
mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream &operator>>(istream &is, const mint &a) { return is >> a.x; }
ostream &operator<<(ostream &os, const mint &a) { return os << a.x; }
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int j = 1; j < sqrt(i); j++) {
for (int k = 1; k < sqrt(i); k++) {
for (int l = 1; l < sqrt(i); l++) {
if (j * j + k * k + l * l + j * k + k * l + l * j == i) {
ans++;
break;
}
}
}
}
cout << ans << endl;
}
return 0;
}
/*���C�u�����ő����*/
// ���[�O���b�h�̌ݏ��@
ll gcd(ll x, ll y) {
ll num[3];
num[0] = (x > y) ? x : y;
num[1] = (x <= y) ? x : y;
num[2] = num[0] % num[1];
while (num[2]) {
num[0] = num[1];
num[1] = num[2];
num[2] = num[0] % num[1];
}
return num[1];
}
/*�f��������*/
// ���색�C�u����
int fac(ll n, vector<int> num) {
ll kazu = n;
for (int i = 2; i <= sqrt(n); i++) {
while (1) {
if (kazu % i != 0)
break;
kazu /= i;
num[i]++;
}
}
if (kazu == n && n != 1)
return 1;
int ans = 0;
if (kazu != 1)
ans++;
for (int i = 2; i <= sqrt(n); i++) {
for (int j = 1; j <= num[i]; j++) {
num[i] -= j;
ans++;
}
}
return ans;
} | #include "bits/stdc++.h"
#define rep(i, j) for (int i = 0; i < j; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using ull = unsigned long long;
ll gcd(ll x, ll y);
int fac(ll n, vector<int> num);
const int INF = 1001001001;
// mint�p�̒萔 (10��9��)
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x += a.x) >= mod)
x -= mod;
return *this;
}
mint &operator-=(const mint a) {
if ((x += mod - a.x) >= mod)
x -= mod;
return *this;
}
mint &operator*=(const mint a) {
(x *= a.x) %= mod;
return *this;
}
mint operator+(const mint a) const { return mint(*this) += a; }
mint operator-(const mint a) const { return mint(*this) -= a; }
mint operator*(const mint a) const { return mint(*this) *= a; }
mint pow(ll t) const {
if (!t)
return 1;
mint a = pow(t >> 1);
a *= a;
if (t & 1)
a *= *this;
return a;
}
// for prime mod
mint inv() const { return pow(mod - 2); }
mint &operator/=(const mint a) { return *this *= a.inv(); }
mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream &operator>>(istream &is, const mint &a) { return is >> a.x; }
ostream &operator<<(ostream &os, const mint &a) { return os << a.x; }
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int j = 1; j < sqrt(i); j++) {
for (int k = 1; k < sqrt(i); k++) {
int ok = 1, ng = sqrt(i) + 1;
while (ng - ok > 1) {
int mid = (ok + ng) / 2;
if (j * j + k * k + mid * mid + j * k + j * mid + k * mid <= i)
ok = mid;
else
ng = mid;
}
if (j * j + k * k + ok * ok + j * k + j * ok + k * ok == i) {
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
/*���C�u�����ő����*/
// ���[�O���b�h�̌ݏ��@
ll gcd(ll x, ll y) {
ll num[3];
num[0] = (x > y) ? x : y;
num[1] = (x <= y) ? x : y;
num[2] = num[0] % num[1];
while (num[2]) {
num[0] = num[1];
num[1] = num[2];
num[2] = num[0] % num[1];
}
return num[1];
}
/*�f��������*/
// ���색�C�u����
int fac(ll n, vector<int> num) {
ll kazu = n;
for (int i = 2; i <= sqrt(n); i++) {
while (1) {
if (kazu % i != 0)
break;
kazu /= i;
num[i]++;
}
}
if (kazu == n && n != 1)
return 1;
int ans = 0;
if (kazu != 1)
ans++;
for (int i = 2; i <= sqrt(n); i++) {
for (int j = 1; j <= num[i]; j++) {
num[i] -= j;
ans++;
}
}
return ans;
} | replace | 63 | 68 | 63 | 73 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
for (int i = 1; i <= N; i++) {
int ans = 0;
for (int x = 1; x * x <= i; x++) {
for (int y = 1; x * x + y * y <= i; y++) {
for (int z = 1; x * x + y * y + z * z <= i; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
ans++;
}
}
}
}
cout << ans << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
for (int i = 1; i <= N; i++) {
int ans = 0;
for (int x = 1; x * x <= i; x++) {
for (int y = 1; x * x + y * y <= i; y++) {
// for (int z = 1; x * x + y * y + z * z <= i; z++) {
// if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
// ans++;
// }
// }
int D = (x + y) * (x + y) - 4 * (-i + x * x + y * y + x * y);
if (D == 0) {
double z = -(x + y) / 2.0;
ans += floor(z) == ceil(z) && z > 0 ? 1 : 0;
} else if (D > 0) {
double z = (-(x + y) + sqrt(D)) / 2.0;
ans += floor(z) == ceil(z) && z > 0 ? 1 : 0;
z = (-(x + y) - sqrt(D)) / 2.0;
ans += floor(z) == ceil(z) && z > 0 ? 1 : 0;
}
}
}
cout << ans << endl;
}
return 0;
} | replace | 10 | 14 | 10 | 24 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define M 1000000007
void solve() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int count = 0;
for (int j = 1; j * j <= i; j++) {
for (int k = 1; k * k <= i; k++) {
for (int l = 1; l * l <= i; l++) {
if (j * j + k * k + l * l + j * l + j * k + k * l == i)
count++;
}
}
}
cout << count << "\n";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
solve();
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define M 1000000007
void solve() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int count = 0;
for (int j = 1; j * j <= i; j++) {
for (int k = j; k * k <= i; k++) {
for (int l = k; l * l <= i; l++) {
if (j * j + k * k + l * l + j * l + j * k + k * l == i) {
if (j == k && k == l)
count++;
else if (j == k || k == l || j == l)
count += 3;
else
count += 6;
}
}
}
}
cout << count << "\n";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
solve();
return 0;
} | replace | 11 | 15 | 11 | 21 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
signed main() {
int n, ans, date[10000] = {};
int x = 1, y = 1, z = 1;
cin >> n;
for (int i = 1; i <= (int)sqrt(n); i++) {
for (int j = 1; j <= (int)sqrt(n); j++) {
for (int k = 1; k <= (int)sqrt(n); k++) {
date[i * i + j * j + k * k + (i * j) + (i * k) + (j * k)]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << date[i] << "\n";
}
} | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
signed main() {
int n, ans, date[100000] = {};
int x = 1, y = 1, z = 1;
cin >> n;
for (int i = 1; i <= (int)sqrt(n); i++) {
for (int j = 1; j <= (int)sqrt(n); j++) {
for (int k = 1; k <= (int)sqrt(n); k++) {
date[i * i + j * j + k * k + (i * j) + (i * k) + (j * k)]++;
}
}
}
for (int i = 1; i <= n; i++) {
cout << date[i] << "\n";
}
} | replace | 4 | 5 | 4 | 5 | 0 | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
const double PI = acos(-1);
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = ll(1e9 + 7);
const ll INF = ll(1e18) + 7;
// repetition
#define REP(i, n) for (ll i = 0; i < n; i++)
#define RREP(i, n) for (ll i = n; i != 0; i--)
#define FOR(i, l, r) for (size_t i = (l); i < (r); ++i)
ll gcd(ll a, ll b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
ll lcm(ll a, ll b) { return (a * b / gcd(a, b)); }
unsigned getDigit(unsigned num) {
unsigned digit = 0;
while (num != 0) {
num /= 10;
digit++;
}
return digit;
}
unsigned binarySearch(ll target, ll max, ll min) {
while ((max - min) > 1) {
if ((max + min) / 2 > target) {
max = (max + min) / 2;
min = min;
} else {
max = max;
min = (max + min) / 2;
}
}
}
void f(int rest, string s) {
char abc[] = "abc";
if (rest == 0) {
cout << s << endl;
} else {
for (int i = 0; i < 3; i++) {
f(rest - 1, s + abc[i]);
}
}
}
/*
int main() {
// n,m->size, k-> value
// vector<vector<ll>> a(n ,vector<ll>(m, k));
// vector
// vector<ll> s(n,0);
// vector<vector<ll>> v;
// map<ll,ll> m;
// priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>
pq;
// vector<pair<ll, ll>> epv(n, {0, 0});
// vector<vector<char>> v(h, vector<char>(w));
for(auto&& m: em) {
epv.push_back({ m.second, m.first });
}
ll n, k, a;
cin >> n >> k;
vector<ll> vp;
vector<ll> vn;
ll c = 0;
REP(i, n) {
cin >> a;
if(a >= 0 ) vp.push_back(a);
else vn.push_back(a);
}
sort(vp.begin(), vp.end());
sort(vn.begin(), vn.end());
ll ps = vp.size();
ll ns = vn.size();
cout << "k: " << k << endl;
cout << "ps: " << ps << endl;
cout << "ns: " << ns << endl;
if(k < ps * ns) {
ll m = k%ns;
ll d = k - (m+1);
cout << vn[m] * vp[d] << endl;
}else {
ll kd = k - ps*ns;
ll md = kd%ps;
ll dd = kd - md;
ll s = 0;
REP(i, ps) {
s = s+(ps-i-1);
cout << "s: " << s << endl;
cout << "kd: " << kd << endl;
cout << "s: " << s << endl;
cout << "kd: " << kd << endl;
cout << "i: " << i << endl;
if(s > kd) {
cout << "vp[i]: " << vp[i] << endl;
cout << "vp[ps-i]: " << vp[s-kd+i-1] << endl;
cout << vp[i] * vp[s-kd+i-1] << endl;
break;
}
}
}
}
ll h, w;
vector<vector<char>> v;
vector<ll> dx = {-1, 0, 1, 0};
vector<ll> dy = {0, -1, 0, 1};
ll bfs(ll ox, ll oy) {
vector<vector<ll>> vd(h, vector<ll>(w, -1));
queue<pair<ll, ll>> q;
q.push({ox, oy});
vd[oy][ox] = 0;
ll res = 0;
while(!q.empty()) {
pair<ll, ll> vn = q.front();
q.pop();
res = max(res, vd[vn.second][vn.first]);
for(ll i = 0; i < 4; i++){
ll nx = vn.first +dx[i];
ll ny = vn.second + dy[i];
if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
if(v[ny][nx] == '#') continue;
if(vd[ny][nx] == -1) {
vd[ny][nx] = res + 1;
q.push({nx, ny});
}
}
}
return res;
}
bool kai(string s) {
bool flg = true;
ll n = s.size();
for(ll i=0; i<n/2; i++) {
if(s[i] == s[n-1 -i]){
flg = true;
} else {
flg = false;
break;
}
}
return flg;
}
*/
struct UnionFind {
vector<ll> par;
map<ll, ll> s;
UnionFind(ll n) : par(n) {
REP(i, n) {
par[i] = i;
s[i]++;
}
}
ll root(ll x) {
if (par[x] == x)
return x;
return root(par[x]);
}
void unite(ll x, ll y) {
ll rx = root(x);
ll ry = root(y);
if (rx == ry)
return;
if (size(rx) > size(ry)) {
s[rx] = s[rx] + s[ry];
par[root(y)] = rx;
} else {
s[ry] = s[ry] + s[rx];
par[root(x)] = ry;
}
}
bool same(ll x, ll y) { return root(x) == root(y); }
ll size(ll x) { return s[root(x)]; }
};
// base^{exp}%mod
ll mod_pow(ll base, ll exp, ll mod) {
if (exp == 1)
return base % mod;
if (exp % 2 == 1)
return (base * mod_pow(base, exp - 1, mod)) % mod;
ll t = mod_pow(base, exp / 2, mod);
return (t * t) % mod;
}
// nPr
ll mod_permutation(ll n, ll r) {
ll t = 1;
while (r != 0) {
t = (t % MOD) * (n % MOD);
n--;
r--;
}
return t;
}
ll mod_factorial(ll r) {
ll v = 1;
while (r != 0) {
v = (v % MOD) * (r % MOD);
r--;
}
return v;
}
vector<ll> prime_factorization(ll n) {
vector<ll> P;
ll nn = sqrt(n) + 2;
vector<ll> prime(nn + 1, true);
for (ll i = 2; i <= nn; i++) {
if (prime[i]) {
for (ll j = 2 * i; j <= nn; j += i) {
prime[j] = false;
}
P.emplace_back(i);
}
}
vector<ll> d;
REP(i, P.size()) {
while (n % P[i] == 0) {
d.push_back(P[i]);
n /= P[i];
}
}
if (n > nn)
d.push_back(n);
return d;
}
vector<ll> sieve(ll n) {
vector<ll> prime(n, true);
prime[0] = false;
prime[1] = false;
for (ll i = 2; i < n; i++) {
if (prime[i]) {
for (ll j = 2 * i; j < n; j++) {
if (j % i == 0)
prime[j] = false;
}
}
}
return prime;
}
bool is_prime(ll n) {
ll nn = sqrt(n) + 2;
vector<ll> prime(nn + 1, true);
if (n % 2 == 0) {
return false;
}
vector<ll> primes = sieve(nn);
REP(i, primes.size()) {
if (n % primes[i] == 0) {
return false;
}
}
return true;
}
struct Node {
vector<ll> edges;
vector<ll> costs;
bool done;
ll cost;
friend bool operator<(const Node &lhs, const Node &rhs) {
return rhs.cost < lhs.cost;
}
};
ll mod_conb(ll n, ll r, ll mod) {
return (mod_factorial(n) / mod_factorial(n - r) / mod_factorial(r)) % mod;
}
vector<vector<ll>> vv;
ll c = 0;
vector<ll> v;
ll n, m, q;
// indexからmまでのn桁の数列の列挙
void dfs2(ll index, ll count) {
if (count < n) {
for (ll i = index; i <= m; i++) {
v[count] = i;
dfs2(i, count + 1);
}
} else {
vv.push_back(v);
}
}
ll total(vector<ll> v) {
ll t = 0;
REP(i, v.size()) { t += v[i]; }
return t;
}
// vector<ll> dx = {-1, 0, 1, 0};
// vector<ll> dy = {0, -1, 0, 1};
// void dfs(ll oy, ll ox, ll color) {
// hw[oy][ox] = color;
// seen[oy][ox] = true;
// for(ll i = 0; i < 4; i++){
// ll ny = oy + dy[i];
// ll nx = ox + dx[i];
// if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
// if(seen[ny][nx] == false) {
// ll co = qa.top();
// qa.pop();
// dfs(ny, nx, co);
// }
// }
// }
// std::ifstream in("sub1_06.txt");
// std::cin.rdbuf(in.rdbuf());
/*
ll bfs(ll ox, ll oy) {
vector<vector<ll>> vd(h, vector<ll>(w, -1));
queue<pair<ll, ll>> q;
q.push({ox, oy});
vd[oy][ox] = 0;
ll res = 0;
while(!q.empty()) {
pair<ll, ll> vn = q.front();
q.pop();
res = max(res, vd[vn.second][vn.first]);
for(ll i = 0; i < 4; i++){
ll nx = vn.first +dx[i];
ll ny = vn.second + dy[i];
if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
if(v[ny][nx] == '#') continue;
if(vd[ny][nx] == -1) {
vd[ny][nx] = res + 1;
q.push({nx, ny});
}
}
}
return res;
}
*/
vector<ll> llvec(ll n) {
vector<ll> c(n, 0);
REP(i, n) { cin >> c[i]; }
return c;
}
int main() {
// std::ifstream in("01-Handmade-00");
// std::cin.rdbuf(in.rdbuf());
ll n;
cin >> n;
vector<ll> t(n, 0);
for (ll x = 1; x < 101; x++) {
for (ll y = 1; y < 101; y++) {
for (ll z = 1; z < 101; z++) {
ll v = x * x + y * y + z * z + x * y + y * z + z * x;
t[v]++;
}
}
}
for (ll i = 1; i < n + 1; i++) {
cout << t[i] << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
const double PI = acos(-1);
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = ll(1e9 + 7);
const ll INF = ll(1e18) + 7;
// repetition
#define REP(i, n) for (ll i = 0; i < n; i++)
#define RREP(i, n) for (ll i = n; i != 0; i--)
#define FOR(i, l, r) for (size_t i = (l); i < (r); ++i)
ll gcd(ll a, ll b) {
if (a % b == 0) {
return (b);
} else {
return (gcd(b, a % b));
}
}
ll lcm(ll a, ll b) { return (a * b / gcd(a, b)); }
unsigned getDigit(unsigned num) {
unsigned digit = 0;
while (num != 0) {
num /= 10;
digit++;
}
return digit;
}
unsigned binarySearch(ll target, ll max, ll min) {
while ((max - min) > 1) {
if ((max + min) / 2 > target) {
max = (max + min) / 2;
min = min;
} else {
max = max;
min = (max + min) / 2;
}
}
}
void f(int rest, string s) {
char abc[] = "abc";
if (rest == 0) {
cout << s << endl;
} else {
for (int i = 0; i < 3; i++) {
f(rest - 1, s + abc[i]);
}
}
}
/*
int main() {
// n,m->size, k-> value
// vector<vector<ll>> a(n ,vector<ll>(m, k));
// vector
// vector<ll> s(n,0);
// vector<vector<ll>> v;
// map<ll,ll> m;
// priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>
pq;
// vector<pair<ll, ll>> epv(n, {0, 0});
// vector<vector<char>> v(h, vector<char>(w));
for(auto&& m: em) {
epv.push_back({ m.second, m.first });
}
ll n, k, a;
cin >> n >> k;
vector<ll> vp;
vector<ll> vn;
ll c = 0;
REP(i, n) {
cin >> a;
if(a >= 0 ) vp.push_back(a);
else vn.push_back(a);
}
sort(vp.begin(), vp.end());
sort(vn.begin(), vn.end());
ll ps = vp.size();
ll ns = vn.size();
cout << "k: " << k << endl;
cout << "ps: " << ps << endl;
cout << "ns: " << ns << endl;
if(k < ps * ns) {
ll m = k%ns;
ll d = k - (m+1);
cout << vn[m] * vp[d] << endl;
}else {
ll kd = k - ps*ns;
ll md = kd%ps;
ll dd = kd - md;
ll s = 0;
REP(i, ps) {
s = s+(ps-i-1);
cout << "s: " << s << endl;
cout << "kd: " << kd << endl;
cout << "s: " << s << endl;
cout << "kd: " << kd << endl;
cout << "i: " << i << endl;
if(s > kd) {
cout << "vp[i]: " << vp[i] << endl;
cout << "vp[ps-i]: " << vp[s-kd+i-1] << endl;
cout << vp[i] * vp[s-kd+i-1] << endl;
break;
}
}
}
}
ll h, w;
vector<vector<char>> v;
vector<ll> dx = {-1, 0, 1, 0};
vector<ll> dy = {0, -1, 0, 1};
ll bfs(ll ox, ll oy) {
vector<vector<ll>> vd(h, vector<ll>(w, -1));
queue<pair<ll, ll>> q;
q.push({ox, oy});
vd[oy][ox] = 0;
ll res = 0;
while(!q.empty()) {
pair<ll, ll> vn = q.front();
q.pop();
res = max(res, vd[vn.second][vn.first]);
for(ll i = 0; i < 4; i++){
ll nx = vn.first +dx[i];
ll ny = vn.second + dy[i];
if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
if(v[ny][nx] == '#') continue;
if(vd[ny][nx] == -1) {
vd[ny][nx] = res + 1;
q.push({nx, ny});
}
}
}
return res;
}
bool kai(string s) {
bool flg = true;
ll n = s.size();
for(ll i=0; i<n/2; i++) {
if(s[i] == s[n-1 -i]){
flg = true;
} else {
flg = false;
break;
}
}
return flg;
}
*/
struct UnionFind {
vector<ll> par;
map<ll, ll> s;
UnionFind(ll n) : par(n) {
REP(i, n) {
par[i] = i;
s[i]++;
}
}
ll root(ll x) {
if (par[x] == x)
return x;
return root(par[x]);
}
void unite(ll x, ll y) {
ll rx = root(x);
ll ry = root(y);
if (rx == ry)
return;
if (size(rx) > size(ry)) {
s[rx] = s[rx] + s[ry];
par[root(y)] = rx;
} else {
s[ry] = s[ry] + s[rx];
par[root(x)] = ry;
}
}
bool same(ll x, ll y) { return root(x) == root(y); }
ll size(ll x) { return s[root(x)]; }
};
// base^{exp}%mod
ll mod_pow(ll base, ll exp, ll mod) {
if (exp == 1)
return base % mod;
if (exp % 2 == 1)
return (base * mod_pow(base, exp - 1, mod)) % mod;
ll t = mod_pow(base, exp / 2, mod);
return (t * t) % mod;
}
// nPr
ll mod_permutation(ll n, ll r) {
ll t = 1;
while (r != 0) {
t = (t % MOD) * (n % MOD);
n--;
r--;
}
return t;
}
ll mod_factorial(ll r) {
ll v = 1;
while (r != 0) {
v = (v % MOD) * (r % MOD);
r--;
}
return v;
}
vector<ll> prime_factorization(ll n) {
vector<ll> P;
ll nn = sqrt(n) + 2;
vector<ll> prime(nn + 1, true);
for (ll i = 2; i <= nn; i++) {
if (prime[i]) {
for (ll j = 2 * i; j <= nn; j += i) {
prime[j] = false;
}
P.emplace_back(i);
}
}
vector<ll> d;
REP(i, P.size()) {
while (n % P[i] == 0) {
d.push_back(P[i]);
n /= P[i];
}
}
if (n > nn)
d.push_back(n);
return d;
}
vector<ll> sieve(ll n) {
vector<ll> prime(n, true);
prime[0] = false;
prime[1] = false;
for (ll i = 2; i < n; i++) {
if (prime[i]) {
for (ll j = 2 * i; j < n; j++) {
if (j % i == 0)
prime[j] = false;
}
}
}
return prime;
}
bool is_prime(ll n) {
ll nn = sqrt(n) + 2;
vector<ll> prime(nn + 1, true);
if (n % 2 == 0) {
return false;
}
vector<ll> primes = sieve(nn);
REP(i, primes.size()) {
if (n % primes[i] == 0) {
return false;
}
}
return true;
}
struct Node {
vector<ll> edges;
vector<ll> costs;
bool done;
ll cost;
friend bool operator<(const Node &lhs, const Node &rhs) {
return rhs.cost < lhs.cost;
}
};
ll mod_conb(ll n, ll r, ll mod) {
return (mod_factorial(n) / mod_factorial(n - r) / mod_factorial(r)) % mod;
}
vector<vector<ll>> vv;
ll c = 0;
vector<ll> v;
ll n, m, q;
// indexからmまでのn桁の数列の列挙
void dfs2(ll index, ll count) {
if (count < n) {
for (ll i = index; i <= m; i++) {
v[count] = i;
dfs2(i, count + 1);
}
} else {
vv.push_back(v);
}
}
ll total(vector<ll> v) {
ll t = 0;
REP(i, v.size()) { t += v[i]; }
return t;
}
// vector<ll> dx = {-1, 0, 1, 0};
// vector<ll> dy = {0, -1, 0, 1};
// void dfs(ll oy, ll ox, ll color) {
// hw[oy][ox] = color;
// seen[oy][ox] = true;
// for(ll i = 0; i < 4; i++){
// ll ny = oy + dy[i];
// ll nx = ox + dx[i];
// if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
// if(seen[ny][nx] == false) {
// ll co = qa.top();
// qa.pop();
// dfs(ny, nx, co);
// }
// }
// }
// std::ifstream in("sub1_06.txt");
// std::cin.rdbuf(in.rdbuf());
/*
ll bfs(ll ox, ll oy) {
vector<vector<ll>> vd(h, vector<ll>(w, -1));
queue<pair<ll, ll>> q;
q.push({ox, oy});
vd[oy][ox] = 0;
ll res = 0;
while(!q.empty()) {
pair<ll, ll> vn = q.front();
q.pop();
res = max(res, vd[vn.second][vn.first]);
for(ll i = 0; i < 4; i++){
ll nx = vn.first +dx[i];
ll ny = vn.second + dy[i];
if(nx < 0 || ny < 0 || nx >= w || ny >= h) continue;
if(v[ny][nx] == '#') continue;
if(vd[ny][nx] == -1) {
vd[ny][nx] = res + 1;
q.push({nx, ny});
}
}
}
return res;
}
*/
vector<ll> llvec(ll n) {
vector<ll> c(n, 0);
REP(i, n) { cin >> c[i]; }
return c;
}
int main() {
// std::ifstream in("01-Handmade-00");
// std::cin.rdbuf(in.rdbuf());
ll n;
cin >> n;
vector<ll> t(1000000, 0);
for (ll x = 1; x < 101; x++) {
for (ll y = 1; y < 101; y++) {
for (ll z = 1; z < 101; z++) {
ll v = x * x + y * y + z * z + x * y + y * z + z * x;
t[v]++;
}
}
}
for (ll i = 1; i < n + 1; i++) {
cout << t[i] << endl;
}
return 0;
} | replace | 414 | 415 | 414 | 415 | -11 | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
int main(void) {
int n;
long long s;
std::cin >> n;
std::vector<int> f(10100);
for (int x = 1; x <= 110; x++) {
for (int y = 1; y <= 110; y++) {
for (int z = 1; z <= 110; z++) {
s = x * x + y * y + z * z + x * y + y * z + z * x;
f.at(s - 1) += 1;
}
}
}
for (int i = 0; i < n; i++) {
std::cout << f.at(i) << std::endl;
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
int main(void) {
int n;
long long s;
std::cin >> n;
std::vector<int> f(1000500);
for (int x = 1; x <= 102; x++) {
for (int y = 1; y <= 102; y++) {
for (int z = 1; z <= 102; z++) {
s = x * x + y * y + z * z + x * y + y * z + z * x;
f.at(s - 1) += 1;
}
}
}
for (int i = 0; i < n; i++) {
std::cout << f.at(i) << std::endl;
}
return 0;
} | replace | 13 | 17 | 13 | 17 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 10202) >= this->size() (which is 10100)
|
p02608 | Python | Runtime Error | import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)
def checker():
ans = [0] * 10000
for a in range(1, 101):
for b in range(1, 101):
for c in range(1, 101):
n = a * a + b * b + c * c + a * b + b * c + c * a
if n > 10000:
continue
else:
ans[n] += 1
return ans
def main():
N = int(input().strip())
ans = checker()
for n in range(1, N + 1):
print(ans[n])
return
if __name__ == "__main__":
main()
| import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)
def checker():
ans = [0] * 10001
for a in range(1, 101):
for b in range(1, 101):
for c in range(1, 101):
n = a * a + b * b + c * c + a * b + b * c + c * a
if n > 10000:
continue
else:
ans[n] += 1
return ans
def main():
N = int(input().strip())
ans = checker()
for n in range(1, N + 1):
print(ans[n])
return
if __name__ == "__main__":
main()
| replace | 7 | 8 | 7 | 8 | IndexError: list index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02608/Python/s829430839.py", line 28, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02608/Python/s829430839.py", line 21, in main
ans = checker()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02608/Python/s829430839.py", line 15, in checker
ans[n] += 1
IndexError: list index out of range
|
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1000000007;
const double PI = acos(-1);
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int x = 1; x * x <= n; x++) {
for (int y = x; y * y <= n; y++) {
for (int z = y; z * z <= n; z++) {
int res = x * x + y * y + z * z + x * y + y * z + z * x;
if (res == i) {
if (x == y && y == z)
ans++;
else if (x != y && y != z && z != x)
ans += 6;
else
ans += 3;
}
}
}
}
cout << ans << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1000000007;
const double PI = acos(-1);
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int ans = 0;
for (int x = 1; x * x <= n; x++) {
for (int y = x; y * y <= n; y++) {
for (int z = y; z * z <= n; z++) {
int res = x * x + y * y + z * z + x * y + y * z + z * x;
if (res == i) {
if (x == y && y == z)
ans++;
else if (x != y && y != z && z != x)
ans += 6;
else
ans += 3;
} else if (i < res)
break;
}
}
}
cout << ans << endl;
}
}
| replace | 22 | 23 | 22 | 24 | TLE | |
p02608 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1001001001
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second
int main() {
int n;
cin >> n;
REP(i, n) {
int cnt = 0;
// for(int x=0; x<100; x++) for(int y=0; y<100; y++) for(int z=0;
// z<100; z++){
REP(x, n) REP(y, n) REP(z, n) {
int reg = (x + 1) * (x + 1) + (y + 1) * (y + 1) + (z + 1) * (z + 1) +
(x + 1) * (y + 1) + (y + 1) * (z + 1) + (z + 1) * (x + 1);
if (reg > i + 1)
break;
if (reg == (i + 1))
cnt++;
}
cout << cnt << endl;
}
} | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1001001001
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second
int main() {
int n;
cin >> n;
REP(i, n) {
int cnt = 0;
for (int x = 0; x < 100; x++)
for (int y = x; y < 100; y++)
for (int z = y; z < 100; z++) {
int reg = (x + 1) * (x + 1) + (y + 1) * (y + 1) + (z + 1) * (z + 1) +
(x + 1) * (y + 1) + (y + 1) * (z + 1) + (z + 1) * (x + 1);
if (reg > i + 1)
break;
if (reg == i + 1) {
if ((x == y) && (y == z) && (z == x))
cnt++;
else if ((x != y) && (y != z) && (z != x))
cnt += 6;
else
cnt += 3;
}
}
cout << cnt << endl;
}
} | replace | 22 | 33 | 22 | 38 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
const int INF = 1e9;
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
int a[10010];
int main() {
cin >> N;
rep2(i, 1, N / 3) rep2(j, 1, N / 3) rep2(k, 1, N / 3) {
A = i * (i + j);
B = j * (j + k);
C = k * (k + i);
A += B + C;
if (A <= 10000)
a[A]++;
}
rep2(i, 1, N + 1) { cout << a[i] << endl; }
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
const int INF = 1e9;
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
int a[10010];
int main() {
cin >> N;
rep2(i, 1, N / 3) rep2(j, 1, N / 3) rep2(k, 1, N / 3) {
A = i * (i + j);
B = j * (j + k);
C = k * (k + i);
A += B + C;
if (A <= 10000)
a[A]++;
else
break;
}
rep2(i, 1, N + 1) { cout << a[i] << endl; }
return 0;
} | insert | 26 | 26 | 26 | 28 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 220000
#define mod 1000000007
#define pi 3.141592653589793238
#define sin(s) scanf("%lld", &s);
#define sout(s) printf("%lld\n", s);
#define in(s) cin >> s
#define in2(a, b) cin >> a >> b
#define in3(a, b, c) cin >> a >> b >> c
#define vll vector<ll>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define endl '\n'
#define sp ' '
#define gear_change ios_base::sync_with_stdio(false), cin.tie(0)
#define nfl(i, n) for (i = 0; i < n; i++)
#define sfl(i, s, e) for (i = s; i < e; i++)
#define ufl(i, n) for (i = n - 1; i >= 0; i--)
ll power(ll x, ll y) {
ll ret = 1;
while (y > 0) {
if (y & 1)
ret = (ret * x);
y /= 2;
x = (x * x);
}
return ret;
}
vector<ll> divs(ll n) {
vector<ll> ret;
for (int i = 1; i * i <= n; i++) {
if (n % i == 0) {
if (i * i == n) {
ret.push_back(i);
} else {
ret.push_back(i);
ret.push_back(n / i);
}
}
}
return ret;
}
unordered_map<ll, ll> m;
inline ll val(ll x, ll y, ll z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
void pre() {
ll i, j, k;
sfl(i, 1, 1000) {
sfl(j, 1, 1000) {
sfl(k, 1, 1000) { m[val(i, j, k)]++; }
}
}
}
void solve() {
ll n, i, x;
cin >> n;
sfl(i, 1, n + 1) { cout << m[i] << endl; }
}
int main() {
gear_change;
ll test = 1;
pre();
// in(test);
while (test--) {
solve();
}
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 220000
#define mod 1000000007
#define pi 3.141592653589793238
#define sin(s) scanf("%lld", &s);
#define sout(s) printf("%lld\n", s);
#define in(s) cin >> s
#define in2(a, b) cin >> a >> b
#define in3(a, b, c) cin >> a >> b >> c
#define vll vector<ll>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define endl '\n'
#define sp ' '
#define gear_change ios_base::sync_with_stdio(false), cin.tie(0)
#define nfl(i, n) for (i = 0; i < n; i++)
#define sfl(i, s, e) for (i = s; i < e; i++)
#define ufl(i, n) for (i = n - 1; i >= 0; i--)
ll power(ll x, ll y) {
ll ret = 1;
while (y > 0) {
if (y & 1)
ret = (ret * x);
y /= 2;
x = (x * x);
}
return ret;
}
vector<ll> divs(ll n) {
vector<ll> ret;
for (int i = 1; i * i <= n; i++) {
if (n % i == 0) {
if (i * i == n) {
ret.push_back(i);
} else {
ret.push_back(i);
ret.push_back(n / i);
}
}
}
return ret;
}
unordered_map<ll, ll> m;
inline ll val(ll x, ll y, ll z) {
return x * x + y * y + z * z + x * y + y * z + z * x;
}
void pre() {
ll i, j, k;
sfl(i, 1, 1000) {
sfl(j, 1, 1000) {
sfl(k, 1, 1000) {
m[val(i, j, k)]++;
if (val(i, j, k) > 11000) {
break;
}
}
}
}
}
void solve() {
ll n, i, x;
cin >> n;
sfl(i, 1, n + 1) { cout << m[i] << endl; }
}
int main() {
gear_change;
ll test = 1;
pre();
// in(test);
while (test--) {
solve();
}
} | replace | 56 | 57 | 56 | 62 | TLE | |
p02608 | C++ | Runtime Error | // #pragma GCC optimize ("O3","unroll-loops")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define TEST \
{ IS_TEST = true; }
#define fi first
#define se second
#define pb(x) emplace_back(x)
#define pf(x) emplace_front(x)
#define emp(x) emplace(x)
#define mp(x, y) make_pair(x, y)
using namespace std;
using ll = int_fast64_t;
using v_b = vector<bool>;
using v_ll = vector<ll>;
using str = string;
using v_str = vector<string>;
using p_ll = pair<ll, ll>;
using vv_b = vector<v_b>;
using vv_ll = vector<v_ll>;
using vp_ll = vector<p_ll>;
using vvv_ll = vector<vv_ll>;
using vvp_ll = vector<vp_ll>;
using ld = long double;
using v_ld = vector<ld>;
using vv_ld = vector<v_ld>;
bool IS_TEST = false;
ll ll_min64 = 1LL << 63;
ll ll_max64 = ~ll_min64;
ll ll_min32 = 1LL << 31;
ll ll_max32 = ~ll_min32;
ll MOD = 1000000007;
/*displaying functions for debug*/
template <class T> void show2(const T &x) { cerr << x; }
template <class T1, class T2> void show2(const pair<T1, T2> &x) {
cerr << "{" << show2(x.first) << "," << show2(x.second) << "}";
}
template <class T> void show(const T &x) {
if (!IS_TEST)
return;
show2(x);
cerr << "\n";
}
template <class T> void v_show(const T &v, ll n = -1) {
if (!IS_TEST)
return;
auto itr = v.begin();
ll m = n;
while (itr != v.end() && m != 0) {
show2(*itr);
cerr << " ";
itr++;
m--;
}
cerr << "\n";
}
template <class T> void vv_show(const T &v, ll n = -1) {
if (!IS_TEST)
return;
cerr << "--------------------------------\n";
auto itr = v.begin();
ll m = n;
while (itr != v.end() && m != 0) {
v_show(*itr, n);
itr++;
m--;
}
cerr << "--------------------------------\n";
}
/*--------------------------------*/
/*loading integers*/
void load(ll &x1) { cin >> x1; }
void load(ll &x1, ll &x2) { cin >> x1 >> x2; }
void load(ll &x1, ll &x2, ll &x3) { cin >> x1 >> x2 >> x3; }
void load(ll &x1, ll &x2, ll &x3, ll &x4) { cin >> x1 >> x2 >> x3 >> x4; }
void v_load(ll n, v_ll &v1, ll head = 0, ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld", &v1[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, ll head = 0, ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld", &v1[i + head], &v2[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, v_ll &v3, ll head = 0, ll tail = 0,
ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
v3.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld%lld", &v1[i + head], &v2[i + head], &v3[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, v_ll &v3, v_ll &v4, ll head = 0,
ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
v3.assign(m, init);
v4.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld%lld%lld", &v1[i + head], &v2[i + head], &v3[i + head],
&v4[i + head]);
}
}
/*--------------------------------*/
v_ll local_sort(ll x1 = ll_max64, ll x2 = ll_max64, ll x3 = ll_max64,
ll x4 = ll_max64) {
v_ll x{x1, x2, x3, x4};
sort(x.begin(), x.end());
return x;
}
ll max(ll x, ll y) { return x > y ? x : y; }
ll min(ll x, ll y) { return x < y ? x : y; }
ll max(v_ll::iterator b, v_ll::iterator e) {
ll ans = *b;
while (b < e) {
ans = max(ans, *b);
b++;
}
return ans;
}
ll argmax(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0, cnt = 0, val = *b;
while (b < e) {
if (val < *b) {
ans = cnt;
val = *b;
}
cnt++;
b++;
}
return ans;
}
ll min(v_ll::iterator b, v_ll::iterator e) {
ll ans = *b;
while (b < e) {
ans = min(ans, *b);
b++;
}
return ans;
}
ll argmin(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0, cnt = 0, val = *b;
while (b < e) {
if (val > *b) {
ans = cnt;
val = *b;
}
cnt++;
b++;
}
return ans;
}
ll sum(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0;
while (b < e) {
ans += *b;
b++;
}
return ans;
}
template <class T> bool chmax(T &x, const T &y) {
if (x >= y)
return false;
x = y;
return true;
}
template <class T> bool chmin(T &x, const T &y) {
if (x <= y)
return false;
x = y;
return true;
}
template <class T> void quit(T x) {
cout << x << endl;
exit(0);
}
void yesno(bool x) { cout << (x ? "Yes" : "No") << endl; }
ll rup(ll x, ll y) { return (x - 1) / y + 1; }
ll rem(ll x, ll y) {
ll z = x % y;
return z >= 0 ? z : z + y;
}
template <typename T> v_ll index_sort(const vector<T> &ref) {
v_ll idx(ref.size());
iota(idx.begin(), idx.end(), 0);
sort(idx.begin(), idx.end(), [&](auto &x, auto &y) {
if (ref[x] < ref[y])
return true;
});
}
// setprecision(digit)
// sort(##.begin(),##.end(),[&](auto &x, auto &y){if (x<y) return true;});
// ll ok=0,ng=0; while(abs(ok-ng)>1){ll mid=(ok+ng)/2; (true?ok:ng)=mid;}
struct dat {
dat() {}
bool operator<(const dat &rhs) const { return false; }
};
int main() {
ll N;
cin >> N;
v_ll A(N + 1, 0);
for (ll i = 1; i <= 100; i++) {
for (ll j = 1; j <= 100; j++) {
for (ll k = 1; k <= 100; k++) {
A[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (ll i = 1; i <= N; i++) {
cout << A[i] << "\n";
}
}
| // #pragma GCC optimize ("O3","unroll-loops")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define TEST \
{ IS_TEST = true; }
#define fi first
#define se second
#define pb(x) emplace_back(x)
#define pf(x) emplace_front(x)
#define emp(x) emplace(x)
#define mp(x, y) make_pair(x, y)
using namespace std;
using ll = int_fast64_t;
using v_b = vector<bool>;
using v_ll = vector<ll>;
using str = string;
using v_str = vector<string>;
using p_ll = pair<ll, ll>;
using vv_b = vector<v_b>;
using vv_ll = vector<v_ll>;
using vp_ll = vector<p_ll>;
using vvv_ll = vector<vv_ll>;
using vvp_ll = vector<vp_ll>;
using ld = long double;
using v_ld = vector<ld>;
using vv_ld = vector<v_ld>;
bool IS_TEST = false;
ll ll_min64 = 1LL << 63;
ll ll_max64 = ~ll_min64;
ll ll_min32 = 1LL << 31;
ll ll_max32 = ~ll_min32;
ll MOD = 1000000007;
/*displaying functions for debug*/
template <class T> void show2(const T &x) { cerr << x; }
template <class T1, class T2> void show2(const pair<T1, T2> &x) {
cerr << "{" << show2(x.first) << "," << show2(x.second) << "}";
}
template <class T> void show(const T &x) {
if (!IS_TEST)
return;
show2(x);
cerr << "\n";
}
template <class T> void v_show(const T &v, ll n = -1) {
if (!IS_TEST)
return;
auto itr = v.begin();
ll m = n;
while (itr != v.end() && m != 0) {
show2(*itr);
cerr << " ";
itr++;
m--;
}
cerr << "\n";
}
template <class T> void vv_show(const T &v, ll n = -1) {
if (!IS_TEST)
return;
cerr << "--------------------------------\n";
auto itr = v.begin();
ll m = n;
while (itr != v.end() && m != 0) {
v_show(*itr, n);
itr++;
m--;
}
cerr << "--------------------------------\n";
}
/*--------------------------------*/
/*loading integers*/
void load(ll &x1) { cin >> x1; }
void load(ll &x1, ll &x2) { cin >> x1 >> x2; }
void load(ll &x1, ll &x2, ll &x3) { cin >> x1 >> x2 >> x3; }
void load(ll &x1, ll &x2, ll &x3, ll &x4) { cin >> x1 >> x2 >> x3 >> x4; }
void v_load(ll n, v_ll &v1, ll head = 0, ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld", &v1[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, ll head = 0, ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld", &v1[i + head], &v2[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, v_ll &v3, ll head = 0, ll tail = 0,
ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
v3.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld%lld", &v1[i + head], &v2[i + head], &v3[i + head]);
}
}
void v_load(ll n, v_ll &v1, v_ll &v2, v_ll &v3, v_ll &v4, ll head = 0,
ll tail = 0, ll init = 0) {
ll m = n + head + tail;
v1.assign(m, init);
v2.assign(m, init);
v3.assign(m, init);
v4.assign(m, init);
for (ll i = 0; i < n; i++) {
scanf("%lld%lld%lld%lld", &v1[i + head], &v2[i + head], &v3[i + head],
&v4[i + head]);
}
}
/*--------------------------------*/
v_ll local_sort(ll x1 = ll_max64, ll x2 = ll_max64, ll x3 = ll_max64,
ll x4 = ll_max64) {
v_ll x{x1, x2, x3, x4};
sort(x.begin(), x.end());
return x;
}
ll max(ll x, ll y) { return x > y ? x : y; }
ll min(ll x, ll y) { return x < y ? x : y; }
ll max(v_ll::iterator b, v_ll::iterator e) {
ll ans = *b;
while (b < e) {
ans = max(ans, *b);
b++;
}
return ans;
}
ll argmax(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0, cnt = 0, val = *b;
while (b < e) {
if (val < *b) {
ans = cnt;
val = *b;
}
cnt++;
b++;
}
return ans;
}
ll min(v_ll::iterator b, v_ll::iterator e) {
ll ans = *b;
while (b < e) {
ans = min(ans, *b);
b++;
}
return ans;
}
ll argmin(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0, cnt = 0, val = *b;
while (b < e) {
if (val > *b) {
ans = cnt;
val = *b;
}
cnt++;
b++;
}
return ans;
}
ll sum(v_ll::iterator b, v_ll::iterator e) {
ll ans = 0;
while (b < e) {
ans += *b;
b++;
}
return ans;
}
template <class T> bool chmax(T &x, const T &y) {
if (x >= y)
return false;
x = y;
return true;
}
template <class T> bool chmin(T &x, const T &y) {
if (x <= y)
return false;
x = y;
return true;
}
template <class T> void quit(T x) {
cout << x << endl;
exit(0);
}
void yesno(bool x) { cout << (x ? "Yes" : "No") << endl; }
ll rup(ll x, ll y) { return (x - 1) / y + 1; }
ll rem(ll x, ll y) {
ll z = x % y;
return z >= 0 ? z : z + y;
}
template <typename T> v_ll index_sort(const vector<T> &ref) {
v_ll idx(ref.size());
iota(idx.begin(), idx.end(), 0);
sort(idx.begin(), idx.end(), [&](auto &x, auto &y) {
if (ref[x] < ref[y])
return true;
});
}
// setprecision(digit)
// sort(##.begin(),##.end(),[&](auto &x, auto &y){if (x<y) return true;});
// ll ok=0,ng=0; while(abs(ok-ng)>1){ll mid=(ok+ng)/2; (true?ok:ng)=mid;}
struct dat {
dat() {}
bool operator<(const dat &rhs) const { return false; }
};
int main() {
ll N;
cin >> N;
v_ll A(N + 1, 0);
for (ll i = 1; i <= 100; i++) {
for (ll j = 1; j <= 100; j++) {
for (ll k = 1; k <= 100; k++) {
if (i * i + j * j + k * k + i * j + j * k + k * i <= N)
A[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (ll i = 1; i <= N; i++) {
cout << A[i] << "\n";
}
}
| replace | 247 | 248 | 247 | 249 | -11 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define INF ((i64)(1e18))
#define MOD ((i64)(1e9 + 7))
#define REP(i, n) for (i64 i = 0; i < (n); i++)
#define RREP(i, n) for (i64 i = (n)-1; i >= 0; i--)
#define RANGE(i, a, b) for (i64 i = (a); i < (b); i++)
#define RRANGE(i, a, b) for (i64 i = (b)-1; i >= (a); i--)
#define ALL(v) (v).begin(), (v).end()
#define SIZE(v) ((i64)(v).size())
template <class T> inline void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> inline void chmin(T &a, const T &b) {
if (a > b)
a = b;
}
int main() {
i64 n;
cin >> n;
RANGE(i, 1, n + 1) {
i64 ans = 0;
RANGE(x, 1, 100) {
RANGE(y, 1, 100) {
RANGE(z, 1, 100) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i)
ans++;
}
}
}
cout << ans << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define INF ((i64)(1e18))
#define MOD ((i64)(1e9 + 7))
#define REP(i, n) for (i64 i = 0; i < (n); i++)
#define RREP(i, n) for (i64 i = (n)-1; i >= 0; i--)
#define RANGE(i, a, b) for (i64 i = (a); i < (b); i++)
#define RRANGE(i, a, b) for (i64 i = (b)-1; i >= (a); i--)
#define ALL(v) (v).begin(), (v).end()
#define SIZE(v) ((i64)(v).size())
template <class T> inline void chmax(T &a, const T &b) {
if (a < b)
a = b;
}
template <class T> inline void chmin(T &a, const T &b) {
if (a > b)
a = b;
}
int main() {
i64 n;
cin >> n;
RANGE(i, 1, n + 1) {
i64 ans = 0;
RANGE(x, 1, 99) {
RANGE(y, x, 99) {
RANGE(z, y, 99) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
if (x == y && y == z)
ans++;
else if (x == y || y == z)
ans += 3;
else
ans += 6;
}
}
}
}
cout << ans << endl;
}
return 0;
}
| replace | 26 | 31 | 26 | 37 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> ans(N + 1);
for (int x = 1; x * x <= N; ++x) {
for (int y = 1; y * y <= N; ++y) {
for (int z = 1; z * z <= N; ++z) {
++ans[x * x + y * y + z * z + x * y + y * z + z * x];
}
}
}
for (int i = 1; i <= N; ++i) {
cout << ans[i] << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> ans(N + 1);
for (long long x = 1; x * x <= N; ++x) {
for (long long y = 1; y * y <= N; ++y) {
for (long long z = 1; z * z <= N; ++z) {
if (1 <= x * x + y * y + z * z + x * y + y * z + z * x &&
x * x + y * y + z * z + x * y + y * z + z * x <= N) {
++ans[x * x + y * y + z * z + x * y + y * z + z * x];
}
}
}
}
for (int i = 1; i <= N; ++i) {
cout << ans[i] << endl;
}
}
| replace | 8 | 12 | 8 | 15 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 1; i <= N; i++) {
int ans = 0;
for (int x = 1; x * x <= i; x++) {
for (int y = 1; y * y <= i; y++) {
for (int z = 1; z * z <= i; z++) {
if (x * x + y * y + z * z + x * y + y * z + z * x == i)
ans++;
}
}
}
cout << ans << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 1; i <= N; i++) {
int ans = 0;
for (int x = 1; x * x <= i; x++) {
for (int y = 1; y * y <= i; y++) {
int b = x + y;
int c = x * x + x * y + y * y - i;
int r = b * b - 4 * c;
if (r < 0)
continue;
double sr = sqrt(r);
if (sr != floor(sr))
continue;
int rr = sr;
int z1 = (-b + rr) / 2;
if (z1 >= 1) {
ans++;
}
int z2 = (-b - rr) / 2;
if (z2 >= 1) {
ans++;
}
}
}
cout << ans << endl;
}
}
| replace | 11 | 14 | 11 | 27 | TLE | |
p02608 | Python | Runtime Error | N = int(input())
cnt = [0] * 6 * 10000 + 1
for x in range(1, 100):
for y in range(1, 100):
for z in range(1, 100):
cnt[x**2 + y**2 + z**2 + x * y + y * z + z * x] += 1
for i in range(1, N + 1):
print(cnt[i])
| N = int(input())
cnt = [0] * (6 * 10000 + 1)
for x in range(1, 100):
for y in range(1, 100):
for z in range(1, 100):
cnt[x**2 + y**2 + z**2 + x * y + y * z + z * x] += 1
for i in range(1, N + 1):
print(cnt[i])
| replace | 2 | 3 | 2 | 3 | TypeError: can only concatenate list (not "int") to list | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02608/Python/s028829196.py", line 3, in <module>
cnt = [0] * 6 * 10000 + 1
TypeError: can only concatenate list (not "int") to list
|
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define endl '\n'
#define pii pair<ll, ll>
using namespace std;
#define N 100007
#define pb push_back;
vector<ll> g[N];
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
FAST;
ll n;
cin >> n;
ll i, j, k, l, cnt = 0;
for (i = 1; i <= n; i++) {
cnt = 0;
for (j = 1; j <= sqrt(i); j++) {
for (k = 1; k <= sqrt(i); k++) {
for (l = 1; l <= sqrt(i); l++) {
// cout<<j<<" "<<k<<" "<<l<<" "<<(j*j+k*k+l*l+j*k+k*l+j*l)<<endl;
if ((j * j + k * k + l * l + j * k + k * l + j * l) == i) {
cnt++;
}
}
}
}
cout << cnt << endl;
}
} | #include <bits/stdc++.h>
#define ll long long
#define endl '\n'
#define pii pair<ll, ll>
using namespace std;
#define N 100007
#define pb push_back;
vector<ll> g[N];
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
FAST;
ll n;
cin >> n;
ll i, j, k, l, cnt = 0;
for (i = 1; i <= n; i++) {
cnt = 0;
for (j = 1; j <= 100; j++) {
for (k = 1; k <= 100; k++) {
ll b = -(k + j);
ll x = b * b - 4 * (k * k + j * j + k * j - i);
if (x < 0) {
continue;
}
ll sqrtt = sqrt(x);
if (sqrtt * sqrtt == x) {
x = b + sqrtt;
// cout<<j<<" "<<k<<" "<<x<<" "<<sqrtt<<" "<<i<<endl;
if (x % 2 == 0 && (x / 2) >= 1) {
cnt++;
}
}
}
}
cout << cnt << endl;
}
} | replace | 19 | 24 | 19 | 31 | TLE | |
p02608 | C++ | Time Limit Exceeded | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int N, x, y, z, i, j, k, l, ans = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
for (j = 0; j < (N / 6); j++) {
x = j + 1;
for (k = j; k < (N - x * x) / 6; k++) {
y = k + 1;
for (l = k; l < (N - x * x - y * y) / 6; l++) {
z = l + 1;
if ((x * x + y * y + z * z + x * y + y * z + z * x) == (i + 1)) {
if (x != y && y != z && z != x) {
ans += 6;
} else {
if (x == y && y == z) {
ans++;
} else {
ans += 3;
}
}
}
}
}
}
printf("%d\n", ans);
ans = 0;
}
return 0;
}
| #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int N, x, y, z, i, j, k, l, ans = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
for (j = 0; j < (N / 6); j++) {
x = j + 1;
for (k = j; k < (N - x * x) / 6; k++) {
y = k + 1;
for (l = k; l < (N - x * x - y * y) / 6; l++) {
z = l + 1;
if ((x * x + y * y + z * z + x * y + y * z + z * x) > (i + 1)) {
break;
break;
break;
}
if ((x * x + y * y + z * z + x * y + y * z + z * x) == (i + 1)) {
if (x != y && y != z && z != x) {
ans += 6;
} else {
if (x == y && y == z) {
ans++;
} else {
ans += 3;
}
}
}
}
}
}
printf("%d\n", ans);
ans = 0;
}
return 0;
}
| insert | 15 | 15 | 15 | 20 | TLE | |
p02608 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++)
#define repi(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define deg2rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad2deg(rad) (((rad) / 2 / M_PI) * 360)
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
const ll INF = (1LL << 60);
const int INFi = (1 << 29);
/*素数判定*/
bool is_prime(ll n) {
if (n == 1)
return false;
for (ll i = 2; i * i <= n; i++) {
if (n % i == 0)
return false;
}
return true;
}
/*約数列挙*/
vll enum_divisors(ll n) {
vll l;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0) {
l.push_back(i);
if (n / i != i)
l.push_back(n / i);
}
}
sort(all(l));
return l;
}
/*素因数分解*/
vector<P> prime_factorize(ll n) {
vector<P> l;
for (ll i = 2; i * i <= n; i++) {
if (n % i != 0)
continue;
ll e = 0;
while (n % i == 0) {
e++;
n /= i;
}
l.push_back({i, e});
}
if (n != 1)
l.push_back({n, 1});
return l;
}
/*最小公倍数*/
ll lcm(ll a, ll b) { return a * b / __gcd(a, b); }
/*最大公約数*/
ll gcd(ll a, ll b) { return __gcd(a, b); }
int main() {
ll n;
cin >> n;
vll ans(n, 0);
rep2(x, 1, sqrt(n)) {
rep2(y, 1, sqrt(n)) {
rep2(z, 1, sqrt(n)) {
ans[(x * x + y * y + z * z + x * y + y * z + z * x) - 1]++;
}
}
}
rep(i, n) { cout << ans[i] << endl; }
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rep2(i, s, n) for (long long i = (s); i < (long long)(n); i++)
#define repi(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2i(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define deg2rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad2deg(rad) (((rad) / 2 / M_PI) * 360)
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
const ll INF = (1LL << 60);
const int INFi = (1 << 29);
/*素数判定*/
bool is_prime(ll n) {
if (n == 1)
return false;
for (ll i = 2; i * i <= n; i++) {
if (n % i == 0)
return false;
}
return true;
}
/*約数列挙*/
vll enum_divisors(ll n) {
vll l;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0) {
l.push_back(i);
if (n / i != i)
l.push_back(n / i);
}
}
sort(all(l));
return l;
}
/*素因数分解*/
vector<P> prime_factorize(ll n) {
vector<P> l;
for (ll i = 2; i * i <= n; i++) {
if (n % i != 0)
continue;
ll e = 0;
while (n % i == 0) {
e++;
n /= i;
}
l.push_back({i, e});
}
if (n != 1)
l.push_back({n, 1});
return l;
}
/*最小公倍数*/
ll lcm(ll a, ll b) { return a * b / __gcd(a, b); }
/*最大公約数*/
ll gcd(ll a, ll b) { return __gcd(a, b); }
int main() {
ll n;
cin >> n;
vll ans(n, 0);
rep2(x, 1, sqrt(n)) {
rep2(y, 1, sqrt(n)) {
rep2(z, 1, sqrt(n)) {
ll a = (x * x + y * y + z * z + x * y + y * z + z * x) - 1;
if (a >= 0 && a < n) {
ans[a]++;
}
}
}
}
rep(i, n) { cout << ans[i] << endl; }
return 0;
} | replace | 81 | 82 | 81 | 85 | 0 | |
p02608 | C++ | Runtime Error | // Delete the dynamically allocated memory
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define pr pair<long long, long long>
#define mp(a, b) make_pair(a, b)
#define vr vector<long long>
#define mod1 1000000007
#define mod2 998244353
#define inf 1e18
#define ps(x, y) fixed << setprecision(y) << x
#define fill(a, b) memset(a, b, sizeof(a))
#define mk(arr, n, type) type *arr = new type[n];
#define ll long long
#define ld long double
#define w(x) \
int x; \
cin >> x; \
while (x--)
ll power(ll base, ll exp) {
ll res = 1;
while (exp > 0) {
if (exp % 2 == 1)
res = (res * base);
base = (base * base);
exp /= 2;
}
return res;
}
int main() {
ll n;
cin >> n;
mk(arr, n, ll) for (ll i = 0; i < n; i++) { arr[i] = 0; }
for (ll i = 1; i * i <= n; i++) {
for (ll j = 1; j * j <= n; j++) {
for (ll k = 1; k * k <= n; k++) {
ll v = (i + j) * (i + j) + (i + k) * (i + k) + (j + k) * (j + k);
if (v % 2 == 0) {
v = v / 2;
arr[v - 1]++;
}
}
}
}
for (ll i = 0; i < n; i++) {
cout << arr[i] << "\n";
}
delete[] arr;
return 0;
} | // Delete the dynamically allocated memory
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define pr pair<long long, long long>
#define mp(a, b) make_pair(a, b)
#define vr vector<long long>
#define mod1 1000000007
#define mod2 998244353
#define inf 1e18
#define ps(x, y) fixed << setprecision(y) << x
#define fill(a, b) memset(a, b, sizeof(a))
#define mk(arr, n, type) type *arr = new type[n];
#define ll long long
#define ld long double
#define w(x) \
int x; \
cin >> x; \
while (x--)
ll power(ll base, ll exp) {
ll res = 1;
while (exp > 0) {
if (exp % 2 == 1)
res = (res * base);
base = (base * base);
exp /= 2;
}
return res;
}
int main() {
ll n;
cin >> n;
mk(arr, n, ll) for (ll i = 0; i < n; i++) { arr[i] = 0; }
for (ll i = 1; i * i <= n; i++) {
for (ll j = 1; j * j <= n; j++) {
for (ll k = 1; k * k <= n; k++) {
ll v = (i + j) * (i + j) + (i + k) * (i + k) + (j + k) * (j + k);
if (v % 2 == 0) {
v = v / 2;
if (v <= n) {
arr[v - 1]++;
}
}
}
}
}
for (ll i = 0; i < n; i++) {
cout << arr[i] << "\n";
}
delete[] arr;
return 0;
} | replace | 43 | 44 | 43 | 46 | 0 | |
p02608 | C++ | Runtime Error | // C++ program to demonstrate __builtin_popcount()
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans[60000] = {0};
for (int i = 1; i <= (n ^ (1 / 2)); i++) {
for (int j = 1; j <= (n ^ (1 / 2)); j++) {
for (int k = 1; k <= (n ^ (1 / 2)); k++) {
ans[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << "\n";
return 0;
}
| // C++ program to demonstrate __builtin_popcount()
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int ans[60000] = {0};
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
ans[i * i + j * j + k * k + i * j + j * k + k * i]++;
}
}
}
for (int i = 1; i <= n; i++)
cout << ans[i] << "\n";
return 0;
}
| replace | 9 | 12 | 9 | 12 | 0 | |
p02608 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define REP(i, x, n) for (ll i = x; i < n; i++)
#define SZ(v) (ll) v.size()
#define endl "\n"
#define ff first
#define ss second
#define PQ_MIN priority_queue<ll, vector<ll>, greater<ll>>
#define PQ priority_queue<int>
#define pbds \
tree<int, null_type, less<int>, rb_tree_tag, \
tree_order_statistics_node_update>
#define setbit(x) __builtin_popcount(x)
#define prec(n) fixed << setprecision(n)
#define pb(n) push_back(n)
#define clr(n) memset(n, 0, sizeof(n))
#define reset(n) memset(n, -1, sizeof(n))
#define ii pair<ll, ll>
#define vll vector<ll>
using namespace std;
using namespace __gnu_pbds;
bool comp(pair<ll, ll> a, pair<ll, ll> b) {}
const ll INF = 1e16;
const ll MOD = 5;
const ll nxm = 1e6 + 5;
vector<ll> allprime;
bool isprime[nxm];
void sieve() {
memset(isprime, 1, sizeof(isprime));
for (ll i = 2; i < nxm; i++) {
if (isprime[i])
for (ll j = i * i; j < nxm; j += i) {
isprime[j] = 0;
}
}
for (ll i = 2; i < nxm; i++)
if (isprime[i])
allprime.push_back(i);
}
void print(vector<vector<ll>> &v) {
ll n = v.size();
ll m = v[0].size();
cout << "\n";
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < m; j++)
cout << v[i][j] << " ";
cout << "\n";
}
}
void print(vector<ll> &v) {
ll n = v.size();
cout << "\n";
for (ll i = 0; i < n; i++) {
cout << v[i] << " ";
}
cout << "\n";
}
void print(set<ll> &s) {
cout << endl;
set<ll>::iterator it;
for (it = s.begin(); it != s.end(); it++)
cout << *it << " ";
cout << endl;
}
ll power(ll a, ll p) {
ll res = 1;
while (p > 0) {
if (p & 1) {
res = (res * a) % MOD;
p--;
}
a = (a * a) % MOD;
p /= 2;
}
return res % MOD;
}
ll __lcm(ll a, ll b) { return ((a * b) / __gcd(a, b)); }
ll fact(ll a) {
ll res = 1;
for (ll i = 1; i <= a; i++)
res *= i;
return res;
}
ll sqroot[nxm];
ll perfect_square() {
memset(sqroot, -1, sizeof(sqroot));
for (ll i = 1; i * i <= nxm; i++) {
sqroot[(i * i)] = i;
}
}
bool is_prime(ll n) {
for (ll i = 2; i * i <= n; i++)
if (n % i == 0)
return false;
return true;
}
const ll ind = 1e4 + 5;
ll a[ind];
void solve() {
ll n;
cin >> n;
for (ll i = 1; i < n; i++)
for (ll j = 1; j < n; j++)
for (ll k = 1; k < n; k++) {
ll val = i * i + j * j + k * k + i * j + j * k + k * i;
if (val < ind)
a[val]++;
}
REP(i, 1, n + 1)
cout << a[i] << endl;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
| #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define REP(i, x, n) for (ll i = x; i < n; i++)
#define SZ(v) (ll) v.size()
#define endl "\n"
#define ff first
#define ss second
#define PQ_MIN priority_queue<ll, vector<ll>, greater<ll>>
#define PQ priority_queue<int>
#define pbds \
tree<int, null_type, less<int>, rb_tree_tag, \
tree_order_statistics_node_update>
#define setbit(x) __builtin_popcount(x)
#define prec(n) fixed << setprecision(n)
#define pb(n) push_back(n)
#define clr(n) memset(n, 0, sizeof(n))
#define reset(n) memset(n, -1, sizeof(n))
#define ii pair<ll, ll>
#define vll vector<ll>
using namespace std;
using namespace __gnu_pbds;
bool comp(pair<ll, ll> a, pair<ll, ll> b) {}
const ll INF = 1e16;
const ll MOD = 5;
const ll nxm = 1e6 + 5;
vector<ll> allprime;
bool isprime[nxm];
void sieve() {
memset(isprime, 1, sizeof(isprime));
for (ll i = 2; i < nxm; i++) {
if (isprime[i])
for (ll j = i * i; j < nxm; j += i) {
isprime[j] = 0;
}
}
for (ll i = 2; i < nxm; i++)
if (isprime[i])
allprime.push_back(i);
}
void print(vector<vector<ll>> &v) {
ll n = v.size();
ll m = v[0].size();
cout << "\n";
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < m; j++)
cout << v[i][j] << " ";
cout << "\n";
}
}
void print(vector<ll> &v) {
ll n = v.size();
cout << "\n";
for (ll i = 0; i < n; i++) {
cout << v[i] << " ";
}
cout << "\n";
}
void print(set<ll> &s) {
cout << endl;
set<ll>::iterator it;
for (it = s.begin(); it != s.end(); it++)
cout << *it << " ";
cout << endl;
}
ll power(ll a, ll p) {
ll res = 1;
while (p > 0) {
if (p & 1) {
res = (res * a) % MOD;
p--;
}
a = (a * a) % MOD;
p /= 2;
}
return res % MOD;
}
ll __lcm(ll a, ll b) { return ((a * b) / __gcd(a, b)); }
ll fact(ll a) {
ll res = 1;
for (ll i = 1; i <= a; i++)
res *= i;
return res;
}
ll sqroot[nxm];
ll perfect_square() {
memset(sqroot, -1, sizeof(sqroot));
for (ll i = 1; i * i <= nxm; i++) {
sqroot[(i * i)] = i;
}
}
bool is_prime(ll n) {
for (ll i = 2; i * i <= n; i++)
if (n % i == 0)
return false;
return true;
}
const ll ind = 1e4 + 5;
ll a[ind];
void solve() {
ll n;
cin >> n;
for (ll i = 1; i < n; i++)
for (ll j = 1; j < n; j++)
for (ll k = 1; k < n; k++) {
ll val = i * i + j * j + k * k + i * j + j * k + k * i;
if (val < ind)
a[val]++;
else
break;
}
REP(i, 1, n + 1)
cout << a[i] << endl;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
| insert | 114 | 114 | 114 | 116 | TLE | |
p02608 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
using ld = long double;
#define pb push_back
#define mp make_pair
#define sc second
#define fr first
#define stpr setprecision
#define cYES cout << "YES" << endl
#define cNO cout << "NO" << endl
#define cYes cout << "Yes" << endl
#define cNo cout << "No" << endl
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define Rep(i, a, b) for (ll i = (a); i < (b); ++i)
#define rrep(i, n) for (ll i = n - 1; i >= 0; i--)
#define rRep(i, a, b) for (ll i = a; i >= b; i--)
#define crep(i) for (char i = 'a'; i <= 'z'; ++i)
#define psortsecond(A, N) \
sort(A, A + N, \
[](const pii &a, const pii &b) { return a.second < b.second; });
#define ALL(x) (x).begin(), (x).end()
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { \
cout << x << ' '; \
} \
cout << endl;
#define endl '\n'
int ctoi(const char c) {
if ('0' <= c && c <= '9')
return (c - '0');
return -1;
}
ll gcd(ll a, ll b) { return (b == 0 ? a : gcd(b, a % b)); }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll MOD = 1000000007;
constexpr ll INF = 1000000011;
constexpr ll MOD2 = 998244353;
constexpr ll LINF = 1001002003004005006ll;
constexpr ld EPS = 10e-8;
template <class T, class U> inline bool chmax(T &lhs, const U &rhs) {
if (lhs < rhs) {
lhs = rhs;
return 1;
}
return 0;
}
template <class T, class U> inline bool chmin(T &lhs, const U &rhs) {
if (lhs > rhs) {
lhs = rhs;
return 1;
}
return 0;
}
template <typename T> istream &operator>>(istream &is, vector<T> &v) {
for (auto &&x : v)
is >> x;
return is;
}
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &p) {
is >> p.first;
is >> p.second;
return is;
}
template <typename T, typename U>
ostream &operator>>(ostream &os, const pair<T, U> &p) {
os << p.first << ' ' << p.second;
return os;
}
template <class T> ostream &operator<<(ostream &os, vector<T> &v) {
for (auto i = begin(v); i != end(v); ++i) {
if (i != begin(v))
os << ' ';
os << *i;
}
return os;
}
template <std::uint_fast64_t Modulus> class modint {
using u64 = std::uint_fast64_t;
public:
u64 a;
constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
constexpr u64 &value() noexcept { return a; }
constexpr const u64 &value() const noexcept { return a; }
constexpr modint operator+(const modint rhs) const noexcept {
return modint(*this) += rhs;
}
constexpr modint operator-(const modint rhs) const noexcept {
return modint(*this) -= rhs;
}
constexpr modint operator*(const modint rhs) const noexcept {
return modint(*this) *= rhs;
}
constexpr modint operator/(const modint rhs) const noexcept {
return modint(*this) /= rhs;
}
constexpr modint &operator+=(const modint rhs) noexcept {
a += rhs.a;
if (a >= Modulus) {
a -= Modulus;
}
return *this;
}
constexpr modint &operator-=(const modint rhs) noexcept {
if (a < rhs.a) {
a += Modulus;
}
a -= rhs.a;
return *this;
}
constexpr modint &operator*=(const modint rhs) noexcept {
a = a * rhs.a % Modulus;
return *this;
}
constexpr modint &operator/=(modint rhs) noexcept {
u64 exp = Modulus - 2;
while (exp) {
if (exp % 2) {
*this *= rhs;
}
rhs *= rhs;
exp /= 2;
}
return *this;
}
};
ll A[1000] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 0,
0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0, 0, 3,
0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1, 6, 0, 6,
6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3, 6, 0, 0, 0,
6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 0, 3, 6, 0, 0, 0, 0, 6,
1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3, 6, 0, 0, 0, 3, 3,
12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0, 0, 0, 3, 6, 3, 3, 6,
0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0, 6, 3, 6, 0, 0, 1, 6, 3,
12, 6, 0, 0, 12, 0, 6, 0, 6, 6, 12, 0, 0, 6, 0, 0, 6, 0, 12,
3, 6, 0, 6, 3, 9, 6, 3, 6, 6, 0, 6, 0, 6, 0, 15, 6, 0, 0,
6, 0, 3, 3, 12, 0, 12, 6, 6, 0, 3, 6, 6, 3, 12, 0, 6, 0, 9,
6, 0, 0, 6, 3, 12, 1, 6, 6, 6, 6, 0, 0, 18, 0, 12, 0, 3, 6,
12, 0, 0, 6, 3, 6, 12, 0, 12, 0, 0, 0, 9, 3, 9, 6, 12, 3, 12,
0, 3, 6, 6, 0, 12, 0, 12, 0, 9, 9, 0, 0, 6, 3, 6, 3, 12, 6,
9, 3, 6, 0, 12, 3, 6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6,
0, 12, 3, 6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0,
0, 6, 15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 3,
3, 18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0, 12, 0, 9, 6, 0, 3,
12, 3, 6, 6, 12, 6, 6, 0, 0, 0, 15, 3, 18, 3, 18, 3, 12, 6, 3,
6, 9, 0, 12, 0, 12, 0, 18, 12, 0, 0, 12, 3, 6, 0, 6, 6, 9, 6,
0, 0, 18, 1, 18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6, 18, 0, 0,
6, 0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0, 12, 0, 3, 6,
12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3, 27, 6, 6, 6, 6,
3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0, 9, 9, 15, 3, 12, 6, 6, 3,
9, 6, 12, 12, 18, 0, 18, 0, 6, 6, 21, 6, 0, 0, 6, 3, 15, 6, 12,
6, 18, 0, 0, 0, 12, 6, 6, 3, 6, 4, 18, 6, 12, 6, 3, 9, 30, 0,
18, 0, 6, 6, 12, 6, 6, 9, 12, 0, 18, 6, 18, 0, 6, 0, 12, 0, 6,
12, 6, 3, 18, 0, 6, 6, 6, 6, 15, 3, 24, 0, 6, 3, 18, 0, 12, 6,
12, 6, 24, 0, 15, 18, 9, 6, 0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6,
0, 18, 0, 6, 3, 12, 0, 12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12,
6, 6, 12, 0, 12, 0, 21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0,
0, 12, 0, 12, 6, 24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3,
12, 6, 6, 12, 24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21,
12, 0, 6, 18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3,
18, 6, 21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12,
12, 18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12,
24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0, 12,
3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6, 0, 6,
9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0, 9, 12, 21, 6, 6,
12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0, 18, 0, 6, 0,
9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6, 30, 3, 6, 12, 6,
12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6, 24, 0, 12, 6, 12, 0,
18, 0, 18, 15, 18, 3, 18, 6, 12, 6, 6, 12, 3, 6, 6, 0, 12, 3, 39,
3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6, 18, 0, 12, 0, 9, 9, 12, 9,
24, 9, 12, 6, 12, 6, 33, 0, 6, 0, 18, 0, 9, 15, 12, 6, 24, 6, 6,
3, 15, 6, 15, 12, 18, 0, 18, 1, 18, 6, 12, 6, 6, 0, 24, 6, 24, 12,
18, 6, 24, 0, 6, 6, 12, 15, 24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12,
0, 24, 0, 12, 6, 12, 12, 18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6,
30, 9, 6, 12, 24, 12, 12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18,
3, 18, 3, 12, 6, 24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9,
12, 0, 3, 12, 36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18,
12, 15, 9, 24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12,
12, 0, 6, 0, 27, 12, 18, 3, 30, 3, 18, 6};
int main() {
ll N, cnt = 0;
cin >> N;
rep(i, N) { cout << A[i] << endl; }
} | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
using ld = long double;
#define pb push_back
#define mp make_pair
#define sc second
#define fr first
#define stpr setprecision
#define cYES cout << "YES" << endl
#define cNO cout << "NO" << endl
#define cYes cout << "Yes" << endl
#define cNo cout << "No" << endl
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define Rep(i, a, b) for (ll i = (a); i < (b); ++i)
#define rrep(i, n) for (ll i = n - 1; i >= 0; i--)
#define rRep(i, a, b) for (ll i = a; i >= b; i--)
#define crep(i) for (char i = 'a'; i <= 'z'; ++i)
#define psortsecond(A, N) \
sort(A, A + N, \
[](const pii &a, const pii &b) { return a.second < b.second; });
#define ALL(x) (x).begin(), (x).end()
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { \
cout << x << ' '; \
} \
cout << endl;
#define endl '\n'
int ctoi(const char c) {
if ('0' <= c && c <= '9')
return (c - '0');
return -1;
}
ll gcd(ll a, ll b) { return (b == 0 ? a : gcd(b, a % b)); }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
constexpr ll MOD = 1000000007;
constexpr ll INF = 1000000011;
constexpr ll MOD2 = 998244353;
constexpr ll LINF = 1001002003004005006ll;
constexpr ld EPS = 10e-8;
template <class T, class U> inline bool chmax(T &lhs, const U &rhs) {
if (lhs < rhs) {
lhs = rhs;
return 1;
}
return 0;
}
template <class T, class U> inline bool chmin(T &lhs, const U &rhs) {
if (lhs > rhs) {
lhs = rhs;
return 1;
}
return 0;
}
template <typename T> istream &operator>>(istream &is, vector<T> &v) {
for (auto &&x : v)
is >> x;
return is;
}
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &p) {
is >> p.first;
is >> p.second;
return is;
}
template <typename T, typename U>
ostream &operator>>(ostream &os, const pair<T, U> &p) {
os << p.first << ' ' << p.second;
return os;
}
template <class T> ostream &operator<<(ostream &os, vector<T> &v) {
for (auto i = begin(v); i != end(v); ++i) {
if (i != begin(v))
os << ' ';
os << *i;
}
return os;
}
template <std::uint_fast64_t Modulus> class modint {
using u64 = std::uint_fast64_t;
public:
u64 a;
constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
constexpr u64 &value() noexcept { return a; }
constexpr const u64 &value() const noexcept { return a; }
constexpr modint operator+(const modint rhs) const noexcept {
return modint(*this) += rhs;
}
constexpr modint operator-(const modint rhs) const noexcept {
return modint(*this) -= rhs;
}
constexpr modint operator*(const modint rhs) const noexcept {
return modint(*this) *= rhs;
}
constexpr modint operator/(const modint rhs) const noexcept {
return modint(*this) /= rhs;
}
constexpr modint &operator+=(const modint rhs) noexcept {
a += rhs.a;
if (a >= Modulus) {
a -= Modulus;
}
return *this;
}
constexpr modint &operator-=(const modint rhs) noexcept {
if (a < rhs.a) {
a += Modulus;
}
a -= rhs.a;
return *this;
}
constexpr modint &operator*=(const modint rhs) noexcept {
a = a * rhs.a % Modulus;
return *this;
}
constexpr modint &operator/=(modint rhs) noexcept {
u64 exp = Modulus - 2;
while (exp) {
if (exp % 2) {
*this *= rhs;
}
rhs *= rhs;
exp /= 2;
}
return *this;
}
};
ll A[10000] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3,
0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 3, 3, 6, 0,
0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0, 0, 0, 3, 0, 0, 1,
6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 3, 3, 3, 6, 0, 6, 3,
6, 0, 0, 0, 6, 0, 0, 0, 3, 3, 9, 0, 6, 3, 6, 0, 3, 6,
0, 0, 0, 0, 6, 1, 6, 0, 6, 6, 0, 3, 12, 0, 6, 0, 0, 3,
6, 0, 0, 0, 3, 3, 12, 0, 6, 3, 6, 0, 3, 6, 9, 0, 6, 0,
0, 0, 3, 6, 3, 3, 6, 0, 6, 3, 12, 0, 3, 6, 6, 0, 6, 0,
6, 3, 6, 0, 0, 1, 6, 3, 12, 6, 0, 0, 12, 0, 6, 0, 6, 6,
12, 0, 0, 6, 0, 0, 6, 0, 12, 3, 6, 0, 6, 3, 9, 6, 3, 6,
6, 0, 6, 0, 6, 0, 15, 6, 0, 0, 6, 0, 3, 3, 12, 0, 12, 6,
6, 0, 3, 6, 6, 3, 12, 0, 6, 0, 9, 6, 0, 0, 6, 3, 12, 1,
6, 6, 6, 6, 0, 0, 18, 0, 12, 0, 3, 6, 12, 0, 0, 6, 3, 6,
12, 0, 12, 0, 0, 0, 9, 3, 9, 6, 12, 3, 12, 0, 3, 6, 6, 0,
12, 0, 12, 0, 9, 9, 0, 0, 6, 3, 6, 3, 12, 6, 9, 3, 6, 0,
12, 3, 6, 3, 9, 6, 12, 6, 6, 0, 6, 0, 9, 6, 6, 0, 12, 3,
6, 0, 9, 6, 6, 1, 6, 0, 21, 12, 6, 0, 12, 0, 12, 0, 0, 6,
15, 6, 0, 6, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 3, 3,
18, 3, 6, 3, 6, 6, 9, 9, 18, 0, 6, 0, 12, 0, 9, 6, 0, 3,
12, 3, 6, 6, 12, 6, 6, 0, 0, 0, 15, 3, 18, 3, 18, 3, 12, 6,
3, 6, 9, 0, 12, 0, 12, 0, 18, 12, 0, 0, 12, 3, 6, 0, 6, 6,
9, 6, 0, 0, 18, 1, 18, 3, 12, 6, 6, 6, 12, 0, 15, 6, 12, 6,
18, 0, 0, 6, 0, 9, 12, 0, 18, 0, 6, 3, 12, 0, 12, 12, 0, 0,
12, 0, 3, 6, 12, 6, 18, 9, 18, 0, 9, 6, 18, 0, 6, 0, 6, 3,
27, 6, 6, 6, 6, 3, 6, 0, 12, 6, 9, 0, 6, 0, 18, 0, 9, 9,
15, 3, 12, 6, 6, 3, 9, 6, 12, 12, 18, 0, 18, 0, 6, 6, 21, 6,
0, 0, 6, 3, 15, 6, 12, 6, 18, 0, 0, 0, 12, 6, 6, 3, 6, 4,
18, 6, 12, 6, 3, 9, 30, 0, 18, 0, 6, 6, 12, 6, 6, 9, 12, 0,
18, 6, 18, 0, 6, 0, 12, 0, 6, 12, 6, 3, 18, 0, 6, 6, 6, 6,
15, 3, 24, 0, 6, 3, 18, 0, 12, 6, 12, 6, 24, 0, 15, 18, 9, 6,
0, 0, 18, 3, 6, 0, 15, 12, 12, 6, 6, 0, 18, 0, 6, 3, 12, 0,
12, 6, 6, 9, 9, 6, 24, 3, 24, 0, 9, 12, 6, 6, 12, 0, 12, 0,
21, 9, 15, 6, 12, 3, 18, 3, 12, 6, 12, 6, 0, 0, 12, 0, 12, 6,
24, 0, 6, 12, 6, 1, 9, 6, 12, 6, 24, 0, 18, 3, 12, 6, 6, 12,
24, 0, 12, 6, 15, 6, 18, 0, 18, 0, 0, 0, 18, 9, 21, 12, 0, 6,
18, 0, 9, 6, 6, 6, 12, 0, 12, 0, 9, 9, 27, 6, 6, 3, 18, 6,
21, 6, 6, 12, 12, 0, 12, 0, 24, 12, 0, 0, 24, 3, 24, 6, 12, 12,
18, 0, 0, 0, 12, 0, 18, 3, 15, 6, 12, 9, 6, 0, 15, 6, 9, 12,
24, 0, 12, 3, 6, 6, 21, 6, 18, 3, 18, 0, 21, 12, 15, 6, 6, 0,
12, 3, 12, 9, 18, 9, 12, 6, 6, 6, 24, 0, 18, 3, 24, 0, 6, 6,
0, 6, 9, 6, 6, 4, 30, 0, 18, 12, 9, 6, 24, 0, 18, 0, 9, 12,
21, 6, 6, 12, 12, 0, 18, 0, 21, 15, 12, 0, 12, 6, 12, 12, 18, 0,
18, 0, 6, 0, 9, 12, 18, 6, 30, 0, 0, 0, 24, 6, 9, 3, 12, 6,
30, 3, 6, 12, 6, 12, 12, 0, 36, 0, 6, 3, 27, 12, 12, 6, 6, 6,
24, 0, 12, 6, 12, 0, 18, 0, 18, 15, 18, 3, 18, 6, 12, 6, 6, 12,
3, 6, 6, 0, 12, 3, 39, 3, 12, 12, 12, 3, 18, 0, 21, 12, 21, 6,
18, 0, 12, 0, 9, 9, 12, 9, 24, 9, 12, 6, 12, 6, 33, 0, 6, 0,
18, 0, 9, 15, 12, 6, 24, 6, 6, 3, 15, 6, 15, 12, 18, 0, 18, 1,
18, 6, 12, 6, 6, 0, 24, 6, 24, 12, 18, 6, 24, 0, 6, 6, 12, 15,
24, 0, 24, 6, 6, 0, 18, 0, 15, 18, 12, 0, 24, 0, 12, 6, 12, 12,
18, 6, 24, 0, 0, 6, 24, 3, 12, 0, 12, 6, 30, 9, 6, 12, 24, 12,
12, 0, 15, 18, 12, 0, 18, 0, 24, 6, 15, 6, 18, 3, 18, 3, 12, 6,
24, 12, 12, 12, 6, 0, 36, 0, 18, 3, 6, 12, 6, 9, 12, 0, 3, 12,
36, 0, 30, 0, 12, 0, 18, 6, 12, 9, 12, 6, 24, 3, 18, 12, 15, 9,
24, 0, 18, 6, 18, 9, 18, 12, 6, 6, 24, 3, 24, 0, 12, 12, 12, 0,
6, 0, 27, 12, 18, 3, 30, 3, 18, 6, 0, 12, 15, 6, 18, 0, 24, 0,
9, 6, 9, 12, 18, 7, 24, 0, 24, 12, 15, 12, 24, 0, 24, 0, 6, 9,
30, 9, 6, 6, 0, 9, 33, 12, 36, 0, 12, 0, 18, 0, 6, 21, 12, 6,
36, 6, 0, 3, 18, 6, 12, 6, 24, 0, 12, 3, 24, 6, 9, 12, 6, 6,
30, 6, 18, 12, 9, 9, 12, 0, 30, 3, 18, 3, 27, 6, 30, 12, 12, 0,
24, 0, 27, 12, 6, 0, 24, 3, 18, 18, 9, 6, 18, 0, 12, 3, 33, 18,
12, 9, 6, 0, 12, 6, 30, 0, 24, 12, 12, 0, 30, 6, 6, 6, 0, 6,
24, 0, 12, 0, 18, 15, 33, 6, 30, 15, 18, 0, 9, 12, 24, 9, 12, 0,
18, 6, 27, 18, 15, 6, 18, 3, 24, 0, 6, 6, 36, 12, 18, 0, 12, 3,
30, 3, 12, 6, 12, 15, 6, 0, 18, 12, 15, 9, 30, 0, 18, 6, 12, 12,
18, 6, 6, 3, 24, 1, 27, 12, 18, 6, 18, 0, 24, 0, 18, 15, 15, 21,
30, 6, 12, 12, 18, 0, 30, 6, 24, 0, 6, 0, 18, 6, 36, 12, 6, 6,
36, 0, 6, 12, 12, 12, 24, 0, 30, 0, 9, 6, 18, 0, 18, 12, 12, 6,
24, 6, 9, 15, 12, 0, 12, 6, 30, 9, 18, 0, 42, 3, 18, 6, 12, 18,
33, 12, 12, 0, 18, 0, 21, 12, 12, 12, 24, 6, 30, 0, 27, 18, 6, 12,
6, 0, 24, 0, 18, 15, 30, 0, 18, 12, 6, 0, 21, 6, 21, 12, 24, 0,
30, 0, 6, 6, 6, 12, 24, 0, 30, 12, 9, 12, 21, 3, 24, 0, 12, 3,
21, 18, 9, 18, 18, 6, 30, 3, 42, 6, 21, 6, 30, 0, 6, 3, 24, 9,
36, 6, 6, 9, 12, 6, 18, 12, 33, 9, 12, 0, 24, 9, 9, 6, 3, 18,
36, 6, 18, 0, 24, 6, 6, 6, 18, 0, 12, 0, 30, 3, 39, 12, 12, 7,
18, 0, 15, 18, 18, 9, 36, 0, 24, 6, 6, 18, 30, 0, 18, 9, 18, 3,
24, 6, 21, 12, 24, 0, 30, 3, 33, 24, 12, 6, 18, 6, 6, 6, 18, 6,
18, 12, 18, 0, 24, 6, 36, 3, 18, 6, 0, 12, 30, 0, 9, 24, 18, 0,
24, 0, 18, 0, 0, 12, 30, 15, 30, 6, 18, 3, 30, 0, 24, 18, 12, 0,
36, 3, 24, 12, 15, 18, 18, 6, 24, 3, 24, 12, 18, 12, 24, 0, 0, 6,
39, 6, 24, 3, 18, 3, 42, 6, 12, 12, 15, 9, 30, 0, 12, 0, 18, 6,
18, 12, 24, 15, 12, 0, 12, 12, 30, 12, 12, 0, 18, 0, 15, 15, 18, 18,
30, 3, 24, 12, 9, 6, 48, 0, 18, 0, 30, 0, 21, 6, 12, 12, 24, 12,
18, 3, 48, 24, 6, 6, 18, 0, 36, 0, 12, 15, 27, 6, 12, 12, 18, 6,
27, 6, 12, 9, 18, 0, 24, 6, 18, 18, 21, 0, 36, 0, 12, 0, 18, 12,
21, 18, 24, 0, 12, 1, 18, 9, 21, 18, 6, 9, 42, 3, 36, 12, 12, 12,
30, 0, 12, 6, 21, 12, 36, 6, 24, 9, 12, 6, 12, 12, 24, 12, 18, 0,
42, 0, 15, 6, 15, 15, 42, 6, 30, 6, 12, 12, 18, 12, 18, 0, 6, 6,
36, 0, 30, 18, 6, 0, 6, 0, 30, 18, 18, 0, 42, 0, 18, 6, 15, 18,
24, 0, 12, 6, 36, 9, 33, 12, 12, 12, 18, 0, 36, 0, 21, 21, 15, 18,
18, 15, 18, 0, 18, 6, 42, 6, 24, 0, 18, 3, 42, 6, 18, 12, 12, 12,
18, 0, 15, 12, 18, 12, 36, 0, 30, 12, 3, 21, 18, 0, 30, 6, 24, 0,
27, 12, 18, 12, 6, 0, 12, 0, 36, 15, 15, 3, 36, 12, 18, 6, 30, 6,
33, 12, 12, 0, 12, 6, 24, 6, 54, 18, 12, 3, 36, 9, 9, 12, 12, 18,
36, 0, 6, 0, 21, 15, 27, 9, 24, 12, 30, 6, 24, 6, 27, 18, 12, 0,
30, 0, 21, 12, 18, 6, 30, 0, 18, 0, 21, 18, 21, 6, 30, 0, 24, 3,
6, 6, 15, 27, 12, 10, 42, 6, 36, 12, 12, 6, 24, 0, 24, 6, 12, 12,
48, 6, 18, 12, 0, 3, 51, 6, 30, 6, 24, 0, 24, 0, 30, 21, 15, 12,
24, 9, 18, 6, 18, 12, 30, 9, 24, 0, 18, 0, 27, 18, 9, 6, 18, 9,
54, 0, 18, 24, 21, 18, 12, 0, 24, 0, 12, 0, 30, 9, 30, 12, 6, 9,
24, 6, 15, 15, 18, 0, 30, 3, 33, 18, 21, 12, 42, 3, 30, 6, 6, 24,
27, 6, 12, 0, 24, 3, 42, 6, 42, 9, 12, 6, 18, 6, 24, 12, 12, 12,
54, 0, 6, 12, 18, 6, 18, 18, 30, 12, 30, 0, 18, 0, 27, 18, 24, 0,
18, 0, 15, 24, 21, 6, 24, 3, 36, 6, 6, 6, 45, 21, 18, 0, 18, 6,
33, 3, 18, 0, 24, 15, 30, 0, 30, 24, 12, 6, 36, 0, 24, 3, 21, 24,
18, 15, 30, 3, 12, 6, 42, 12, 12, 12, 6, 0, 54, 6, 30, 15, 24, 18,
24, 6, 12, 0, 9, 6, 30, 0, 48, 0, 24, 0, 15, 12, 39, 12, 24, 6,
24, 6, 15, 30, 12, 6, 24, 0, 24, 3, 24, 12, 24, 6, 6, 18, 12, 4,
54, 6, 21, 18, 18, 0, 36, 6, 24, 9, 30, 12, 24, 9, 36, 6, 12, 18,
42, 3, 30, 0, 6, 9, 21, 6, 12, 30, 30, 6, 30, 0, 27, 12, 9, 18,
30, 0, 36, 0, 18, 9, 42, 6, 24, 12, 0, 6, 51, 12, 24, 12, 12, 0,
18, 6, 12, 18, 6, 6, 36, 3, 54, 9, 18, 6, 27, 12, 18, 0, 30, 0,
39, 9, 18, 18, 12, 9, 30, 6, 21, 12, 27, 18, 24, 0, 12, 0, 42, 18,
42, 6, 24, 15, 18, 0, 24, 12, 45, 12, 6, 0, 54, 0, 15, 21, 6, 6,
30, 6, 18, 12, 24, 18, 30, 6, 36, 0, 12, 3, 24, 12, 18, 18, 18, 12,
24, 0, 33, 12, 27, 6, 42, 0, 18, 6, 9, 15, 30, 6, 30, 6, 12, 6,
18, 6, 33, 15, 30, 0, 36, 3, 27, 21, 33, 24, 30, 9, 24, 0, 12, 18,
33, 6, 6, 0, 18, 3, 57, 12, 24, 18, 30, 9, 18, 0, 18, 12, 27, 12,
36, 0, 36, 6, 12, 6, 27, 12, 30, 9, 24, 6, 39, 18, 12, 24, 12, 0,
30, 0, 30, 6, 15, 15, 18, 3, 24, 18, 9, 12, 30, 9, 30, 0, 18, 6,
42, 18, 30, 0, 6, 10, 48, 0, 24, 12, 12, 18, 48, 0, 30, 3, 30, 15,
18, 6, 24, 18, 18, 0, 42, 6, 36, 15, 24, 0, 42, 12, 21, 24, 12, 12,
24, 0, 12, 6, 18, 18, 60, 6, 30, 0, 12, 0, 24, 0, 12, 18, 30, 15,
42, 0, 33, 30, 6, 6, 12, 0, 42, 3, 27, 6, 33, 12, 36, 12, 18, 0,
30, 6, 18, 12, 12, 0, 18, 6, 15, 27, 27, 6, 42, 6, 36, 9, 18, 30,
33, 9, 30, 0, 6, 6, 54, 6, 36, 24, 24, 0, 30, 3, 12, 6, 21, 24,
30, 0, 24, 0, 24, 12, 42, 9, 42, 21, 12, 12, 27, 12, 27, 6, 12, 0,
48, 6, 12, 18, 12, 12, 36, 6, 30, 0, 24, 0, 42, 12, 12, 0, 36, 0,
24, 15, 21, 21, 18, 6, 12, 9, 36, 18, 18, 15, 42, 0, 18, 6, 9, 18,
48, 12, 30, 9, 24, 3, 33, 6, 18, 18, 18, 0, 36, 3, 54, 24, 3, 12,
36, 9, 36, 6, 30, 12, 36, 12, 24, 0, 18, 6, 24, 6, 42, 0, 24, 18,
18, 0, 9, 30, 39, 12, 42, 0, 36, 0, 12, 12, 21, 12, 18, 12, 24, 6,
45, 6, 18, 24, 18, 0, 36, 0, 42, 15, 18, 6, 24, 6, 12, 12, 18, 12,
30, 6, 18, 0, 30, 1, 30, 9, 57, 9, 12, 9, 48, 6, 21, 24, 18, 12,
66, 0, 18, 6, 9, 24, 24, 24, 30, 12, 18, 0, 48, 6, 24, 18, 18, 0,
24, 3, 27, 18, 24, 12, 36, 6, 48, 6, 15, 18, 42, 6, 24, 0, 12, 12,
36, 6, 6, 24, 12, 3, 48, 0, 48, 18, 0, 12, 18, 0, 36, 6, 18, 9,
54, 15, 12, 12, 6, 6, 39, 6, 24, 18, 42, 0, 30, 0, 33, 18, 24, 18,
18, 9, 18, 0, 15, 18, 54, 0, 36, 0, 24, 0, 48, 24, 15, 18, 18, 12,
42, 9, 24, 12, 36, 21, 30, 0, 36, 12, 24, 3, 30, 0, 48, 15, 12, 6,
15, 18, 18, 18, 24, 0, 30, 0, 24, 24, 18, 9, 72, 0, 30, 6, 21, 18,
30, 6, 24, 0, 0, 6, 24, 18, 42, 12, 6, 15, 36, 0, 30, 18, 30, 12,
24, 0, 6, 0, 18, 12, 54, 9, 36, 9, 36, 9, 30, 6, 27, 27, 24, 0,
54, 6, 21, 18, 21, 6, 36, 15, 36, 3, 30, 12, 6, 18, 30, 0, 18, 6,
54, 0, 30, 21, 36, 9, 30, 6, 30, 24, 24, 6, 30, 0, 36, 12, 9, 24,
24, 12, 18, 9, 30, 0, 48, 12, 24, 12, 12, 0, 48, 0, 18, 12, 24, 24,
30, 6, 18, 12, 21, 12, 24, 0, 66, 0, 12, 0, 30, 9, 24, 24, 18, 13,
42, 3, 18, 18, 27, 24, 24, 0, 30, 6, 15, 18, 39, 12, 12, 9, 36, 12,
54, 12, 42, 18, 6, 0, 36, 0, 51, 18, 12, 0, 66, 12, 24, 0, 6, 24,
51, 12, 24, 0, 24, 0, 33, 6, 18, 18, 30, 6, 42, 3, 18, 30, 15, 15,
30, 0, 30, 6, 30, 12, 48, 12, 24, 12, 12, 9, 36, 6, 36, 6, 12, 0,
30, 0, 24, 21, 24, 15, 42, 12, 24, 6, 9, 18, 15, 9, 42, 0, 24, 12,
66, 12, 30, 24, 6, 9, 54, 0, 36, 12, 21, 12, 36, 0, 24, 3, 24, 15,
36, 6, 30, 24, 12, 6, 33, 6, 39, 21, 30, 0, 42, 6, 12, 30, 30, 18,
36, 0, 48, 3, 36, 12, 30, 18, 18, 0, 24, 0, 30, 6, 33, 21, 24, 6,
18, 12, 24, 12, 12, 15, 48, 0, 24, 6, 21, 21, 60, 6, 24, 12, 18, 0,
30, 12, 15, 12, 24, 0, 24, 3, 60, 27, 18, 12, 30, 3, 24, 9, 21, 12,
60, 18, 24, 0, 24, 9, 33, 6, 36, 12, 24, 15, 42, 6, 27, 36, 27, 6,
42, 0, 42, 6, 12, 15, 15, 24, 42, 18, 12, 0, 33, 6, 21, 18, 24, 0,
48, 3, 36, 9, 24, 24, 30, 6, 36, 0, 39, 18, 60, 6, 18, 0, 12, 6,
21, 27, 30, 0, 18, 6, 42, 6, 42, 18, 24, 9, 48, 0, 6, 6, 18, 18,
18, 6, 18, 15, 30, 4, 60, 12, 30, 30, 18, 0, 36, 0, 27, 18, 30, 18,
48, 9, 30, 12, 18, 6, 42, 9, 48, 0, 18, 6, 42, 6, 30, 24, 12, 3,
36, 0, 36, 36, 15, 18, 30, 0, 66, 0, 12, 18, 42, 9, 24, 15, 18, 12,
54, 6, 18, 21, 36, 0, 30, 6, 24, 24, 12, 6, 24, 9, 36, 12, 6, 12,
45, 12, 36, 0, 36, 0, 48, 3, 24, 18, 12, 24, 36, 0, 30, 12, 30, 21,
30, 0, 6, 15, 18, 15, 66, 12, 42, 3, 12, 0, 39, 12, 30, 12, 18, 0,
54, 6, 30, 24, 9, 12, 60, 12, 30, 12, 30, 24, 24, 18, 30, 0, 36, 0,
27, 9, 45, 18, 24, 12, 24, 0, 36, 24, 12, 6, 60, 0, 18, 0, 24, 15,
51, 9, 24, 12, 30, 12, 27, 18, 51, 18, 24, 0, 36, 6, 27, 27, 12, 30,
36, 6, 30, 0, 12, 6, 42, 0, 18, 0, 18, 0, 48, 12, 45, 24, 6, 15,
42, 6, 12, 18, 27, 9, 54, 0, 42, 3, 33, 12, 15, 12, 54, 18, 30, 6,
36, 18, 21, 30, 18, 0, 48, 3, 30, 18, 36, 6, 18, 0, 18, 12, 57, 24,
42, 6, 24, 0, 18, 12, 36, 18, 30, 12, 36, 3, 78, 0, 24, 6, 6, 36,
42, 0, 24, 0, 21, 15, 33, 6, 42, 18, 12, 3, 30, 12, 30, 27, 24, 0,
42, 12, 39, 12, 30, 12, 30, 15, 30, 6, 12, 24, 54, 6, 24, 0, 18, 6,
33, 12, 18, 24, 24, 7, 30, 0, 60, 24, 21, 12, 30, 0, 48, 6, 18, 15,
39, 12, 18, 18, 18, 0, 48, 12, 54, 18, 42, 0, 30, 0, 15, 30, 27, 18,
72, 0, 30, 15, 12, 12, 30, 18, 36, 0, 6, 3, 60, 15, 24, 18, 6, 18,
54, 6, 21, 24, 24, 12, 30, 0, 30, 6, 30, 15, 54, 6, 48, 12, 30, 12,
36, 0, 24, 3, 24, 0, 54, 6, 18, 30, 15, 6, 42, 9, 36, 0, 21, 30,
15, 12, 12, 0, 24, 3, 72, 0, 51, 39, 24, 12, 30, 3, 33, 18, 15, 12,
42, 0, 30, 12, 27, 24, 51, 12, 42, 12, 18, 3, 42, 12, 39, 18, 12, 0,
30, 0, 24, 21, 21, 21, 30, 6, 66, 12, 12, 6, 69, 21, 30, 0, 24, 6,
45, 12, 12, 18, 42, 12, 18, 0, 39, 30, 33, 12, 54, 0, 12, 0, 12, 18,
36, 9, 30, 9, 24, 9, 60, 12, 30, 12, 12, 0, 42, 9, 42, 18, 45, 24,
42, 6, 12, 9, 24, 6, 30, 12, 42, 0, 30, 6, 15, 15, 30, 12, 18, 12,
54, 6, 21, 30, 12, 33, 60, 0, 48, 0, 30, 15, 42, 6, 24, 24, 30, 0,
36, 18, 33, 18, 12, 0, 60, 0, 72, 15, 12, 9, 30, 12, 24, 15, 21, 24,
51, 12, 24, 0, 24, 6, 12, 6, 33, 24, 36, 9, 54, 6, 27, 24, 30, 6,
48, 0, 24, 3, 36, 27, 42, 15, 18, 18, 12, 6, 54, 6, 30, 15, 36, 0,
12, 12, 18, 24, 21, 18, 30, 3, 60, 0, 33, 12, 36, 18, 48, 0, 24, 1,
39, 12, 24, 18, 24, 9, 66, 6, 48, 24, 12, 12, 42, 0, 24, 6, 18, 12,
63, 6, 36, 24, 18, 0, 39, 12, 39, 24, 24, 0, 54, 6, 15, 24, 15, 24,
48, 3, 36, 12, 12, 24, 39, 18, 36, 0, 42, 6, 42, 6, 60, 24, 12, 18,
18, 0, 45, 6, 6, 6, 72, 0, 30, 6, 24, 9, 36, 12, 24, 9, 30, 15,
36, 18, 33, 24, 6, 0, 54, 0, 33, 36, 18, 24, 36, 6, 18, 6, 24, 18,
75, 6, 18, 0, 18, 0, 48, 9, 36, 18, 42, 9, 30, 0, 27, 36, 24, 15,
42, 0, 42, 18, 36, 12, 18, 12, 72, 9, 24, 0, 54, 18, 21, 24, 12, 0,
60, 0, 24, 24, 39, 12, 42, 18, 30, 6, 9, 12, 48, 12, 30, 0, 18, 12,
36, 15, 48, 18, 18, 3, 42, 6, 42, 18, 18, 24, 54, 0, 36, 0, 24, 36,
42, 0, 12, 27, 30, 6, 60, 6, 30, 24, 12, 0, 36, 3, 42, 12, 18, 12,
36, 9, 30, 0, 15, 18, 33, 12, 54, 0, 30, 6, 33, 21, 27, 30, 42, 12,
54, 9, 42, 24, 27, 6, 36, 0, 24, 12, 24, 12, 45, 24, 12, 6, 30, 12,
69, 12, 42, 12, 30, 0, 24, 0, 42, 18, 24, 15, 60, 9, 48, 18, 18, 24,
27, 12, 36, 0, 30, 0, 54, 9, 30, 18, 24, 15, 48, 0, 24, 24, 45, 24,
24, 0, 18, 6, 36, 9, 54, 15, 24, 12, 12, 6, 18, 12, 54, 18, 12, 0,
60, 3, 48, 30, 12, 18, 60, 6, 24, 3, 36, 12, 33, 12, 36, 0, 36, 6,
36, 3, 33, 24, 12, 13, 42, 12, 27, 18, 30, 12, 54, 0, 30, 12, 21, 39,
54, 6, 54, 18, 18, 0, 33, 12, 36, 36, 36, 0, 30, 0, 42, 33, 18, 18,
36, 12, 30, 3, 30, 12, 66, 6, 30, 0, 18, 12, 63, 18, 24, 6, 30, 12,
48, 9, 6, 24, 30, 12, 42, 0, 72, 0, 30, 12, 48, 3, 24, 15, 12, 12,
66, 18, 9, 36, 12, 0, 54, 0, 54, 18, 15, 30, 36, 6, 12, 0, 21, 18,
54, 12, 30, 0, 6, 0, 36, 15, 60, 18, 18, 15, 48, 6, 27, 24, 21, 12,
54, 0, 54, 9, 12, 24, 48, 12, 48, 15, 54, 6, 36, 6, 39, 24, 24, 0,
24, 3, 33, 24, 18, 18, 66, 12, 18, 12, 30, 12, 75, 15, 36, 0, 30, 9,
24, 6, 21, 24, 24, 12, 60, 0, 66, 36, 12, 18, 36, 0, 24, 6, 30, 18,
39, 18, 30, 12, 24, 9, 30, 6, 36, 18, 18, 0, 54, 12, 33, 24, 36, 6,
66, 0, 30, 6, 12, 12, 33, 24, 54, 0, 18, 3, 60, 3, 30, 24, 24, 21,
48, 0, 18, 30, 51, 12, 18, 0, 30, 12, 33, 15, 18, 12, 30, 27, 24, 0,
48, 12, 45, 6, 30, 0, 72, 0, 51, 18, 27, 27, 54, 9, 48, 12, 27, 30,
36, 18, 18, 0, 42, 3, 36, 9, 45, 30, 6, 6, 36, 3, 51, 24, 24, 18,
72, 0, 18, 6, 9, 36, 42, 0, 36, 9, 30, 12, 60, 30, 24, 15, 24, 0,
36, 6, 30, 27, 27, 18, 42, 12, 48, 0, 42, 0, 33, 24, 24, 0, 30, 0,
42, 12, 48, 9, 36, 9, 24, 6, 27, 36, 12, 9, 60, 0, 30, 12, 15, 18,
42, 18, 36, 18, 24, 7, 48, 12, 54, 24, 30, 0, 78, 0, 18, 18, 27, 24,
24, 6, 30, 12, 33, 18, 60, 15, 54, 0, 12, 12, 36, 12, 36, 24, 30, 18,
54, 0, 18, 18, 18, 24, 84, 0, 54, 0, 27, 15, 42, 6, 36, 12, 18, 9,
54, 6, 30, 30, 24, 0, 30, 9, 60, 30, 36, 6, 42, 12, 30, 6, 6, 30,
60, 0, 18, 0, 24, 9, 51, 18, 24, 33, 30, 0, 42, 12, 60, 18, 18, 36,
18, 0, 24, 0, 18, 9, 78, 12, 48, 24, 12, 0, 48, 6, 12, 18, 42, 0,
48, 0, 30, 27, 18, 6, 48, 3, 66, 21, 18, 18, 33, 12, 48, 0, 30, 6,
63, 21, 18, 36, 24, 15, 60, 6, 36, 30, 36, 0, 48, 0, 48, 3, 36, 30,
42, 18, 24, 24, 12, 6, 21, 6, 72, 12, 36, 0, 60, 6, 12, 18, 15, 24,
60, 9, 30, 0, 39, 30, 54, 12, 18, 0, 18, 3, 60, 9, 57, 24, 6, 18,
48, 6, 60, 18, 18, 9, 48, 0, 24, 12, 18, 18, 39, 6, 42, 15, 36, 6,
36, 18, 18, 30, 18, 0, 42, 6, 39, 27, 27, 18, 48, 12, 42, 12, 24, 18,
27, 9, 30, 0, 24, 9, 81, 12, 72, 12, 30, 6, 36, 0, 33, 42, 39, 30,
42, 0, 12, 3, 12, 6, 24, 18, 48, 12, 48, 3, 63, 24, 24, 27, 30, 0,
78, 6, 36, 18, 36, 30, 30, 12, 36, 12, 30, 6, 60, 12, 48, 0, 24, 0,
36, 21, 30, 24, 30, 12, 48, 0, 36, 12, 24, 27, 36, 0, 42, 12, 27, 24,
54, 6, 18, 12, 48, 0, 30, 6, 72, 24, 12, 0, 30, 3, 45, 24, 0, 18,
78, 15, 18, 18, 39, 18, 39, 9, 36, 0, 24, 6, 39, 12, 30, 18, 30, 16,
48, 0, 36, 30, 12, 12, 60, 0, 42, 3, 24, 21, 84, 33, 30, 12, 18, 18,
48, 12, 36, 12, 30, 0, 48, 9, 42, 36, 42, 6, 48, 3, 42, 0, 33, 24,
30, 12, 36, 0, 36, 6, 54, 12, 30, 30, 6, 21, 66, 0, 39, 24, 36, 24,
36, 0, 24, 12, 30, 15, 54, 12, 78, 30, 6, 0, 33, 12, 27, 30, 30, 0,
36, 6, 18, 36, 36, 6, 66, 3, 60, 6, 18, 30, 42, 0, 12, 0, 36, 6,
54, 6, 33, 24, 24, 12, 54, 0, 42, 12, 15, 12, 60, 0, 30, 0, 21, 18,
75, 18, 48, 18, 18, 15, 30, 24, 42, 33, 36, 0, 30, 6, 45, 24, 9, 30,
36, 3, 54, 15, 24, 18, 63, 18, 42, 0, 24, 0, 75, 6, 30, 9, 30, 15,
42, 12, 33, 36, 21, 24, 60, 0, 54, 9, 30, 30, 48, 12, 18, 12, 24, 0,
66, 12, 24, 18, 36, 0, 72, 6, 36, 15, 27, 27, 30, 6, 12, 18, 24, 6,
78, 15, 42, 0, 12, 6, 27, 24, 51, 18, 36, 12, 60, 3, 51, 30, 12, 24,
36, 0, 30, 0, 48, 12, 21, 6, 36, 24, 54, 6, 42, 6, 36, 36, 6, 0,
54, 12, 27, 15, 18, 18, 66, 6, 42, 0, 15, 30, 63, 12, 48, 0, 36, 3,
63, 12, 36, 30, 18, 9, 48, 3, 48, 36, 30, 12, 42, 0, 72, 6, 36, 30,
30, 12, 24, 12, 6, 15, 75, 18, 30, 6, 36, 0, 24, 0, 18, 36, 48, 18,
60, 18, 60, 12, 33, 12, 33, 15, 72, 0, 18, 9, 54, 15, 21, 30, 36, 12,
30, 0, 42, 24, 48, 18, 36, 0, 24, 6, 18, 15, 81, 12, 12, 27, 36, 12,
30, 6, 36, 18, 24, 0, 48, 6, 36, 36, 27, 6, 48, 9, 36, 3, 36, 36,
36, 24, 30, 0, 24, 1, 42, 6, 66, 27, 24, 18, 48, 12, 51, 18, 24, 18,
84, 0, 24, 6, 12, 9, 63, 18, 48, 9, 30, 0, 36, 12, 33, 24, 30, 0,
72, 0, 42, 48, 36, 18, 42, 12, 42, 15, 24, 12, 60, 15, 24, 0, 12, 21,
72, 3, 42, 30, 24, 18, 36, 6, 42, 18, 30, 12, 42, 0, 48, 12, 12, 24,
24, 18, 66, 6, 24, 0, 93, 12, 51, 30, 12, 0, 54, 6, 18, 27, 24, 24,
36, 12, 30, 0, 45, 18, 60, 6, 54, 0, 24, 0, 51, 24, 21, 18, 30, 6,
72, 6, 6, 18, 21, 36, 42, 0, 48, 12, 27, 24, 36, 6, 30, 27, 30, 6,
39, 18, 51, 36, 30, 0, 42, 0, 66, 18, 36, 6, 66, 9, 24, 12, 24, 24,
78, 12, 36, 0, 36, 12, 60, 15, 42, 24, 6, 15, 54, 0, 33, 30, 21, 30,
42, 0, 54, 0, 24, 9, 60, 9, 36, 24, 24, 6, 66, 12, 48, 18, 54, 0,
30, 0, 30, 39, 30, 18, 48, 6, 42, 12, 33, 24, 33, 12, 60, 0, 18, 6,
42, 24, 42, 24, 6, 12, 72, 6, 42, 30, 18, 9, 30, 0, 24, 15, 30, 18,
60, 12, 54, 15, 24, 0, 48, 24, 33, 12, 36, 0, 66, 6, 36, 18, 21, 30,
72, 3, 24, 9, 27, 30, 30, 18, 42, 0, 42, 0, 72, 6, 39, 42, 24, 18,
60, 3, 24, 18, 36, 18, 30, 0, 54, 6, 27, 33, 60, 12, 24, 24, 18, 18,
30, 12, 21, 33, 48, 0, 78, 12, 78, 12, 30, 12, 42, 12, 48, 0, 24, 12,
75, 18, 24, 0, 18, 0, 33, 24, 30, 21, 42, 15, 30, 12, 39, 30, 51, 12,
54, 0, 36, 12, 18, 12, 48, 24, 78, 18, 18, 6, 78, 6, 24, 30, 12, 0,
42, 0, 45, 18, 15, 27, 42, 0, 54, 18, 36, 18, 36, 6, 48, 0, 30, 12,
36, 21, 45, 6, 24, 7, 54, 0, 27, 42, 33, 24, 72, 0, 42, 0, 48, 24,
45, 18, 18, 15, 36, 15, 66, 6, 66, 30, 18, 0, 48, 0, 27, 39, 30, 18,
66, 27, 12, 12, 18, 24, 60, 6, 66, 0, 42, 0, 42, 6, 33, 21, 36, 12,
42, 6, 21, 36, 33, 21, 48, 0, 66, 12, 6, 18, 75, 24, 36, 12, 18, 0,
81, 12, 42, 30, 36, 0, 24, 0, 30, 30, 30, 6, 60, 9, 60, 6, 24, 30,
30, 6, 30, 0, 30, 12, 75, 18, 30, 24, 24, 15, 78, 0, 42, 24, 18, 30,
42, 0, 30, 12, 21, 12, 48, 9, 60, 21, 30, 12, 24, 24, 39, 21, 24, 0,
54, 3, 39, 30, 33, 24, 72, 12, 60, 0, 18, 24, 57, 12, 24, 0, 24, 3,
90, 9, 12, 21, 36, 12, 30, 18, 84, 24, 30, 9, 60, 0, 36, 18, 18, 24,
78, 18, 24, 18, 48, 6, 24, 0, 45, 30, 24, 0, 66, 3, 60, 36, 21, 42,
42, 6, 30, 6, 33, 12, 60, 21, 36, 0, 6, 6, 36, 15, 36, 30, 48, 21,
48, 0, 39, 36, 36, 6, 54, 0, 66, 3, 18, 18, 33, 24, 36, 18, 30, 9,
66, 6, 15, 36, 24, 0, 96, 6, 30, 12, 42, 6, 36, 6, 36, 9, 27, 36,
42, 12, 42, 0, 18, 6, 51, 12, 78, 18, 30, 9, 54, 12, 39, 24, 24, 33,
66, 0, 36, 9, 45, 33, 36, 12, 18, 27, 36, 0, 78, 12, 48, 24, 30, 0,
42, 9, 48, 21, 18, 9, 60, 12, 54, 6, 21, 24, 72, 3, 66, 0, 18, 18,
33, 12, 21, 36, 36, 6, 36, 6, 60, 36, 36, 18, 48, 0, 24, 0, 30, 24,
87, 24, 24, 27, 42, 6, 60, 18, 66, 6, 18, 0, 36, 6, 39, 36, 30, 18,
36, 9, 30, 0, 18, 18, 51, 12, 48, 0, 54, 0, 48, 18, 36, 30, 36, 30,
66, 3, 12, 18, 15, 39, 60, 0, 24, 12, 66, 6, 54, 12, 48, 6, 18, 7,
30, 24, 48, 18, 30, 0, 84, 0, 30, 48, 12, 15, 60, 9, 42, 18, 42, 18,
42, 18, 48, 0, 30, 9, 48, 21, 69, 36, 12, 12, 48, 0, 57, 18, 24, 24,
66, 0, 36, 6, 24, 21, 69, 6, 54, 12, 30, 18, 72, 18, 30, 30, 18, 0,
42, 0, 42, 42, 12, 18, 42, 6, 54, 9, 42, 12, 72, 18, 24, 0, 24, 3,
78, 0, 24, 24, 30, 15, 60, 6, 42, 30, 39, 21, 36, 0, 54, 12, 27, 24,
42, 24, 72, 21, 30, 0, 48, 18, 24, 30, 12, 0, 30, 3, 24, 15, 72, 33,
42, 6, 24, 24, 12, 24, 66, 12, 60, 0, 24, 6, 63, 12, 42, 18, 24, 18,
84, 6, 30, 24, 24, 6, 90, 0, 72, 6, 21, 24, 30, 18, 18, 30, 24, 6,
66, 18, 54, 18, 36, 0, 36, 12, 60, 27, 30, 18, 90, 18, 18, 0, 18, 24,
48, 24, 30, 0, 36, 6, 36, 18, 66, 36, 30, 3, 66, 3, 57, 48, 12, 18,
36, 0, 48, 6, 36, 21, 48, 0, 60, 12, 36, 12, 72, 0, 36, 30, 30, 0,
48, 0, 33, 30, 48, 9, 54, 9, 36, 24, 18, 30, 42, 18, 54, 0, 12, 0,
54, 12, 21, 24, 30, 21, 72, 0, 66, 24, 27, 18, 36, 0, 24, 0, 45, 24,
78, 0, 42, 21, 24, 12, 39, 30, 54, 30, 24, 0, 84, 15, 24, 24, 9, 30,
54, 9, 48, 6, 33, 18, 57, 18, 30, 0, 60, 3, 54, 27, 33, 30, 36, 24,
42, 0, 54, 18, 39, 24, 54, 0, 60, 18, 24, 15, 75, 12, 24, 12, 42, 0,
39, 12, 36, 36, 36, 0, 30, 3, 66, 42, 15, 24, 72, 12, 48, 12, 42, 12,
48, 15, 24, 0, 18, 18, 60, 6, 60, 18, 36, 9, 24, 6, 27, 36, 30, 24,
90, 0, 60, 3, 21, 18, 54, 24, 48, 18, 18, 12, 51, 24, 39, 18, 18, 0,
72, 12, 42, 21, 36, 24, 36, 6, 36, 0, 33, 18, 42, 0, 60, 0, 18, 6,
42, 21, 39, 39, 36, 13, 84, 6, 24, 18, 30, 24, 78, 0, 36, 3, 54, 39,
51, 18, 30, 21, 24, 3, 60, 12, 87, 42, 30, 0, 36, 6, 30, 15, 36, 12,
54, 18, 42, 12, 27, 24, 84, 15, 42, 0, 18, 9, 54, 18, 30, 30, 48, 12,
72, 0, 54, 42, 9, 12, 36, 0, 60, 0, 27, 21, 78, 18, 42, 30, 30, 6,
54, 6, 30, 18, 24, 0, 60, 12, 42, 36, 48, 24, 54, 6, 36, 15, 12, 48,
21, 12, 30, 0, 36, 0, 102, 6, 18, 12, 24, 9, 60, 12, 48, 24, 33, 30,
66, 0, 30, 12, 30, 15, 60, 12, 54, 36, 30, 0, 36, 6, 72, 18, 36, 0,
54, 0, 30, 36, 9, 15, 60, 0, 60, 15, 39, 12, 63, 18, 42, 0, 30, 18,
60, 21, 57, 30, 0, 18, 54, 3, 75, 30, 48, 24, 42, 0, 24, 12, 36, 42,
57, 9, 48, 9, 36, 6, 45, 12, 24, 48, 54, 0, 66, 0, 45, 33, 30, 18,
54, 18, 36, 0, 36, 6, 54, 30, 54, 0, 36, 0, 66, 12, 42, 21, 24, 18,
48, 6, 21, 48, 42, 12, 60, 0, 84, 12, 0, 12, 54, 24, 36, 18, 18, 12,
81, 18, 33, 18, 12, 0, 66, 3, 66, 6, 33, 48, 48, 6, 24, 24, 36, 18,
60, 6, 36, 0, 24, 6, 39, 21, 42, 18, 42, 12, 60, 0, 24, 30, 33, 36,
72, 0, 30, 0, 36, 36, 42, 12, 36, 15, 24, 15, 75, 30, 63, 27, 24, 0,
42, 6, 63, 30, 18, 12, 108, 9, 48, 12, 24, 12, 72, 18, 30, 0, 54, 6,
30, 9, 63, 27, 48, 15, 36, 6, 48, 36, 18, 12, 54, 0, 42, 9, 36, 36,
63, 18, 36, 24, 36, 0, 75, 6, 63, 24, 36, 0, 48, 6, 27, 39, 30, 18,
30, 9, 54, 18, 36, 18, 39, 21, 66, 0, 30, 0, 54, 18, 42, 36, 12, 24,
108, 0, 30, 24, 42, 12, 48, 0, 24, 0, 15, 9, 48, 18, 66, 24, 24, 12,
54, 12, 36, 21, 54, 0, 54, 18, 45, 42, 36, 24, 42, 3, 36, 0, 42, 48,
42, 12, 36, 0, 36, 1, 60, 18, 36, 18, 36, 15, 54, 9, 60, 30, 24, 21,
48, 0, 24, 18, 24, 18, 90, 6, 72, 15, 36, 9, 48, 6, 36, 42, 48, 0,
78, 3, 54, 27, 18, 36, 48, 15, 54, 12, 30, 24, 84, 12, 18, 0, 18, 12,
105, 12, 24, 30, 30, 18, 36, 0, 60, 30, 27, 12, 48, 0, 90, 6, 18, 18,
33, 21, 42, 24, 24, 12, 45, 24, 60, 36, 36, 0, 66, 6, 27, 15, 42, 24,
60, 12, 18, 9, 30, 18, 84, 12, 72, 0, 12, 6, 42, 21, 45, 12, 18, 9,
96, 12, 21, 30, 30, 24, 66, 0, 48, 12, 42, 18, 36, 18, 24, 24, 24, 0,
30, 12, 27, 42, 18, 0, 72, 0, 84, 27, 54, 15, 102, 12, 36, 6, 39, 36,
36, 15, 36, 0, 30, 15, 57, 12, 57, 42, 30, 9, 60, 6, 27, 42, 27, 30,
36, 0, 54, 6, 24, 21, 78, 12, 42, 18, 18, 12, 84, 18, 54, 18, 48, 0,
66, 12, 15, 36, 30, 18, 72, 9, 66, 0, 27, 18, 24, 6, 78, 0, 42, 6,
81, 27, 27, 36, 24, 24, 48, 0, 72, 18, 39, 30, 42, 0, 18, 18, 30, 24,
78, 6, 18, 18, 36, 0, 48, 30, 84, 6, 18, 0, 54, 0, 42, 36, 12, 30,
90, 12, 48, 18, 24, 18, 21, 18, 48, 0, 60, 0, 60, 6, 30, 42, 24, 18,
66, 0, 27, 36, 24, 18, 54, 0, 48, 6, 30, 18, 90, 15, 42, 9, 48, 18,
42, 6, 45, 24, 36, 0, 48, 0, 78, 39, 27, 12, 42, 27, 48, 6, 45, 18,
72, 36, 48, 0, 18, 9, 66, 9, 54, 33, 18, 18, 66, 12, 39, 36, 45, 12,
72, 0, 48, 12, 21, 39, 33, 18, 60, 18, 36, 0, 78, 18, 39, 36, 24, 0,
30, 0, 30, 30, 54, 21, 66, 6, 30, 21, 39, 18, 60, 15, 72, 0, 30, 18,
45, 12, 39, 18, 60, 6, 66, 15, 36, 30, 12, 18, 60, 0, 60, 0, 18, 33,
57, 18, 24, 24, 42, 6, 66, 12, 81, 42, 18, 0, 36, 6, 42, 18, 24, 24,
72, 0, 18, 0, 30, 30, 87, 18, 36, 0, 42, 3, 45, 12, 36, 42, 24, 25,
30, 6, 72, 24, 18, 18, 60, 0, 102, 12, 42, 12, 90, 12, 24, 27, 24, 12,
69, 24, 30, 18, 42, 0, 48, 0, 42, 45, 39, 15, 60, 18, 30, 12, 33, 24,
72, 18, 36, 0, 24, 12, 51, 24, 39, 36, 24, 6, 120, 0, 72, 24, 30, 30,
30, 0, 24, 12, 72, 18, 54, 3, 84, 30, 30, 21, 42, 24, 30, 18, 30, 0,
54, 0, 36, 30, 24, 30, 72, 9, 72, 6, 30, 24, 36, 24, 30, 0, 30, 0,
90, 12, 48, 27, 24, 6, 54, 12, 39, 36, 18, 18, 78, 0, 36, 12, 18, 39,
66, 6, 54, 18, 36, 0, 54, 18, 42, 12, 30, 0, 78, 0, 48, 45, 27, 36,
36, 9, 54, 15, 6, 12, 99, 15, 48, 0, 24, 3, 60, 12, 45, 36, 36, 30,
24, 12, 57, 30, 42, 18, 54, 0, 36, 6, 45, 24, 63, 30, 60, 12, 42, 6,
102, 18, 30, 33, 18, 0, 84, 12, 54, 24, 39, 12, 42, 0, 36, 0, 54, 24,
60, 12, 42, 0, 48, 6, 30, 9, 93, 24, 18, 21, 60, 6, 21, 36, 18, 54,
102, 0, 30, 18, 36, 21, 48, 12, 30, 27, 42, 3, 54, 12, 66, 36, 36, 0,
48, 9, 45, 33, 30, 9, 84, 18, 30, 12, 33, 36, 51, 12, 54, 0, 36, 18,
42, 12, 30, 36, 24, 9, 72, 0, 48, 30, 36, 6, 78, 0, 42, 0, 18, 24,
63, 21, 36, 18, 24, 15, 66, 0, 42, 27, 54, 0, 30, 9, 51, 45, 45, 24,
48, 12, 72, 12, 33, 24, 39, 30, 66, 0, 18, 6, 69, 12, 36, 24, 36, 18,
90, 6, 60, 24, 36, 27, 36, 0, 60, 18, 33, 21, 84, 12, 36, 30, 18, 0,
33, 24, 51, 30, 24, 0, 84, 0, 57, 33, 36, 21, 84, 12, 30, 12, 33, 36,
63, 18, 24, 0, 30, 6, 90, 21, 66, 30, 30, 24, 36, 0, 54, 12, 51, 18,
78, 0, 36, 0, 18, 18, 54, 21, 48, 12, 66, 18, 21, 18, 33, 21, 42, 0,
66, 6, 48, 54, 21, 30, 66, 12, 66, 0, 24, 24, 63, 24, 36, 0, 42, 3,
60, 18, 30, 6, 36, 9, 54, 6, 72, 48, 36, 15, 54, 0, 30, 27, 12, 18,
60, 12, 66, 15, 48, 10, 84, 12, 39, 42, 12, 0, 66, 6, 24, 18, 21, 36,
54, 24, 24, 12, 51, 18, 66, 12, 90, 0, 18, 6, 87, 15, 75, 24, 30, 15,
60, 0, 24, 42, 24, 24, 48, 0, 84, 6, 51, 39, 60, 12, 18, 30, 36, 12,
60, 12, 60, 48, 36, 0, 54, 6, 42, 12, 6, 18, 78, 6, 48, 12, 12, 36,
84, 0, 48, 0, 54, 3, 48, 18, 45, 51, 54, 6, 72, 6, 51, 30, 45, 30,
48, 0, 36, 6, 36, 15, 78, 24, 42, 24, 24, 0, 90, 18, 36, 24, 24, 0,
36, 0, 36, 30, 30, 30, 66, 6, 78, 21, 30, 12, 21, 15, 60, 0, 36, 12,
66, 21, 36, 24, 30, 18, 60, 9, 54, 48, 24, 18, 48, 0, 30, 6, 42, 18,
81, 18, 54, 27, 24, 12, 30, 18, 84, 30, 24, 0, 102, 9, 42, 42, 36, 24,
90, 3, 30, 0, 60, 30, 42, 18, 24, 0, 18, 0, 78, 12, 42, 27, 42, 18,
66, 18, 45, 18, 42, 9, 84, 0, 54, 6, 15, 54, 63, 18, 54, 24, 24, 9,
57, 24, 45, 54, 36, 0, 60, 0, 66, 27, 33, 18, 30, 9, 60, 24, 30, 12,
54, 21, 24, 0, 12, 18, 108, 15, 66, 12, 30, 27, 66, 0, 36, 30, 36, 24,
66, 0, 60, 0, 9, 24, 54, 12, 90, 15, 42, 0, 51, 30, 18, 30, 48, 0,
84, 9, 48, 21, 54, 30, 24, 18, 36, 12, 45, 18, 96, 6, 30, 0, 30, 9,
30, 24, 42, 24, 24, 15, 66, 6, 69, 36, 15, 15, 84, 0, 36, 15, 48, 27,
45, 18, 42, 30, 36, 0, 66, 6, 72, 30, 48, 0, 42, 3, 51, 39, 30, 33,
78, 12, 24, 18, 30, 18, 105, 21, 72, 0, 42, 12, 39, 18, 27, 42, 24, 6,
66, 3, 60, 42, 30, 30, 60, 0, 54, 6, 54, 24, 57, 6, 54, 6, 24, 24,
54, 12, 57, 27, 42, 0, 48, 6, 36, 27, 57, 12, 84, 12, 60, 0, 12, 30,
54, 24, 48, 0, 18, 3, 105, 36, 48, 42, 24, 18, 48, 6, 30, 36, 45, 42,
42, 0, 54, 9, 36, 12, 48, 12, 54, 30, 30, 6, 48, 6, 51, 18, 36, 0,
102, 6, 18, 30, 33, 24, 48, 18, 60, 12, 60, 30, 45, 12, 36, 0, 54, 12,
60, 6, 48, 54, 12, 13, 60, 0, 72, 18, 24, 6, 90, 0, 48, 12, 15, 42,
96, 18, 36, 18, 36, 6, 78, 24, 48, 18, 30, 0, 48, 18, 78, 42, 24, 30,
60, 6, 60, 12, 18, 12, 42, 30, 42, 0, 24, 0, 81, 9, 54, 18, 60, 33,
48, 0, 27, 54, 51, 27, 90, 0, 60, 18, 24, 18, 54, 24, 36, 12, 42, 0,
87, 24, 33, 18, 24, 0, 96, 0, 87, 36, 30, 15, 42, 12, 36, 24, 24, 36,
42, 21, 48, 0, 30, 6, 42, 18, 48, 24, 24, 18, 84, 3, 36, 42, 42, 36,
72, 0, 54, 6, 30, 15, 60, 6, 78, 30, 24, 6, 72, 6, 66, 45, 24, 0,
42, 21, 36, 30, 36, 18, 48, 12, 30, 0, 39, 24, 102, 18, 36, 0, 12, 6,
54, 6, 30, 33, 66, 21, 90, 3, 78, 36, 9, 18, 36, 0, 84, 0, 30, 30,
93, 24, 30, 24, 30, 15, 63, 12, 48, 30, 54, 0, 48, 0, 54, 42, 42, 30,
78, 0, 36, 24, 39, 24, 60, 12, 78, 0, 60, 6, 51, 30, 36, 36, 30, 18,
60, 0, 30, 30, 51, 24, 60, 0, 42, 3, 24, 9, 54, 21, 24, 33, 30, 24,
66, 24, 69, 18, 30, 0, 102, 15, 54, 24, 15, 30, 120, 6, 30, 3, 51, 24,
54, 12, 30, 0, 36, 6, 36, 12, 90, 42, 12, 12, 60, 12, 60, 24, 42, 12,
90, 0, 24, 12, 42, 30, 30, 6, 78, 21, 42, 0, 54, 24, 27, 54, 24, 0,
66, 6, 45, 30, 12, 30, 42, 12, 84, 15, 36, 18, 84, 24, 36, 0, 30, 18,
72, 18, 60, 24, 48, 12, 54, 6, 36, 54, 42, 12, 42, 0, 60, 0, 51, 48,
54, 9, 36, 27, 24, 6, 84, 18, 48, 30, 42, 0, 78, 0, 48, 27, 27, 48,
42, 18, 36, 0, 39, 18, 99, 24, 102, 0, 18, 0, 48, 18, 72, 15, 36, 12,
84, 12, 24, 12, 30, 39, 84, 0, 36, 12, 39, 39, 63, 24, 42, 24, 66, 6,
72, 18, 18, 24, 30, 0, 60, 6, 48, 42, 36, 15, 78, 6, 48, 30, 12, 36,
54, 12, 36, 0, 42, 6, 45, 6, 69, 24, 72, 21, 48, 0, 57, 48, 12, 24,
48, 0, 48, 3, 48, 15, 78, 24, 60, 18, 12, 12, 111, 24, 54, 24, 24, 0,
48, 6, 36, 33, 42, 6, 54, 9, 72, 18, 27, 30, 30, 12, 54, 0, 66, 4,
78, 21, 24, 54, 18, 24, 54, 6, 60, 24, 54, 21, 78, 0, 36, 18, 54, 30,
66, 18, 48, 30, 24, 0, 42, 12, 99, 36, 30, 0, 90, 6, 18, 30, 30, 24,
78, 6, 66, 9, 24, 42, 78, 30, 42, 0, 18, 12, 102, 6, 33, 24, 18, 12,
66, 9, 54, 24, 24, 36, 84, 0, 60, 6, 39, 15, 78, 12, 42, 21, 42, 18,
42, 18, 18, 42, 24, 0, 48, 3, 105, 51, 42, 30, 42, 18, 72, 0, 24, 24,
102, 6, 36, 0, 36, 9, 99, 12, 48, 21, 48, 18, 42, 6, 36, 42, 18, 12,
78, 0, 48, 30, 30, 18, 36, 30, 42, 9, 42, 6, 60, 12, 39, 30, 24, 0,
78, 0, 48, 30, 39, 27, 102, 24, 30, 12, 51, 12, 66, 9, 48, 0, 30, 18,
45, 39, 87, 30, 36, 9, 72, 0, 60, 24, 30, 36, 54, 0, 48, 0, 45, 36,
45, 18, 42, 27, 60, 9, 66, 12, 78, 42, 18, 0, 60, 6, 60, 33, 36, 24,
96, 12, 18, 12, 12, 36, 72, 0, 78, 0, 36, 6, 60, 24, 27, 51, 42, 24,
84, 12, 57, 48, 30, 24, 42, 0, 60, 12, 24, 18, 96, 12, 30, 30, 30, 0,
93, 18, 48, 18, 60, 0, 48, 6, 54, 36, 30, 12, 42, 9, 60, 18, 12, 24,
69, 6, 60, 0, 54, 6, 33, 15, 60, 36, 30, 18, 90, 3, 72, 24, 54, 54,
42, 0, 18, 9, 60, 30, 84, 18, 48, 24, 12, 6, 66, 36, 24, 27, 24, 0,
42, 12, 39, 42, 27, 18, 108, 9, 78, 0, 48, 12, 54, 30, 30, 0, 36, 0,
48, 12, 75, 39, 30, 6, 42, 9, 66, 30, 33, 18, 96, 0, 48, 18, 39, 36,
102, 12, 54, 18, 24, 9, 45, 24, 72, 30, 36, 0, 78, 6, 63, 36, 36, 21,
60, 9, 36, 12, 54, 24, 78, 27, 42, 0, 42, 18, 60, 9, 24, 24, 54, 39,
84, 0, 27, 36, 39, 12, 84, 0, 66, 0, 21, 30, 30, 42, 66, 18, 18, 18,
78, 12, 48, 42, 36, 0, 90, 6, 48, 33, 39, 24, 48, 15, 54, 15, 54, 24,
48, 18, 60, 0, 24, 0, 48, 24, 78, 24, 36, 9, 90, 12, 42, 24, 30, 45,
54, 0, 66, 12, 24, 12, 60, 6, 48, 33, 48, 0, 60, 6, 51, 54, 12, 0,
30, 0, 69, 21, 42, 15, 72, 15, 48, 21, 33, 36, 96, 6, 30, 0, 54, 6,
87, 30, 42, 30, 36, 13, 42, 6, 84, 48, 18, 18, 72, 0, 54, 12, 30, 30,
75, 24, 36, 24, 42, 18, 78, 12, 36, 30, 72, 0, 48, 6, 33, 36, 57, 36,
66, 6, 54, 0, 27, 36, 66, 12, 90, 0, 24, 3, 96, 24, 27, 24, 18, 24,
108, 12, 42, 48, 24, 18, 30, 0, 54, 18, 48, 12, 75, 18, 90, 21, 36, 12,
72, 12, 45, 24, 24, 0, 114, 0, 27, 30, 39, 33, 48, 12, 54, 12, 18, 42,
45, 27, 48, 0, 48, 6, 90, 9, 60, 42, 36, 12, 48, 0, 36, 42, 42, 18,
78, 0, 30, 6, 24, 33, 78, 9, 84, 30, 18, 15, 63, 18, 51, 30, 48, 0,
72, 6, 36, 51, 24, 30, 48, 21, 96, 6, 24, 6, 93, 12, 48, 0, 18, 6,
69, 18, 36, 18, 24, 18, 24, 6, 54, 36, 51, 33, 96, 0, 36, 15, 27, 30,
54, 30, 42, 12, 36, 0, 117, 36, 54, 36, 24, 0, 96, 3, 72, 36, 57, 27,
54, 6, 54, 21, 36, 12, 66, 33, 60, 0, 30, 24, 24, 15, 63, 30, 42, 24,
78, 9, 39, 30, 24, 24, 138, 0, 42, 0, 54, 24, 57, 12, 30, 24, 42, 18,
54, 6, 60, 33, 24, 0, 72, 6, 84, 24, 42, 6, 66, 15, 36, 0, 42, 48,
51, 18, 66, 0, 60, 3, 60, 12, 60, 57, 42, 9, 72, 12, 60, 42, 27, 24,
60, 0, 42, 18, 24, 30, 48, 30, 36, 18, 30, 9, 78, 12, 51, 18, 30, 0,
60, 0, 12, 57, 51, 18, 78, 6, 102, 12, 30, 24, 48, 27, 36, 0, 30, 12,
126, 6, 27, 36, 30, 18, 66, 0, 60, 30, 48, 36, 48, 0, 24, 6, 39, 24,
96, 12, 90, 33, 36, 6, 39, 6, 90, 27, 36, 0, 60, 12, 45, 42, 30, 30,
72, 12, 36, 9, 39, 36, 69, 24, 48, 0, 36, 6, 66, 15, 72, 39, 36, 27,
54, 18, 57, 30, 42, 12, 60, 0, 84, 24, 36, 27, 72, 12, 48, 21, 60, 0,
51, 30, 27, 30, 90, 0, 78, 0, 42, 57, 12, 30, 48, 18, 42, 6, 48, 24,
90, 15, 42, 0, 12, 15, 84, 24, 72, 18, 48, 21, 66, 3, 54, 42, 30, 24,
48, 0, 36, 18, 27, 12, 42, 9, 108, 18, 36, 12, 96, 24, 21, 30, 24, 0,
96, 9, 54, 18, 75, 30, 54, 18, 36, 0, 39, 18, 84, 18, 42, 0, 24, 6,
54, 18, 57, 42, 24, 9, 84, 18, 48, 42, 27, 30, 78, 0, 60, 0, 30, 48,
36, 6, 30, 36, 6, 10, 78, 12, 51, 48, 48, 0, 90, 0, 75, 9, 42, 24,
48, 15, 72, 12, 33, 42, 108, 12, 54, 0, 54, 18, 51, 42, 36, 48, 48, 12,
72, 0, 42, 18, 45, 30, 66, 0, 78, 3, 36, 15, 78, 30, 30, 30, 30, 15,
102, 12, 54, 18, 30, 0, 36, 6, 81, 48, 12, 24, 108, 6, 78, 18, 24, 36,
33, 18, 30, 0, 30, 0, 108, 21, 54, 42, 18, 18, 90, 6, 30, 48, 69, 36,
48, 0, 24, 15, 24, 15, 84, 24, 114, 6, 30, 0, 48, 6, 60, 42, 24, 0,
102, 12, 42, 42, 27, 21, 78, 9, 42, 24, 51, 24, 42, 12, 48, 0, 60, 12,
66, 6, 42, 24, 30, 24, 42, 0, 78, 24, 54, 12, 66, 0, 30, 6, 24, 51,
99, 18, 60, 24, 42, 18, 54, 6, 45, 60, 36, 0, 54, 6, 39, 39, 39, 30,
66, 18, 72, 0, 51, 24, 102, 12, 54, 0, 24, 0, 102, 12, 48, 24, 42, 36,
60, 0, 12, 48, 18, 12, 54, 0, 84, 18, 39, 9, 84, 30, 66, 18, 48, 15,
72, 48, 39, 42, 48, 0, 60, 0, 84, 30, 45, 33, 54, 6, 54, 30, 33, 30,
90, 6, 54, 0, 24, 6, 72, 27, 78, 12, 24, 15, 66, 0, 54, 36, 21, 42,
114, 0, 60, 3, 30, 33, 54, 27, 30, 33, 60, 6, 54, 12, 48, 33, 36, 0,
42, 12, 45, 39, 24, 36, 96, 18, 24, 12, 33, 18, 99, 18, 66, 0, 36, 0,
51, 24, 30, 30, 36, 15, 84, 6, 102, 48, 48, 18, 60, 0, 72, 12, 36, 42,
60, 12, 24, 21, 30, 0, 54, 18, 60, 18, 42, 0, 66, 6, 24, 24, 54, 15,
78, 12, 42, 27, 27, 30, 51, 27, 78, 0, 48, 6, 120, 27, 48, 42, 24, 12,
54, 6, 54, 24, 48, 36, 66, 0, 78, 9, 57, 21, 48, 18, 54, 33, 24, 30,
84, 18, 45, 33, 30, 0, 126, 9, 36, 30, 27, 30, 66, 18, 54, 0, 36, 42,
48, 6, 42, 0, 54, 6, 57, 12, 84, 54, 48, 6, 60, 6, 63, 18, 42, 36,
78, 0, 24, 24, 33, 24, 105, 24, 66, 27, 48, 0, 48, 30, 60, 30, 54, 0,
42, 3, 75, 48, 24, 12, 66, 12, 96, 6, 30, 12, 87, 21, 36, 0, 30, 24,
69, 12, 57, 30, 48, 24, 54, 0, 42, 54, 24, 24, 72, 0, 60, 0, 48, 24,
69, 24, 42, 18, 36, 12, 66, 24, 36, 42, 18, 0, 78, 9, 48, 36, 42, 42,
36, 12, 36, 21, 78, 18, 48, 12, 102, 0, 18, 12, 54, 24, 45, 27, 42, 13,
108, 12, 39, 24, 42, 27, 102, 0, 60, 6, 39, 24, 54, 12, 54, 24, 24, 0,
114, 24, 63, 48, 30, 0, 48, 6, 69, 36, 18, 12, 72, 6, 48, 18, 33, 54,
117, 12, 42, 0, 66, 12, 48, 6, 54, 36, 42, 21, 102, 6, 48, 54, 33, 30,
48, 0, 72, 0, 30, 24, 75, 24, 84, 30, 30, 0, 72, 18, 30, 42, 54, 0,
60, 12, 36, 45, 42, 12, 96, 6, 66, 0, 12, 36, 78, 36, 42, 0, 36, 0,
78, 24, 48, 24, 18, 30, 90, 15, 96, 18, 27, 21, 54, 0, 24, 21, 48, 27,
84, 18, 48, 42, 36, 6, 66, 12, 108, 12, 42, 0, 48, 9, 27, 60, 21, 36,
84, 6, 36, 18, 42, 18, 54, 18, 60, 0, 60, 15, 72, 9, 99, 42, 12, 12,
60, 0, 57, 42, 18, 18, 78, 0, 42, 6, 36, 36, 63, 9, 42, 15, 30, 18,
78, 6, 24, 48, 42, 0, 102, 12, 75, 45, 42, 30, 84, 24, 66, 9, 24, 30,
90, 24, 42, 0, 24, 3, 84, 21, 84, 33, 66, 24, 36, 6, 36, 48, 51, 18,
72, 0, 66, 18, 54, 30, 24, 18, 48, 18, 30, 0, 102, 12, 45, 36, 24, 0,
102, 3, 42, 15, 42, 54, 54, 21, 66, 24, 66, 30, 102, 3, 66, 0, 48, 12,
24, 30, 45, 36, 54, 6, 78, 9, 48, 24, 39, 36, 96, 0, 66, 6, 27, 27,
60, 30, 18, 30, 48, 12, 90, 24, 60, 36, 6, 0, 42, 12, 78, 36, 36, 24,
114, 6, 60, 0, 18, 6, 69, 18, 84, 0, 36, 6, 48, 6, 39, 24, 42, 24,
54, 6, 72, 48, 36, 42, 60, 0, 48, 0, 36, 18, 138, 24, 30, 30, 42, 18,
75, 18, 48, 18, 24, 0, 78, 0, 78, 57, 60, 9, 48, 9, 36, 30, 30, 42,
42, 39, 84, 0, 24, 12, 87, 27, 30, 42, 24, 24, 90, 0, 36, 24, 60, 36,
84, 0, 42, 0, 30, 21, 87, 12, 72, 24, 42, 12, 60, 30, 72, 21, 60, 0,
96, 12, 30, 42, 39, 18, 66, 12, 84, 12, 63, 42, 42, 24, 42, 0, 18, 6,
78, 15, 75, 45, 54, 12, 54, 6, 84, 30, 30, 18, 54, 0, 42, 24, 39, 27,
96, 18, 42, 21, 48, 0, 54, 18, 33, 36, 66, 0, 84, 0, 75, 48, 30, 42,
54, 12, 54, 15, 42, 30, 96, 18, 42, 0, 18, 6, 123, 15, 48, 24, 48, 39,
42, 6, 21, 54, 45, 12, 60, 0, 90, 12, 30, 36, 45, 18, 72, 21, 78, 12,
30, 12, 60, 30, 18, 0, 78, 6, 60, 36, 33, 18, 60, 12, 30, 0, 60, 18,
90, 30, 54, 0, 36, 1, 78, 27, 84, 30, 18, 15, 102, 9, 27, 30, 24, 57,
90, 0, 42, 9, 48, 42, 42, 12, 72, 27, 48, 9, 108, 18, 48, 48, 18, 0,
84, 6, 66, 24, 48, 21, 114, 6, 78, 24, 30, 30, 42, 18, 60, 0, 18, 12,
63, 9, 51, 66, 48, 15, 54, 0, 66, 60, 36, 18, 48, 0, 66, 6, 36, 30,
96, 9, 36, 30, 30, 24, 93, 24, 72, 24, 66, 0, 60, 24, 48, 30, 24, 30,
72, 6, 60, 12, 30, 12, 93, 18, 72, 0, 30, 0, 81, 30, 36, 48, 36, 30,
90, 6, 54, 24, 57, 24, 36, 0, 54, 18, 36, 24, 78, 18, 72, 33, 12, 0,
51, 30, 48, 24, 42, 0, 90, 3, 78, 30, 30, 27, 138, 6, 30, 18, 36, 24,
75, 24, 12, 0, 54, 12, 42, 18, 84, 36, 30, 18, 66, 6, 45, 36, 36, 48,
114, 0, 24, 6, 30, 21, 108, 15, 48, 18, 36, 18, 57, 24, 63, 42, 54, 0,
78, 6, 81, 36, 18, 24, 42, 18, 120, 0, 24, 24, 66, 12, 54, 0, 48, 12,
66, 18, 42, 36, 48, 18, 72, 6, 48, 48, 33, 6, 102, 0, 54, 24, 39, 54,
60, 12, 90, 18, 36, 3, 111, 24, 51, 48, 42, 0, 90, 0, 45, 36, 54, 48,
54, 24, 18, 18, 51, 18, 72, 0, 54, 0, 18, 12, 54, 36, 57, 18, 42, 18,
120, 0, 63, 42, 27, 36, 48, 0, 54, 6, 39, 30, 81, 18, 72, 33, 54, 9,
72, 12, 54, 54, 24, 0, 54, 15, 75, 24, 60, 12, 78, 6, 30, 12, 39, 54,
72, 6, 54, 0, 72, 6, 78, 12, 54, 39, 30, 15, 48, 6, 57, 48, 18, 24,
90, 0, 90, 18, 42, 24, 39, 42, 24, 30, 42, 0, 84, 6, 66, 30, 30, 0,
30, 0, 27, 42, 39, 33, 90, 24, 84, 18, 51, 36, 69, 24, 54, 0, 42, 18,
87, 33, 51, 18, 42, 9, 126, 9, 84, 36, 66, 18, 54, 0, 36, 0, 66, 12,
48, 15, 54, 30, 18, 18, 60, 18, 96, 54, 42, 0, 102, 0, 27, 36, 30, 36,
108, 15, 54, 0, 24, 36, 60, 24, 66, 0, 30, 0, 54, 15, 75, 48, 36, 18,
48, 24, 36, 36, 54, 15, 108, 0, 84, 18};
int main() {
ll N, cnt = 0;
cin >> N;
rep(i, N) { cout << A[i] << endl; }
} | replace | 156 | 210 | 156 | 713 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.