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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03241 | 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, m;
cin >> n >> m;
int ans = 0;
while (1) {
if (m % n == 0) {
ans = m / n;
break;
}
n++;
}
cout << ans << endl;
}
| #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, m;
cin >> n >> m;
int ans = 1;
for (int i = 1; i * i <= m; i++) {
if (m % i)
continue;
if (i >= n)
ans = max(ans, m / i);
if (m / i >= n)
ans = ma... | replace | 8 | 15 | 8 | 16 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int... | insert | 31 | 31 | 31 | 35 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
for (ll i = 1; i <= m; i++) {
ll t = m / i;
if (m % i == 0 and n * t <= m) {
cout << t << endl;
return 0;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
for (ll i = m / n; i >= 1; i--) {
if (m % i == 0 and n * i <= m) {
cout << i << endl;
return 0;
}
}
}
| replace | 9 | 13 | 9 | 12 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP ... | replace | 106 | 112 | 106 | 112 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
static const int INF(1 << 30);
int main() {
int N, M;
cin >> N >> M;
int ans = M / N;
while (ans > 1) {
int mul = N;
while (ans * mul < M) {
mul++;
}
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
static const int INF(1 << 30);
int main() {
int N, M;
cin >> N >> M;
int ans = M / N;
while (ans > 1) {
// int mul = N;
int mul = M / ans - 1;
while (ans * mul ... | replace | 13 | 14 | 13 | 15 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template <class S, class T>
ostream &op... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template <class S, class T>
ostream &op... | insert | 54 | 54 | 54 | 56 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> divisor(ll n) {
vector<ll> res;
for (ll i = 1; i * i < n; i++) {
if (n % i == 0) {
res.push_back(i);
if (i != n / i) {
res.push_back(n / i);
}
}
}
return res;
}
int main() {
int n, m;
cin >> n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> divisor(ll n) {
vector<ll> res;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0) {
res.push_back(i);
if (i != n / i) {
res.push_back(n / i);
}
}
}
return res;
}
int main() {
int n, m;
cin >> ... | replace | 7 | 8 | 7 | 8 | 0 | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#includ... | replace | 235 | 236 | 235 | 236 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
int ans = 0;
for (int i = 1; i <= M / N; ++i) {
if (M % i == 0) {
ans = max(ans, i);
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
int ans = 0;
if (N == 1) {
cout << M << endl;
return 0;
}
for (int i = 1; i <= M / N; ++i) {
if (M % i == 0) {
ans = max(ans, i);
}
}
cout << ans << end... | insert | 9 | 9 | 9 | 13 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
int N, M;
cin >> N >> M;
int max = 0;
for (int i = 1; i <= M / N; i++) {
if (M % i == 0 && M % i <= N) {
max = i;
}
}
cout << max << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
int N, M;
cin >> N >> M;
int max = 0;
if (M % N == 0) {
cout << M / N << endl;
return 0;
}
for (int i = 1; i <= M / N; i++) {
if (M % i == 0 && M % i <= N... | insert | 10 | 10 | 10 | 14 | TLE | |
p03241 | C++ | Time Limit Exceeded |
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <functional>
#inc... |
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#include <functional>
#inc... | replace | 29 | 30 | 29 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpii ve... | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpii ve... | replace | 43 | 44 | 43 | 44 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n, m;
cin >> n >> m;
for (int i = m; i >= 1; i--) {
if (m % i == 0) {
if (m / i >= n)... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n, m;
cin >> n >> m;
for (int i = m / n + 1; i >= 1; i--) {
if (m % i == 0) {
if (m /... | replace | 14 | 15 | 14 | 15 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <mylib.h>
using namespace std;
// cin.sync_with_stdio(false);
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR_EQ(i, a, b) for (int i = (a); i <= (b); ++i)
#define FOR_RE(i, a, b) for (int i = (a); i > (b); --i)
#define rep(i, n) FOR(i, 0, n)
#define rep_eq(i, n) FO... | #include <bits/stdc++.h>
// #include <mylib.h>
using namespace std;
// cin.sync_with_stdio(false);
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR_EQ(i, a, b) for (int i = (a); i <= (b); ++i)
#define FOR_RE(i, a, b) for (int i = (a); i > (b); --i)
#define rep(i, n) FOR(i, 0, n)
#define rep_eq(i, n) FO... | replace | 53 | 55 | 53 | 55 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
for (int g = 1; g * N <= M; g++) {
if (M % g == 0) {
ans = max(ans, g);
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
if (M % N == 0) {
cout << M / N << endl;
return 0;
}
for (int g = 1; g * N <= M; g++) {
if (M % g == 0) {
ans = max(ans, g);
}
}
cout << ans << endl;
} | insert | 8 | 8 | 8 | 12 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
int R(int Cx, int Cy, int x, int y) { return abs(x - Cx) + abs(y - Cy); }
int main(void) {
int N, M, ans;
cin >> N >> M;
if (N == 1)
ans = M;
else if (N == 2 && M % 2 == 0)
ans = M / 2;... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <string>
using namespace std;
int R(int Cx, int Cy, int x, int y) { return abs(x - Cx) + abs(y - Cy); }
int main(void) {
int N, M, ans;
cin >> N >> M;
if (N == 1)
ans = M;
else if (N == 2 && M % 2 == 0)
ans = M / 2;... | replace | 14 | 17 | 14 | 21 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<long long> vll, vLL;
typedef vector<long long> vll, vLL;
#define FOR(i, a, b) for (in... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<long long> vll, vLL;
typedef vector<long long> vll, vLL;
#define FOR(i, a, b) for (in... | replace | 29 | 30 | 29 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M; i > 0; i--) {
if (M % i == 0 && M / i >= N) {
cout << i << endl;
break;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M / N; i > 0; i--) {
if (M % i == 0) {
cout << i << endl;
break;
}
}
}
| replace | 5 | 7 | 5 | 7 | TLE | |
p03241 | C++ | Time Limit Exceeded | using namespace std;
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
typedef pair<int, int> ii;
typedef vector<int> vi;
int n, m;
int gcd(int a, int b) { return (b == 0) ? a : gcd(... | using namespace std;
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
typedef pair<int, int> ii;
typedef vector<int> vi;
int n, m;
int gcd(int a, int b) { return (b == 0) ? a : gcd(... | replace | 29 | 30 | 29 | 30 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
vector<ll> frac(ll n) {
vector<ll> res;
res.clear();
for (ll i = 2LL; i * i <= n; ++i) {
if (n % i == 0LL) {
res.push_back(i)... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
vector<ll> frac(ll n) {
vector<ll> res;
res.clear();
for (ll i = 1LL; i * i <= n; ++i) {
if (n % i == 0LL) {
res.push_back(i)... | replace | 12 | 13 | 12 | 13 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const int INF = 1001001001;
int main() {
int n, m;
cin >> n >> m;
for (int i = n; i < m; i++) {
if (m % i == 0) {
cout << m / i << endl;
return 0;
}
}
cout << 1 << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const int INF = 1001001001;
int main() {
int n, m;
cin >> n >> m;
for (int i = n; i <= (m / 2); i++) {
if (m % i == 0) {
cout << m / i << endl;
return 0;
}
}
cout << 1 << endl;
return 0;
} | replace | 9 | 10 | 9 | 10 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
int main() {
// K(a1+a2+…aN)=M
// M/K>=N&&M%K=0
int N, K;
cin >> N >> K;
for (int i = K; i >= 1; i--) {
if (K % i == 0 && K / i >= N) {
cout << i;
return 0;
}
}
} | #include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
int main() {
// K(a1+a2+…aN)=M
// M/K>=N&&M%K=0
int N, K;
cin >> N >> K;
for (int i = K / N; i >= 1; i--) {
if (K % i == 0 && K / i >= N) {
cout << i;
return 0;
}
}
} | replace | 9 | 10 | 9 | 10 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;... | replace | 50 | 51 | 50 | 51 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ma = m / n;
int sum = 0;
int ans = -1;
for (int j = ma; j > 0; j--) {
sum = 0;
sum += j * n;
if (sum > m)
continue;
else if (sum <= m) {
while (sum < m) {
sum += j;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ma = m / n;
int sum = 0;
int ans = -1;
for (int j = ma; j > 0; j--) {
if (m % j == 0) {
ans = j;
break;
}
}
cout << ans << endl;
}
| replace | 11 | 21 | 11 | 12 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
if (m % n == 0) {
cout << m / n;
return 0;
}
int res = 1;
for (int i = 2; i <= m; i++) {
if (m % i == 0 && m / i >= n) {
res = max(res, i);
}
}
cout << res;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
if (m % n == 0) {
cout << m / n;
return 0;
}
int res = 1;
for (int i = 2; m / i >= n; i++) {
if (m % i == 0) {
res = max(res, i);
}
}
cout << res;
} | replace | 12 | 14 | 12 | 14 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
while (scanf("%d %d", &n, &m) != EOF) {
int ans = 0;
int t = m / n;
for (int i = 1; i <= t; i++) {
if (m / i >= n && m % i == 0)
ans = max(ans, i);
}
printf("%d\n", ans);
}
} | #include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
while (scanf("%d %d", &n, &m) != EOF) {
int ans = 0;
if (m % n == 0)
ans = m / n;
else {
int t = m / n;
for (int i = 1; i <= t; i++) {
if (m % i == 0 && i <= m / n)
ans = max(ans, i);
}
}
... | replace | 7 | 11 | 7 | 15 | TLE | |
p03241 | C++ | Time Limit Exceeded | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef... | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef... | insert | 69 | 69 | 69 | 74 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int sumf(int m) {
int r = 0;
for (int i = 1; i < m + 1; i++)
r += i;
return r;
}
int main() {
int p, q;
cin >> p >> q;
int m = 0;
for (int i = 1; i <= q / p; i++) {
if (q % i == 0)
m = i;
}
cout << m << endl;
return 0;
} | #include <iostream>
using namespace std;
int sumf(int m) {
int r = 0;
for (int i = 1; i < m + 1; i++)
r += i;
return r;
}
int main() {
int p, q;
cin >> p >> q;
int m = 0;
if (p != 1) {
for (int i = 1; i <= q / p; i++) {
if (q % i == 0)
m = i;
}
} else {
m = q;
}
cout <... | replace | 13 | 16 | 13 | 20 | TLE | |
p03241 | Python | Time Limit Exceeded | # a1 + a2 + a3 ... + an = M
# ai の 最大公約数をDとする
# ai = xi * D のはず。 D * x0 + D * x1 ... + D * xn = M
# まとめて D(x1 + x2 + .... + xn) = M
# 変形し、D = M / (x1 + x2 + .... + xn)
# (x1 + ... xn) = K とすると、Kを最小化するとDが最大化する
# M / K が割り切れる必要があるので、KはMの約数のいずれか
# K >= N。なぜなら xi >= 1 なので、Kは最低でも数字の個数 N になる
# つまり、約数のうちで N 以上の最初の値が K になる
# e... | # a1 + a2 + a3 ... + an = M
# ai の 最大公約数をDとする
# ai = xi * D のはず。 D * x0 + D * x1 ... + D * xn = M
# まとめて D(x1 + x2 + .... + xn) = M
# 変形し、D = M / (x1 + x2 + .... + xn)
# (x1 + ... xn) = K とすると、Kを最小化するとDが最大化する
# M / K が割り切れる必要があるので、KはMの約数のいずれか
# K >= N。なぜなら xi >= 1 なので、Kは最低でも数字の個数 N になる
# つまり、約数のうちで N 以上の最初の値が K になる
# e... | replace | 15 | 19 | 15 | 26 | TLE | |
p03241 | Python | Runtime Error | N, M = map(int, input().split())
if N == 1:
print(M)
else:
ans = 1
for g in range(1, int(M**0.5) + 1):
if M % g == 0 and M / g >= N:
ans = g
print(ans)
| N, M = map(int, input().split())
ans = 1
for g in range(1, int(M**0.5) + 1):
if M % g == 0 and M / g >= N:
ans = max(ans, g)
if M % g == 0:
g2 = M // g
if M % g2 == 0 and M / g2 >= N:
ans = max(ans, g2)
print(ans)
| replace | 2 | 9 | 2 | 11 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define range(i, n, m) for (int i = n; i < m; i++)... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define range(i, n, m) for (int i = n; i < m; i++)... | replace | 36 | 37 | 36 | 37 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans;
cin >> n >> m;
for (int i = 1; i <= m / n; ++i) {
if (m % i == 0 && m / i >= n)
ans = i;
}
cout << ans;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans;
cin >> n >> m;
if (n == 1) {
cout << m;
return 0;
}
for (int i = 1; i <= m / n; ++i) {
if (m % i == 0 && m / i >= n)
ans = i;
}
cout << ans;
return 0;
} | insert | 5 | 5 | 5 | 9 | TLE | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
if (m % n == 0) {
cout << m / n;
return ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
if (m % n == 0) {
cout << m / n;
return ... | insert | 18 | 18 | 18 | 22 | 0 | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
vector<pair<ll, ll>> factorize(ll N) {
vector<pair<ll, ll>> res;
ll n = N;
for (ll p = 2; p * p <= n; p++) {
if (N % p != 0)
continue;
int count = 0;
w... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
vector<pair<ll, ll>> factorize(ll N) {
vector<pair<ll, ll>> res;
ll n = N;
for (ll p = 2; p * p <= n; p++) {
if (N % p != 0)
continue;
int count = 0;
w... | replace | 48 | 50 | 48 | 50 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define llong long long int
#define ldouble long double
#define ternary(condition, x, y) ((condition) ? x : y)
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) x.begin(), x.end()
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
const ... | #include <bits/stdc++.h>
using namespace std;
#define llong long long int
#define ldouble long double
#define ternary(condition, x, y) ((condition) ? x : y)
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) x.begin(), x.end()
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
const ... | replace | 27 | 31 | 27 | 33 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 1;
for (int i = 1; i <= M; i++) {
if (M % i == 0 && M / i >= N)
ans = i;
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 1;
for (int i = 1; i * i <= M; i++) {
if (M % i == 0) {
if (M / i >= N)
ans = max(ans, i);
if (i >= N)
ans = max(ans, M / i);
}
}
cout << ans << endl;
}
| replace | 7 | 10 | 7 | 14 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
long long int n, m;
cin >> n >> m;
long long int ans = 1;
if (m % n == 0) {
cout << m / n << endl;
... | #include <algorithm>
#include <climits>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main(void) {
long long int n, m;
cin >> n >> m;
long long int ans = 1;
if (m % n == 0) {
cout << m / n << endl;
... | insert | 29 | 29 | 29 | 32 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define DEBUG
// 素数列を作る
// N: 上限
// v: 出力先
void GetPrimes(int N, vector<int> &v) {
v = vector<int>();
int c = 1;
while (c < N) {
c++;
bool flag = true;
int d = (int)sqrt(c);
for (int i = 0; i < v.size(); i++) {
if (c % v[i] == 0) {
flag... | #include <bits/stdc++.h>
using namespace std;
// 素数列を作る
// N: 上限
// v: 出力先
void GetPrimes(int N, vector<int> &v) {
v = vector<int>();
int c = 1;
while (c < N) {
c++;
bool flag = true;
int d = (int)sqrt(c);
for (int i = 0; i < v.size(); i++) {
if (c % v[i] == 0) {
flag = false;
... | delete | 2 | 4 | 2 | 2 | TLE | |
p03241 | C++ | Time Limit Exceeded | // include,using,define等
#pragma region header
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <fun... | // include,using,define等
#pragma region header
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <fun... | insert | 80 | 80 | 80 | 84 | TLE | |
p03241 | 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, m;
cin >> n >> m;
int end = m / n;
int ans = 1;
for (int i = 2; i <= end; i++) {
int tmp = m - (n - 1) * i;
if (tmp % i == 0) {
ans = i;
}
}
cout << ans <<... | #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, m;
cin >> n >> m;
int end = m / n;
int ans = 1;
vector<int> v;
for (int i = 1; i * i <= m && i <= end; i++) {
if (m % i == 0) {
v.push_back(i);
if (m / i <= en... | replace | 9 | 13 | 9 | 22 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | replace | 19 | 20 | 19 | 20 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
// M/N以下のMの最大の約数dじゃね?
// K=M/dとしたとき、K>=N
// Kをd個の整数に分けるのはeasyじゃん
// 間に合うかな
int MAX = 1;
for (int i = 1; i <= (M / N); i++) {
if (M % i == 0)
MAX = i;
}
cout << MAX << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
// M/N以下のMの最大の約数dじゃね?
// K=M/dとしたとき、K>=N
// Kをd個の整数に分けるのはeasyじゃん
// 間に合うかな
int MAX = 1;
for (int i = 1; i * i <= M; i++) {
if (M % i != 0)
continue;
if (M / i <= M / N)
MAX = max(M / i, MAX);
... | replace | 14 | 17 | 14 | 21 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | replace | 19 | 20 | 19 | 20 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return abs(a * b) / gcd(a, b); }
std::vector<bool> IsPrime;
void sieve(size_t max) {
if (max + 1 > IsPrime.size())
IsPrime.resize(max + 1, true);
IsPrime[0] = false;
Is... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return abs(a * b) / gcd(a, b); }
std::vector<bool> IsPrime;
void sieve(size_t max) {
if (max + 1 > IsPrime.size())
IsPrime.resize(max + 1, true);
IsPrime[0] = false;
Is... | replace | 35 | 38 | 35 | 42 | TLE | |
p03241 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define int long long
int mod = 1e9 + 7;
signed main() {
int n, m;
cin >> n >> m;
vector<int> yk;
for (int i = 1; i <= sqrt(m); i++) {
if (m % i == 0) {
yk.push_back(i);
yk.push_back(m / i);
}
}
sort(yk.begin(), yk.end());
double ch = m / ... | #include "bits/stdc++.h"
using namespace std;
#define int long long
int mod = 1e9 + 7;
signed main() {
int n, m;
cin >> n >> m;
vector<int> yk;
for (int i = 1; i <= sqrt(m); i++) {
if (m % i == 0) {
yk.push_back(i);
yk.push_back(m / i);
}
}
sort(yk.begin(), yk.end());
double ch = m / ... | replace | 18 | 19 | 18 | 19 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(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())
typedef vector<int> VI;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(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())
typedef vector<int> VI;
... | insert | 47 | 47 | 47 | 51 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <cstdio>
int main() {
int n, M, ans = 1;
scanf("%d%d", &n, &M);
for (int i = 2; i <= M / n; ++i) {
if (M % i)
continue;
if (M / i >= n)
ans = i;
}
printf("%d", ans);
return 0;
} | #include <cstdio>
int main() {
int n, M, ans = 1;
scanf("%d%d", &n, &M);
if (n == 1)
return !printf("%d", M);
for (int i = 2; i <= M / n; ++i) {
if (M % i)
continue;
if (M / i >= n)
ans = i;
}
printf("%d", ans);
return 0;
} | insert | 4 | 4 | 4 | 6 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 1, tmp;
for (int i = 2; i <= M / N; i++) {
tmp = M - i * (N - 1);
if (tmp % i == 0)
ans = i;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
if (N == 1) {
cout << M << endl;
return 0;
}
int ans = 1, tmp;
for (int i = 2; i <= M / N; i++) {
tmp = M - i * (N - 1);
if (tmp % i == 0)
ans = i;
}
cout << ans << endl;
} | insert | 6 | 6 | 6 | 10 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPP(i, n) for (int i = 1; i <= n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, m, n) for (int i = m; i < n; ++i)
#define ALL(v) v.begin(), v.end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
us... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPP(i, n) for (int i = 1; i <= n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, m, n) for (int i = m; i < n; ++i)
#define ALL(v) v.begin(), v.end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
us... | replace | 38 | 39 | 38 | 39 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <utility> // pair
#include <vector>
#define MAX_N 100001
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REV(i, n) for (ll i = n... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <utility> // pair
#include <vector>
#define MAX_N 100001
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REV(i, n) for (ll i = n... | replace | 20 | 23 | 20 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
/*sortの仕方
* ■ string s の場合
* 昇順: sort(s.begin(), s.end())
* 降順: sort(s.rbegin(), s.rend())
*
* ■ int a[N] の場合
* 昇順: sort(a, a+N)
* 降順: 不明
*/
/*int alph2int(char character) {
int x = character - 'a';
... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
/*sortの仕方
* ■ string s の場合
* 昇順: sort(s.begin(), s.end())
* 降順: sort(s.rbegin(), s.rend())
*
* ■ int a[N] の場合
* 昇順: sort(a, a+N)
* 降順: 不明
*/
/*int alph2int(char character) {
int x = character - 'a';
... | replace | 26 | 27 | 26 | 32 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define INF 100100100
#define MOD 1000000007
#define FOR(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
using ull = unsigned long long;
struct edge {
ll to, cost;
};
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(false);
cin.tie(0);
ll N... | #include <bits/stdc++.h>
#define INF 100100100
#define MOD 1000000007
#define FOR(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
using ull = unsigned long long;
struct edge {
ll to, cost;
};
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(false);
cin.tie(0);
ll N... | replace | 21 | 24 | 21 | 30 | TLE | |
p03241 | 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, M;
cin >> N >> M;
int A = 1;
int ans = 0;
while (M > (N - 1) * A) {
if ((M + A - N * A) % A == 0)
ans = A;
A++;
}
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, M;
cin >> N >> M;
int A = 1;
int ans = 0;
if (N == 1) {
cout << M << endl;
return 0;
}
while (M > (N - 1) * A) {
if ((M + A - N * A) % A == 0)
ans = A;
... | insert | 10 | 10 | 10 | 14 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, start, end) for (int i = start; i <= end; i++)
const int INF = 1001001001;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
type... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, start, end) for (int i = start; i <= end; i++)
const int INF = 1001001001;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
type... | replace | 148 | 152 | 148 | 156 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, m;
cin >> n >> m;
int ans = 1;
for (int i = 1; i * n <= m; i++) {
if ((m - i * n) % i == 0)
ans = i;
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, m;
cin >> n >> m;
int ans = 1;
for (int i = 1; i * i <= m; i++) {
if (m % i == 0) {
if (i <= m / n)
ans = max(ans, i);
if (i >= ... | replace | 12 | 15 | 12 | 19 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M; i >= 1; --i) {
if (M % i == 0) {
int k = M / i;
if (k >= N) {
cout << M / k << endl;
return 0;
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M / N + 1; i >= 1; --i) {
if (M % i == 0) {
int k = M / i;
if (k >= N) {
cout << M / k << endl;
return 0;
}
}
}
} | replace | 8 | 9 | 8 | 9 | TLE | |
p03241 | C++ | Time Limit Exceeded | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#inc... | /*
これを入れて実行
g++ code.cpp
./a.out
*/
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <unordered_map>
#inc... | insert | 70 | 70 | 70 | 74 | TLE | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
type... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
type... | replace | 25 | 26 | 25 | 26 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep2(i, n, m) for (ll i = n; i <= m; i++)
#define rep3(i, n, m) for (ll i = n; ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep2(i, n, m) for (ll i = n; i <= m; i++)
#define rep3(i, n, m) for (ll i = n; ... | replace | 25 | 28 | 25 | 33 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
long long N, M;
cin >> N >> M;
long long number = 1;
for (int i = M; i > sqrt(M) - 1; i--) {
if (M % i == 0) {
if (M >= i * N) {
number = i;
break;
} else if (i >= N)
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
long long N, M;
cin >> N >> M;
long long number = 1;
for (int i = M / N + 1; i >= 1; i--) {
if (M % i == 0) {
if (M >= i * N) {
number = i;
break;
} else if (i >= N)
... | replace | 10 | 11 | 10 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
long long N, M;
cin >> N >> M;
while (true) {
if (M % N == 0)
break;
else if (M == N)
break;
else
N++;
}
cout << M / N <... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans, ansMax, temp;
ansMax = M / N;
for (ans = ansMax; ans > 0; --ans) {
temp = M - ans * (N - 1);
if ((temp % a... | replace | 11 | 12 | 11 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
while (m % n != 0)
n++;
cout << m / n << '\n';
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ans = 0;
for (int i = 1; i * i <= m; i++) {
if (m % i == 0) {
if (n <= i)
ans = max(ans, m / i);
if (n <= m / i)
ans = max(ans, i);
}
}
cout << ans << '\n';
}
| replace | 6 | 9 | 6 | 16 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | replace | 205 | 208 | 205 | 208 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector<vector<int>... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector<vector<int>... | replace | 29 | 30 | 29 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
// #include <unordered_map>
using namespace std;
typedef long lon... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
// #include <unordered_map>
using namespace std;
typedef long lon... | replace | 77 | 81 | 77 | 87 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define int64 long long
using namespace std;
int main() {
int n, m, ans;
cin >> n >> m;
rep1(i, (m / n) + 1... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define int64 long long
using namespace std;
int main() {
int n, m, ans;
cin >> n >> m;
if (n == 1) {
a... | replace | 14 | 17 | 14 | 21 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, m, sum, ans = 1;
cin >> n >> m;
for (ll i = 1; n * i <= m; i++) {
sum = m - n * i;
if (sum % i == 0) {
ans = i;
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n, m, sum, ans = 1;
cin >> n >> m;
ll l = 1, r = 1000000001LL, mid;
while (r - l > 1) {
mid = (l + r) / 2;
if (mid * n <= m) {
l = mid;
} else {
r = mid;
}
}
while (l > 0) {
sum = m - n * l;
... | replace | 6 | 10 | 6 | 22 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
... | insert | 280 | 280 | 280 | 284 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define FAL... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define FAL... | insert | 110 | 110 | 110 | 114 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int n, m;
int main() {
cin >> n >> m;
for (int i = n; i <= m; i++) {
if (m % i == 0) {
cout << m / i << endl;
return 0;
}
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int n, m;
int main() {
cin >> n >> m;
for (int i = n; i <= m; i++) {
if (m % i == 0) {
cout << m / i << endl;
return 0;
} else if (i > m / 2) {
cout << 1 << endl;
return 0;
}
}
return 0;
} | insert | 11 | 11 | 11 | 14 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
while (M % N != 0)
N++;
cout << M / N << endl;
}
| #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M / N; i > 0; i--)
if (M % i == 0) {
cout << i << endl;
break;
}
}
| replace | 7 | 10 | 7 | 12 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ans = 1;
for (int i = 1; i * i <= m; --i) {
if (m % i == 0) {
if (m / i >= n) {
ans = max(ans, i);
}
if (m / (m / i) >= n) {
ans = max(ans, m / i);
}
}
}
cout << ans <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ans = 1;
for (int i = 1; i * i <= m; ++i) {
if (m % i == 0) {
if (m / i >= n) {
ans = max(ans, i);
}
if (m / (m / i) >= n) {
ans = max(ans, m / i);
}
}
}
cout << ans <<... | replace | 8 | 9 | 8 | 9 | -8 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define codefor \
int test; \
scanf("... | #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define codefor \
int test; \
scanf("... | replace | 121 | 122 | 121 | 126 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#define REP(i, n) for (int i = 0; i < n; i++)
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
#define mod 1000000007 // 1e9+7(prime number)
#define INF 1000000000 // 1e9
using namespace std;
typedef long long ll;
... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#define REP(i, n) for (int i = 0; i < n; i++)
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
#define mod 1000000007 // 1e9+7(prime number)
#define INF 1000000000 // 1e9
using namespace std;
typedef long long ll;
... | replace | 17 | 21 | 17 | 25 | TLE | |
p03241 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = a; i < b; i++)
typedef long long ll;
using namespace std;
const int MOD = 1e9 + 7;
ll N, M, ans = 1;
int main(void) {
cin >> N >> M;
FOR(i, 1, M / N ... |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = a; i < b; i++)
typedef long long ll;
using namespace std;
const int MOD = 1e9 + 7;
ll N, M, ans = 1;
int main(void) {
cin >> N >> M;
if (N == 1)
... | replace | 16 | 23 | 16 | 27 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
#define vecout(V) \
for (int i = 0; i < V.size(); i++) { \
cout << V[i] << endl; ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
#define vecout(V) \
for (int i = 0; i < V.size(); i++) { \
cout << V[i] << endl; ... | insert | 26 | 26 | 26 | 30 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define MP make_pair
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP1(i, n) for (int i = 1; i < (n); i++)
#define REP2(i, d, n) for (int i = (d); i < (n); i++)
#define RREP(i, n) for (int i = (n); i >= ... | #include <bits/stdc++.h>
using namespace std;
#define MP make_pair
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP1(i, n) for (int i = 1; i < (n); i++)
#define REP2(i, d, n) for (int i = (d); i < (n); i++)
#define RREP(i, n) for (int i = (n); i >= ... | insert | 30 | 30 | 30 | 34 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll N, M;
cin >> N >> M;
ll ans;
for (ll d = M; d > 0; d++) {
if (M % d == 0) {
if (M / d >= N) {
ans = d;
cout << ans << endl;
return 0;
}
}
}
}
| #include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll N, M;
cin >> N >> M;
ll ans;
for (ll d = M / N; d > 0; d--) {
if (M % d == 0) {
if (M / d >= N) {
ans = d;
cout << ans << endl;
return 0;
}
}
}
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int N, M;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> N >> M;
for (int i = N; i <= M; i++) {
if (M % i == 0) {
cout << M / i << endl;
break;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int N, M;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> N >> M;
for (int i = N; i <= M; i++) {
if (M % i == 0) {
cout << M / i << endl;
break;
}
if (i * 2 > M) {
cout <... | insert | 19 | 19 | 19 | 23 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
int max = 0;
for (int i = 1; i <= b / a; i++) {
if (b % i == 0 && i >= max) {
max = i;
}
}
printf("%d", max);
return 0;
}
| #include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
int max = 0;
if (a == 1 && b == 1000000000) {
printf("1000000000");
return 0;
}
for (int i = 1; i <= b / a; i++) {
if (b % i == 0 && i >= max) {
max = i;
}
}
printf("%d", max);
return 0;
}
| insert | 5 | 5 | 5 | 9 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define sort(A) sort(A.begin(), A.end())
#define reverse(A) reverse(A.begin(), A.end())
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n, m;
cin >> n >> m... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define sort(A) sort(A.begin(), A.end())
#define reverse(A) reverse(A.begin(), A.end())
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n, m;
cin >> n >> m... | insert | 13 | 13 | 13 | 17 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
for (int i = 1; i <= M / N; i++) {
if ((M - N * i) % i == 0)
ans = i;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
if (N == 1)
ans = M;
else {
for (int i = 1; i <= M / N; i++) {
if ((M - N * i) % i == 0)
ans = i;
}
}
cout << ans << endl;
} | replace | 8 | 11 | 8 | 15 | TLE | |
p03241 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<int> res;
for (int i = 2; i * i <= M; ++i) {
if (M % i == 0) {
res.push_back(i);
if (i != M / i)
res.push_back(M / i);
... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<int> res;
for (int i = 2; i * i <= M; ++i) {
if (M % i == 0) {
res.push_back(i);
if (i != M / i)
res.push_back(M / i);
... | insert | 21 | 21 | 21 | 23 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iostream"
#include "map"
#include "queue"
#include "set"
#include "stack"
#include "string"
#include "tuple"
#include "unordered_map"
#include "vector"
#define rep(n) for (int i = 0; i < n; ++i)
#define REP(n, i) for (int i = 0; i ... | #include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iostream"
#include "map"
#include "queue"
#include "set"
#include "stack"
#include "string"
#include "tuple"
#include "unordered_map"
#include "vector"
#define rep(n) for (int i = 0; i < n; ++i)
#define REP(n, i) for (int i = 0; i ... | insert | 32 | 32 | 32 | 36 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using P = pair<ll, ll>;
const ll mod = 1e9 + 7;
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define REPS(i, n) for (ll(i) = 1; (i) <= (n); (i)++)
#define RREP(i, n) for (ll(i) = (n -... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using P = pair<ll, ll>;
const ll mod = 1e9 + 7;
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define REPS(i, n) for (ll(i) = 1; (i) <= (n); (i)++)
#define RREP(i, n) for (ll(i) = (n -... | replace | 36 | 42 | 36 | 55 | TLE | |
p03241 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = (N == 1 ? M : 1);
for (int i = 0; i <= M / 2; i++) {
if (M % i == 0 && (long long)i * N <= M && ans < i)
ans = i;
}
cout << ans << endl;
}
| #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = (N == 1 ? M : 1);
for (int i = 2; i <= M / 2; i++) {
if (M % i == 0 and (long long) i * N <= M and ans < i)
ans = i;
}
cout << ans << endl;
}
| replace | 8 | 10 | 8 | 10 | -8 | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ... | replace | 28 | 31 | 28 | 31 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, l) for (lli i = s; i < l; i++)
#define DEBUG 0
#define INF (1LL << 50)
#define MOD 1000000007
vector<lli> divisorList(lli num) {
vector<lli> v;
for (lli i = 1; i * i <= num; i++) {
if (num % i == 0) {
v.push_back... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, l) for (lli i = s; i < l; i++)
#define DEBUG 0
#define INF (1LL << 50)
#define MOD 1000000007
vector<lli> divisorList(lli num) {
vector<lli> v;
for (lli i = 1; i * i <= num; i++) {
if (num % i == 0) {
v.push_back... | replace | 30 | 31 | 30 | 31 | 0 | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;
struct fastio {
fastio() {
ios::sync_with_stdio(false);
cout << setprecision(10) << fixed;
cin.tie(0);
}
};
fastio _fast_io;
const int N = 1e5 + 5;
int n, m, k, ans;
int main() {
cin >> n >> m;
fo... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;
struct fastio {
fastio() {
ios::sync_with_stdio(false);
cout << setprecision(10) << fixed;
cin.tie(0);
}
};
fastio _fast_io;
const int N = 1e5 + 5;
int n, m, k, ans;
int main() {
cin >> n >> m;
fo... | replace | 21 | 24 | 21 | 27 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <cstdio>
int main() {
int n, m, i;
scanf("%d%d", &n, &m);
for (i = m; i; i--)
if (!(m % i) && m / i >= n) {
printf("%d\n", i);
return 0;
}
} | #include <cstdio>
int main() {
int n, m, i;
scanf("%d%d", &n, &m);
for (i = m / n; i; i--)
if (!(m % i) && m / i >= n) {
printf("%d\n", i);
return 0;
}
} | replace | 4 | 5 | 4 | 5 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, lim;
cin >> N >> M;
lim = M / N;
int num = 0;
vector<int> yakusu(M);
for (int i = 0; i < sqrt(M); i++) {
if (M % (i + 1) == 0) {
yakusu[num] = i + 1;
num++;
yakusu[num] = M / (i + 1);
num++;
}
}
int max... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, lim;
cin >> N >> M;
lim = M / N;
int num = 0;
vector<int> yakusu(1000000);
for (int i = 0; i < sqrt(M); i++) {
if (M % (i + 1) == 0) {
yakusu[num] = i + 1;
num++;
yakusu[num] = M / (i + 1);
num++;
}
}
i... | replace | 8 | 9 | 8 | 9 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, a) for (int i = 0; i < int(a); ++i)
#define REP(i, a, b) for (int i = int(a); i < int(b); ++i)
using ll = long long;
using itn = int;
using namespace std;
using Graph = vector<vector<int>>;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int main() {
int N, M;
cin >> ... | #include <bits/stdc++.h>
#define rep(i, a) for (int i = 0; i < int(a); ++i)
#define REP(i, a, b) for (int i = int(a); i < int(b); ++i)
using ll = long long;
using itn = int;
using namespace std;
using Graph = vector<vector<int>>;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int main() {
int N, M;
cin >> ... | replace | 15 | 17 | 15 | 18 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 1;
for (int i = 1; i <= (int)M / N; i++)
ans = (M % i == 0) ? i : ans;
cout << ans << endl;
}
| #include <cmath>
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 1;
if (N == 1) {
cout << M << endl;
return 0;
}
for (int i = 1; i <= (int)M / N; i++)
ans = (M % i == 0) ? i : ans;
cout << ans << endl;
}
| insert | 10 | 10 | 10 | 15 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long N, M, p = 0;
cin >> N >> M;
p = M;
while (true) {
if (M % p == 0 && p * N <= M) {
p = p + 10000000;
break;
}
p = p - 10000000;
}
for (int i = p; i > 0; i--) {
if (M % i == 0 && i * N <= M) {
cout << i;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long N, M, p = 0;
cin >> N >> M;
p = M;
while (true) {
if (p * N <= M) {
p = p + 10000000;
break;
}
p = p - 10000000;
}
for (int i = p; i > 0; i--) {
if (M % i == 0 && i * N <= M) {
cout << i;
break;
}
... | replace | 8 | 9 | 8 | 9 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define what_is(x) cerr << #x << " is " << x << endl;
#define MT make_tuple
#define eb emplace_back
#define rep(i, begin, en... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define what_is(x) cerr << #x << " is " << x << endl;
#define MT make_tuple
#define eb emplace_back
#define rep(i, begin, en... | replace | 49 | 51 | 49 | 51 | 0 | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = n - 1; i >= m; i--)
#define all(x) (x).begin(), (x).end()
#define EPS (1e-7)
#define INF (1... | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = n - 1; i >= m; i--)
#define all(x) (x).begin(), (x).end()
#define EPS (1e-7)
#define INF (1... | replace | 85 | 86 | 85 | 86 | 0 | |
p03241 | C++ | Time Limit Exceeded | //
// abc112d.cpp
//
//
// Created by Yoshida Satoshi on 2018/10/22.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = N; i <= M; i++) {
if (M % i == 0) {
cout << M / i << endl;
break;
}
}
return 0;
}
| //
// abc112d.cpp
//
//
// Created by Yoshida Satoshi on 2018/10/22.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = N; i <= M; i++) {
if (M % i == 0) {
cout << M / i << endl;
break;
}
if (i > M / 2) {
cout << 1... | insert | 22 | 22 | 22 | 26 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define REP(i, limit) for (int i = 0; i < limit; ++i)
#define LINT long long
int main() {
int N, M;
cin >> N >> M;
int k = M / N;
int ans = 1;
int work;
for (int i = 2; i < k + 1; ++i) {
i... | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define REP(i, limit) for (int i = 0; i < limit; ++i)
#define LINT long long
int main() {
int N, M;
cin >> N >> M;
int k = M / N;
int ans = 1;
int work;
if (N == 1) {
cout << M << endl;
... | insert | 15 | 15 | 15 | 19 | TLE | |
p03241 | C++ | Runtime Error | /*
title:
url:
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <string>
#include <utility>
using namespace std;
#define rep(i, n) for (int i = 0; ... | /*
title:
url:
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <string>
#include <utility>
using namespace std;
#define rep(i, n) for (int i = 0; ... | replace | 117 | 118 | 117 | 118 | 0 | |
p03241 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, a, b) for (int i = a; i < b; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
#define rev(i, n) for (int i = n - 1; i >= 0; i--)
#define vi vector<int>
#define pb push_back
#define... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, a, b) for (int i = a; i < b; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
#define rev(i, n) for (int i = n - 1; i >= 0; i--)
#define vi vector<int>
#define pb push_back
#define... | replace | 50 | 52 | 50 | 52 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.