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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
#includ... | #include <algorithm>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
#includ... | replace | 126 | 129 | 126 | 131 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> llll;
typedef pair<double, double> dd;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vec... | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> llll;
typedef pair<double, double> dd;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vec... | replace | 72 | 73 | 72 | 74 | TLE | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include ... | replace | 63 | 64 | 63 | 64 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
using p = pair<ll, ll>;
ll dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; // x軸方向への変位
ll dy[8] = {1, 0, -1... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define ll long long
using namespace std;
using p = pair<ll, ll>;
ll dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; // x軸方向への変位
ll dy[8] = {1, 0, -1... | replace | 25 | 31 | 25 | 31 | 0 | |
p03050 | C++ | Runtime Error | #pragma gcc optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define PER(i, n) for (int i = (n - 1); i >= 0; --i)
#define ALL(V) (V).begin(), (V).end()
#define SORT(V) sort(ALL(V)) // 小さい方からソート
#define... | #pragma gcc optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define PER(i, n) for (int i = (n - 1); i >= 0; --i)
#define ALL(V) (V).begin(), (V).end()
#define SORT(V) sort(ALL(V)) // 小さい方からソート
#define... | insert | 205 | 205 | 205 | 208 | 0 | |
p03050 | C++ | Time Limit Exceeded | #if 1
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define int long long
#define uint unsi... | #if 1
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define int long long
#define uint unsi... | insert | 70 | 70 | 70 | 73 | TLE | |
p03050 | C++ | Runtime Error | #include <stdio.h>
int main() {
long long n;
scanf("%lld", &n);
long long ans = 0;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
if (i > 1) {
if (n / (i - 1) == n % (i - 1)) {
ans += i - 1;
}
}
long long d = n / i - 1;
if (n / d == n % d) {
... | #include <stdio.h>
int main() {
long long n;
scanf("%lld", &n);
long long ans = 0;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
if (i > 1) {
if (n / (i - 1) == n % (i - 1)) {
ans += i - 1;
}
}
long long d = n / i - 1;
if (d > 0) {
if (... | replace | 14 | 16 | 14 | 18 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int64_t MOD = 1000000007;
int main() {
int64_t N, answer = 0;
cin >> N;
for (int64_t i = 1; i < N; i++) {
if (N % i == N / i)
answer += i;
}
cout << answer;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int64_t MOD = 1000000007;
int main() {
int64_t N, answer = 0;
cin >> N;
for (int64_t i = 1; i * i < N; i++) {
if (N % i == 0 && i < (N / i) - 1)
answer += (N / i) - 1;
}
cout << answer;
}
| replace | 8 | 11 | 8 | 11 | TLE | |
p03050 | C++ | Time Limit Exceeded | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | replace | 65 | 66 | 65 | 66 | TLE | |
p03050 | C++ | Runtime Error |
// #define NDEBUG
#pragma GCC optimize("O3") // 最適化レベルの変更 O0〜O3 などを指定
#pragma GCC optimize("-O3,inline,omit-frame-pointer,unroll-loops")
#pragma warning(1 : 4456) // 多重forループ内での変数の2重定義を警告にする
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <array>
#include... |
// #define NDEBUG
#pragma GCC optimize("O3") // 最適化レベルの変更 O0〜O3 などを指定
#pragma GCC optimize("-O3,inline,omit-frame-pointer,unroll-loops")
#pragma warning(1 : 4456) // 多重forループ内での変数の2重定義を警告にする
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <array>
#include... | insert | 1,656 | 1,656 | 1,656 | 1,661 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll 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 vv vector<vi>
#define pb push_back
#define pi p... | #include <bits/stdc++.h>
#define ll 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 vv vector<vi>
#define pb push_back
#define pi p... | insert | 31 | 31 | 31 | 33 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, ans = 0;
cin >> N;
for (int p = 1; p * (p + 1) < N; p++) {
if (N % p == 0)
ans += N / p - 1;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, ans = 0;
cin >> N;
for (int p = 1; (N - p) / p > p; p++) {
if (N % p == 0)
ans += N / p - 1;
}
cout << ans << endl;
} | replace | 6 | 7 | 6 | 7 | TLE | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i, n) for (long long i = 0, _n = (n); i < _n; i++)
#define repr(i, n) for (long long i = (n)-1; i >= 0; i--)
#define foreach(it, ar) ... | #include <bits/stdc++.h>
using namespace std;
#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i, n) for (long long i = 0, _n = (n); i < _n; i++)
#define repr(i, n) for (long long i = (n)-1; i >= 0; i--)
#define foreach(it, ar) ... | replace | 143 | 144 | 143 | 144 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define vout(x) \
rep(i, x.size()) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define vout(x) \
rep(i, x.size()) { ... | insert | 48 | 48 | 48 | 50 | -8 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
set<ll> a;
int main() {
ll n;
cin >> n;
ll m = sqrt(n);
for (ll i = 1; i <= m; i++) {
if (n % i != 0) {
continue;
}
ll now = n / i;
ll ma = max(now, i);
ma--;
ll mi = m... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
set<ll> a;
int main() {
ll n;
cin >> n;
if (n == 1) {
cout << 0;
return 0;
}
ll m = sqrt(n);
for (ll i = 1; i <= m; i++) {
if (n % i != 0) {
continue;
}
ll now = n / i;... | insert | 10 | 10 | 10 | 14 | 0 | |
p03050 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = 0;
for (long long i = 1; i * i <= N; i++) {
if (N % i == 0) {
long long a = i, b = N / i;
if (a - 1 > 0 && N % (a - 1) == (N / (a - 1)))
ans += a - 1;
if (N % (b - 1) == N / (b - 1))
... | #include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = 0;
for (long long i = 1; i * i <= N; i++) {
if (N % i == 0) {
long long a = i, b = N / i;
if (a - 1 > 0 && N % (a - 1) == (N / (a - 1)))
ans += a - 1;
if (b != a && b - 1 > 0 && N % (b - ... | replace | 13 | 14 | 13 | 14 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define st(arr, a) memset(arr, a, sizeof arr)
#define nl cout << endl
#define real signed
#define endl '\n'
#define bitcount(x) __builtin_popcountll(x)
const int MOD = 1000000007ll;
#define forn(i, a, b) for (i... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define st(arr, a) memset(arr, a, sizeof arr)
#define nl cout << endl
#define real signed
#define endl '\n'
#define bitcount(x) __builtin_popcountll(x)
const int MOD = 1000000007ll;
#define forn(i, a, b) for (i... | replace | 35 | 36 | 35 | 37 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define EPS (1e-10)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll a = 1; a <= n; a++) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define EPS (1e-10)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll a = 1; a * a <= n; a++... | replace | 14 | 15 | 14 | 15 | TLE | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define rep(i, n) for (auto i = 0; i < (n); i++)
#define rep1(i, n) for (auto i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
struct init {
init() {
cin.tie(0);
ios::sync_with_stdio(0);
... | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define rep(i, n) for (auto i = 0; i < (n); i++)
#define rep1(i, n) for (auto i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
struct init {
init() {
cin.tie(0);
ios::sync_with_stdio(0);
... | replace | 23 | 24 | 23 | 25 | TLE | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include"testlib.h"
using namespace std;
#define ll long long
#define X first
#define Y second
#define all(x) x.begin(), x.end()
const int MX = (int)1e5 + 10;
// const int mod = (int)1e9 + 7;
int main(int argc, char *argv[]) {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);... | #include <bits/stdc++.h>
// #include"testlib.h"
using namespace std;
#define ll long long
#define X first
#define Y second
#define all(x) x.begin(), x.end()
const int MX = (int)1e5 + 10;
// const int mod = (int)1e9 + 7;
int main(int argc, char *argv[]) {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);... | replace | 40 | 41 | 40 | 41 | 0 | |
p03050 | C++ | Runtime Error | #define DivertaPC2019_D
#ifdef DivertaPC2019_D
#pragma comment(linker, "/STACK:256000000")
#include "bits/stdc++.h"
#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 BUGAVOID(x) x
#define rep(...) ... | #define DivertaPC2019_D
#ifdef DivertaPC2019_D
#pragma comment(linker, "/STACK:256000000")
#include "bits/stdc++.h"
#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 BUGAVOID(x) x
#define rep(...) ... | replace | 40 | 42 | 40 | 45 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using P = pair<int, int>;
using ll = long long;
static const int INF = 1000000000;
static const ll MOD = 1000000007;
int main() {
ll n;
cin >> n;
vector<ll> d;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using P = pair<int, int>;
using ll = long long;
static const int INF = 1000000000;
static const ll MOD = 1000000007;
int main() {
ll n;
cin >> n;
vector<ll> d;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == ... | replace | 24 | 25 | 24 | 25 | -8 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using P = pair<int, int>;
using ll = long long;
static const int INF = 1000000000;
static const ll MOD = 1000000007;
int main() {
ll n;
cin >> n;
vector<ll> d;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using P = pair<int, int>;
using ll = long long;
static const int INF = 1000000000;
static const ll MOD = 1000000007;
int main() {
ll n;
cin >> n;
vector<ll> d;
for (ll i = 1; i * i <= n; ++i) {
if (n % i == ... | replace | 26 | 27 | 26 | 27 | -8 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
long long res, n, m, i;
int main() {
cin >> n;
for (i = 1; i * i <= n; i++) {
if (n % i == 0) {
m = n / i;
m--;
if (n / m == n % m)
res += m;
;
}
}
cout << res;
return 0;... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
long long res, n, m, i;
int main() {
cin >> n;
for (i = 1; i * i <= n; i++) {
if (n % i == 0) {
m = n / i;
m--;
if (m != 0) {
if (n / m == n % m)
res += m;
}
}
}
... | replace | 15 | 18 | 15 | 19 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n, ans;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (ll mod = 1; mod * mod <= n; mod++) {
if ((n % mod) || n % (n / mod - 1) != mod)
continue;
ans += n / mod - 1;
}
cout << ans;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n, ans;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (ll mod = 1; mod * mod <= n; mod++) {
if ((n % mod) || (n == 1 && mod == 1) || n % (n / mod - 1) != mod)
continue;
ans += n / mod - 1;
}
cout << ans... | replace | 12 | 13 | 12 | 13 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
bool check(int i) { return n / i == n % i; }
signed main() {
cin >> n;
int ans = 0ll;
for (int i = 1ll; i * i <= n; i++) {
if (n % i == 0ll) {
if (check(n / i - 1ll))
ans += (n / i - 1ll);
}
}
cout << ans << end... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
bool check(int i) { return n / i == n % i; }
signed main() {
cin >> n;
int ans = 0ll;
for (int i = 1ll; i * i <= n; i++) {
if (n % i == 0ll) {
int m = n / i - 1ll;
if (m != 0 && n / m == n % m)
ans += m;
}
}... | replace | 12 | 14 | 12 | 15 | 0 | |
p03050 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
typedef long long ll;
using namespace std;
int main() {
ll number = 1000000000000;
cin >> number;
ll result = 0;
for (ll i = 1; i * i <= number; ++i) {
if ((number - i) % i == 0) {
ll j = (number - i) / i;
if (number / j == number % j) {
result +... | #include <cstdio>
#include <iostream>
typedef long long ll;
using namespace std;
int main() {
ll number = 1000000000000;
cin >> number;
ll result = 0;
for (ll i = 1; i * i <= number; ++i) {
if ((number - i) % i == 0) {
ll j = (number - i) / i;
if (j == 0) {
continue;
}
if... | insert | 15 | 15 | 15 | 18 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
typedef long long LL;
LL N;
LL s = 1e6 + 1;
int main() {
cin >... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
typedef long long LL;
LL N;
LL s = 1e6 + 1;
int main() {
cin >... | insert | 17 | 17 | 17 | 19 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | insert | 27 | 27 | 27 | 29 | 0 | |
p03050 | C++ | Runtime Error | #include <iostream>
#include <math.h>
using namespace std;
int main() {
unsigned long sum = 0;
unsigned long n;
cin >> n;
for (unsigned long i = 1; i <= (unsigned long)sqrt(n); i++) {
if (n % i != 0)
continue;
unsigned long j = n / i;
// check i-1
if ((i - 1) != 0) {
if (n / (i - 1)... | #include <iostream>
#include <math.h>
using namespace std;
int main() {
unsigned long sum = 0;
unsigned long n;
cin >> n;
for (unsigned long i = 1; i <= (unsigned long)sqrt(n); i++) {
if (n % i != 0)
continue;
unsigned long j = n / i;
// check i-1
if ((i - 1) != 0) {
if (n / (i - 1)... | replace | 18 | 20 | 18 | 22 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
... | insert | 52 | 52 | 52 | 54 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#include <unordered_map>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#include <unordered_map>
... | insert | 35 | 35 | 35 | 37 | 0 | |
p03050 | C++ | Runtime Error | #include "bits/stdc++.h"
// Begin Header {{{
using namespace std;
#ifndef DEBUG
#define dump(...)
#endif
#define all(x) x.begin(), x.end()
#define rep(i, n) for (intmax_t i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, b, e) \
for (intmax_t i = (... | #include "bits/stdc++.h"
// Begin Header {{{
using namespace std;
#ifndef DEBUG
#define dump(...)
#endif
#define all(x) x.begin(), x.end()
#define rep(i, n) for (intmax_t i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, b, e) \
for (intmax_t i = (... | insert | 108 | 108 | 108 | 112 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
ll n, ans;
vector<ll> v;
int main() {
cin >> n;
for (ll i = 2; i <= sqrt(n); i++) {
if (n % i == 0) {
v.pb(i);
if (i * i != n) {
v.pb(n / i);
}... | #include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
ll n, ans;
vector<ll> v;
int main() {
cin >> n;
for (ll i = 2; i <= sqrt(n); i++) {
if (n % i == 0) {
v.pb(i);
if (i * i != n) {
v.pb(n / i);
}... | replace | 20 | 21 | 20 | 22 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
using ll = long long;
#define INF 1e9
int main() {
ll N;
cin >> N;
ll ans = 0;
for (ll i = 1; i * i <= N; i++) {... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
using ll = long long;
#define INF 1e9
int main() {
ll N;
cin >> N;
ll ans = 0;
for (ll i = 1; i * i <= N; i++) {... | replace | 22 | 23 | 22 | 23 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
using ll = long long;
#define INF 1e9
int main() {
ll N;
cin >> N;
if (N == 0 || N == 2) {
cout << 0 << endl;
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
using ll = long long;
#define INF 1e9
int main() {
ll N;
cin >> N;
if (N == 0 || N == 2) {
cout << 0 << endl;
... | replace | 21 | 22 | 21 | 22 | TLE | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define mi(N) ... | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define mi(N) ... | insert | 120 | 120 | 120 | 124 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
std::string ab("AB");
int count_ab(const std::string &st) {
int ret{0};
std::size_t pos = st.find(ab);
while (pos != std::string::npos) {
++ret;
pos = st.find(ab, pos + ab.length());
}
return ret;
}
in... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
std::string ab("AB");
int count_ab(const std::string &st) {
int ret{0};
std::size_t pos = st.find(ab);
while (pos != std::string::npos) {
++ret;
pos = st.find(ab, pos + ab.length());
}
return ret;
}
in... | replace | 22 | 23 | 22 | 23 | TLE | |
p03050 | 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 P = pair<ll, ll>;
template <class T> using V = vector<T>;
int main() {
ll n;
cin >> n;
V<int> ms(1e6 + 1);
ll ans = 0;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0) {
ll m = ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = int64_t;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
int main() {
ll n;
cin >> n;
V<int> ms(1e6 + 1);
ll ans = 0;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0) {
ll m = ... | insert | 16 | 16 | 16 | 18 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
// #define int long long
using ll = long long;
using pii = pair<int, int>;
const int IINF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
const int INF = sizeof(int) == sizeof(long long) ? LINF : IINF;
const ll MOD = 1e9 + 7;
#define for_(i, a, b) for (int i = (a); i < ... | #include <iostream>
using namespace std;
// #define int long long
using ll = long long;
using pii = pair<int, int>;
const int IINF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
const int INF = sizeof(int) == sizeof(long long) ? LINF : IINF;
const ll MOD = 1e9 + 7;
#define for_(i, a, b) for (int i = (a); i < ... | replace | 45 | 53 | 45 | 48 | TLE | |
p03050 | C++ | Runtime Error | #include <iostream>
#include <math.h>
using namespace std;
int main() {
long long ans = 0, N;
cin >> N;
for (int i = 1; i <= sqrt(N) + 1; i++) {
if (N % (N / i - 1) == N / (N / i - 1))
ans += N / i - 1;
}
cout << ans;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
long long ans = 0, N;
cin >> N;
if (N == 1) {
cout << 0;
return 0;
}
for (int i = 1; i <= sqrt(N); i++) {
if (N % (N / i - 1) == N / (N / i - 1))
ans += N / i - 1;
}
cout << ans;
} | replace | 8 | 9 | 8 | 13 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i, a, b) for (int i = a; i < b; i++)
typedef long long ll;
#define int ll
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int, int> pi;
#define trace(x) cout << #x << "... | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i, a, b) for (int i = a; i < b; i++)
typedef long long ll;
#define int ll
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int, int> pi;
#define trace(x) cout << #x << "... | insert | 81 | 81 | 81 | 86 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
ll ans = 0;
ll sq = sqrt(N);
for (ll i = 1; i <= sq; i++) {
if (N % i == 0) {
ll m = N / i - 1;
if (N / m == N % m)
ans += m;
}
}
cout... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
if (N == 1) {
cout << "0" << endl;
return 0;
}
ll ans = 0;
ll sq = sqrt(N);
for (ll i = 1; i <= sq; i++) {
if (N % i == 0) {
ll m = N / i - 1;
... | insert | 8 | 8 | 8 | 12 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for (int i = a; i < (int)b; ++i)
#define rrep(i, n) for (int i = ((int)n - 1); i >= 0; --i)
typedef long long ll;
const int Inf = 1e9;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
int main() {... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for (int i = a; i < (int)b; ++i)
#define rrep(i, n) for (int i = ((int)n - 1); i >= 0; --i)
typedef long long ll;
const int Inf = 1e9;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
int main() {... | replace | 27 | 28 | 27 | 28 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ROUNDUP(divisor, dividend) (divisor + (dividend - 1)) / dividend
long long int n, ans = 0;
std::vector<long long int> v;
std::vector<long long int> enum_div(long long int n) {
std::vector<long long int> ret;
for (long long int i = 1; i * i <= n; i++) {
if (... | #include <bits/stdc++.h>
using namespace std;
#define ROUNDUP(divisor, dividend) (divisor + (dividend - 1)) / dividend
long long int n, ans = 0;
std::vector<long long int> v;
std::vector<long long int> enum_div(long long int n) {
std::vector<long long int> ret;
for (long long int i = 1; i * i <= n; i++) {
if (... | replace | 23 | 24 | 23 | 26 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define reps(i, n) for (int i = 1; i <= (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define int long long
#define itn int
#define pb push_back
#define m_p make_pair
#define m_t meke_tuple
#define p_p(a, b) pb(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define reps(i, n) for (int i = 1; i <= (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define int long long
#define itn int
#define pb push_back
#define m_p make_pair
#define m_t meke_tuple
#define p_p(a, b) pb(... | replace | 84 | 85 | 84 | 88 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif
void init() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
void solve() {
long long n;
scanf("%lld", &n);
long long ans = 0;
for (long long... | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif
void init() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
void solve() {
long long n;
scanf("%lld", &n);
long long ans = 0;
for (long long... | replace | 24 | 25 | 24 | 25 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(false);
ll n;
cin >> n;
ll answer = 0;
for (ll i = 1; i * i <= n; ++i) {
const ll m = (n - i) / i;
if (n % m == n / m) {
answer += m;
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(false);
ll n;
cin >> n;
ll answer = 0;
for (ll i = 1; i * i <= n; ++i) {
const ll m = (n - i) / i;
if (m != 0 && n % m == n / m) {
answ... | replace | 15 | 16 | 15 | 16 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll solve() {
ll N, ans, m2;
ans = 0;
cin >> N;
m2 = 0;
/*
for (ll m = 2; m <= N; ++m) {
if (N > m * m) continue;
if (N / m == N % m) {
m2 = N / m;
cout << N << " = " << m << " * " << m2 << " + " << m2 << end... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll solve() {
ll N, ans, m2;
ans = 0;
cin >> N;
m2 = 0;
/*
for (ll m = 2; m <= N; ++m) {
if (N > m * m) continue;
if (N / m == N % m) {
m2 = N / m;
cout << N << " = " << m << " * " << m2 << " + " << m2 << end... | replace | 27 | 29 | 27 | 31 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
const int MAXN = 1e4 + 5, MAXM = 2e5 + 5, BOUND = 1e7, MOD = 1e9 + 7,
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
const int MAXN = 1e4 + 5, MAXM = 2e5 + 5, BOUND = 1e7, MOD = 1e9 + 7,
... | replace | 45 | 46 | 45 | 46 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> VL;
typedef pair<ll, ll> PLL;
#define pb push_back
#define F first
#define S second
#define fr(i, x, y) for (ll i = x; i < y; i++)
#define frr(i, x, y) for (ll i = x - 1; i >= y; i--)
#define inf 10000000000000000
const ll mod = 99... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> VL;
typedef pair<ll, ll> PLL;
#define pb push_back
#define F first
#define S second
#define fr(i, x, y) for (ll i = x; i < y; i++)
#define frr(i, x, y) for (ll i = x - 1; i >= y; i--)
#define inf 10000000000000000
const ll mod = 99... | replace | 19 | 22 | 19 | 27 | TLE | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef unsigned long long ull;
typedef lon... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef unsigned long long ull;
typedef lon... | replace | 24 | 25 | 24 | 25 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | replace | 70 | 71 | 70 | 71 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#ifdef _DEBUG_
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl
#else
#define dump(val)
#endif
using namespace std;
typedef long long int ll;
template ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#ifdef _DEBUG_
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl
#else
#define dump(val)
#endif
using namespace std;
typedef long long int ll;
template ... | replace | 32 | 33 | 32 | 33 | 0 | |
p03050 | C++ | Runtime Error |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define lint long long
#define ll long long
#define pq priority_queue
long long INF = 1e10;
#define pii pair<long lon... |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define lint long long
#define ll long long
#define pq priority_queue
long long INF = 1e10;
#define pii pair<long lon... | insert | 28 | 28 | 28 | 32 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#ifdef _DEBUG_
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl
#else
#define dump(val)
#endif
using namespace std;
typedef long long int ll;
template ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#ifdef _DEBUG_
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl
#else
#define dump(val)
#endif
using namespace std;
typedef long long int ll;
template ... | replace | 23 | 24 | 23 | 28 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N, sum;
cin >> N;
sum = (ll)0;
for (ll m = 1; m * m <= N; m++) {
ll t = N / m - 1;
if (N / t == N % t) {
sum += t;
}
}
cout << sum << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N, sum;
cin >> N;
sum = (ll)0;
if (N != 1) {
for (ll m = 1; m * m <= N; m++) {
ll t = N / m - 1;
if (N / t == N % t) {
sum += t;
}
}
}
cout << sum << endl;
return 0;
} | replace | 10 | 14 | 10 | 16 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
vector<P> prifac(ll n) {
vector<P> ret;
for (int i = 2; i * i <= n; i++) {
if (n % i == 0) {
int cnt = 0;
while (n % i == 0) {
cnt++;
n /=... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
vector<P> prifac(ll n) {
vector<P> ret;
for (ll i = 2; i * i <= n; i++) {
if (n % i == 0) {
int cnt = 0;
while (n % i == 0) {
cnt++;
n /= ... | replace | 11 | 12 | 11 | 12 | TLE | |
p03050 | Python | Runtime Error | N = int(input())
lim = int(N**0.5) + 1
ans = 0
for i in range(1, lim + 1):
m = N // i
quotient = N // m
while m != 0:
remainder = N % m
if N // m != quotient or remainder > i:
break
if quotient == remainder:
ans += m
break
m -= 1
print(ans)... | N = int(input())
lim = int(N**0.5)
ans = 0
for i in range(1, lim + 1):
m = N // i
quotient = N // m
while m != 0:
remainder = N % m
if N // m != quotient or remainder > i:
break
if quotient == remainder:
ans += m
break
m -= 1
print(ans)
| replace | 1 | 2 | 1 | 2 | 0 | |
p03050 | Python | Runtime Error | import math
N = int(input())
ans = 0
for i in range(1, int(math.sqrt(N)) + 2):
if N % i:
continue
m = N // i - 1
if N // m == N % m:
ans += m
print(ans)
| import math
N = int(input())
ans = 0
for i in range(1, int(math.sqrt(N)) + 2):
if N % i:
continue
m = N // i - 1
if m <= 0:
continue
if N // m == N % m:
ans += m
print(ans)
| insert | 8 | 8 | 8 | 10 | 0 | |
p03050 | Python | Runtime Error | n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
m = n // i - 1
if n % m == n // m:
ans += m
print(ans)
| n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
m = n // i - 1
if m > 0 and n % m == n // m:
ans += m
print(ans)
| replace | 7 | 8 | 7 | 8 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MOD 1000000007
typedef long long ll;
typedef pair<ll, ll> p;
vector<ll> enumeration(ll n) {
vector<ll> result;
for (ll i... | #include <bits/stdc++.h>
using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MOD 1000000007
typedef long long ll;
typedef pair<ll, ll> p;
vector<ll> enumeration(ll n) {
vector<ll> result;
for (ll i... | replace | 16 | 17 | 16 | 17 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
int main() {
long long n;
std::cin >> n;
long long ans = 0;
for (long long i = 1; i <= std::sqrt(n); ++i) {
if (0 == n % i) {
long long divisor = n / i - 1;
if (n / divisor == n % divisor) {
ans ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
int main() {
long long n;
std::cin >> n;
long long ans = 0;
for (long long i = 1; i <= std::sqrt(n); ++i) {
if (0 == n % i) {
long long divisor = n / i - 1;
if (0 != divisor && n / divisor == n % divisor... | replace | 14 | 15 | 14 | 15 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
#define INF 21474... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
#define INF 21474... | insert | 44 | 44 | 44 | 48 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FLASH \
cin.tie(0); \
cout.tie(0); \
ios_base::sync_with_stdio(false);
#define pb push_... | #include <bits/stdc++.h>
#define FLASH \
cin.tie(0); \
cout.tie(0); \
ios_base::sync_with_stdio(false);
#define pb push_... | replace | 23 | 24 | 23 | 27 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#define ll long long int
#define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n)
using namespace std;
ll n;
int main() {
// ll n;
cin >> n;
ll ans = 0;
for (int i = 1; i * i <= n; i++)... | #include <algorithm>
#include <iostream>
#include <math.h>
#define ll long long int
#define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n)
using namespace std;
ll n;
int main() {
// ll n;
cin >> n;
ll ans = 0;
for (ll i = 1; i * i <= n; i++) ... | replace | 15 | 16 | 15 | 16 | TLE | |
p03050 | Python | Runtime Error | n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if n % i == 0 and n // (i - 1) == n % (i - 1):
ans += i - 1
m = n // i - 1
if m > 0 and n % i == 0 and n // m == n % m:
ans += m
print(ans)
| n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if i > 1 and n % i == 0 and n // (i - 1) == n % (i - 1):
ans += i - 1
m = n // i - 1
if m > 0 and n % i == 0 and n // m == n % m:
ans += m
print(ans)
| replace | 4 | 5 | 4 | 5 | ZeroDivisionError: integer division or modulo by zero | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03050/Python/s320442263.py", line 5, in <module>
if n % i == 0 and n // (i - 1) == n % (i - 1):
ZeroDivisionError: integer division or modulo by zero
|
p03050 | Python | Runtime Error | n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
m = n // i - 1
if n % i == 0 and n // m == n % m:
ans += m
print(ans)
| n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
m = n // i - 1
if m > 0 and n % i == 0 and n // m == n % m:
ans += m
print(ans)
| replace | 5 | 6 | 5 | 6 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
set<ll> good;
int main() {
// cout.precision(10);
cin.tie(0);
ios::sync_with_stdio(false);
ll N;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// const ll mod = 1000000007;
set<ll> good;
int main() {
// cout.precision(10);
cin.tie(0);
ios::sync_with_stdio(false);
ll N;
... | insert | 24 | 24 | 24 | 26 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <s... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <s... | replace | 91 | 92 | 91 | 92 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
ll ans = 0;
for (ll i = 1; i <= n; ++i) {
if (n % i)
continue;
ll tmp = n / (i + 1) + 1;
ll up = n / i;
if (up - 1 >= tmp)
ans ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
ll ans = 0;
for (ll i = 1; i <= sqrt(n); ++i) {
if (n % i)
continue;
ll tmp = n / (i + 1) + 1;
ll up = n / i;
if (up - 1 >= tmp)
... | replace | 10 | 11 | 10 | 11 | TLE | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define all(x) x.begin(), x.end()
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define vi vector<int>
#define vc vector<char>
#define vii vector<pii>
#define vvi vector<vi>
#define fori(i, n) for (int i = 1; i <= n; +... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define all(x) x.begin(), x.end()
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define vi vector<int>
#define vc vector<char>
#define vii vector<pii>
#define vvi vector<vi>
#define fori(i, n) for (int i = 1; i <= n; +... | insert | 38 | 38 | 38 | 42 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll(i) = 0; i < (n); ++(i))
#define print(a) cout << (a) << endl
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n, ans = 0;
cin >> n;
for (ll i = 1; i * i <= n; ++i)
if (n % i == 0 && n % (n / i - 1) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll(i) = 0; i < (n); ++(i))
#define print(a) cout << (a) << endl
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n, ans = 0;
cin >> n;
for (ll i = 1; i * i <= n; ++i)
if (n % i == 0 && n / i > 1 && n %... | replace | 12 | 13 | 12 | 13 | 0 | |
p03050 | Python | Runtime Error | n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
m = n // i - 1
if n // m == n % m:
ans += m
print(ans)
| n = int(input())
ans = 0
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
m = n // i - 1
if m != 0 and n // m == n % m:
ans += m
print(ans)
| replace | 6 | 7 | 6 | 7 | 0 | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(long long N) {
// cout << N << endl;
ll ans = 0;
for (ll x = 1; x < N; ++x) {
if ((N - x) % x == 0 && x < (N - x) / x) {
// cout << x << endl;
ans += (N - x) / x;
}
}
cout << ans << endl;
}
// Generated by 1.1... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(long long N) {
// cout << N << endl;
ll ans = 0;
for (ll x = 1; x * x < N - x; ++x) {
if ((N - x) % x == 0) {
// cout << x << endl;
ans += (N - x) / x;
}
}
cout << ans << endl;
}
// Generated by 1.1.4 https://... | replace | 7 | 9 | 7 | 9 | TLE | |
p03050 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
ll cnt = 0;
// vector<ll> ans;
cin >> n;
for (int i = 1; i * i <= n; i++) {
if (n % i == 0) {
ll v = n / i - 1;
if (v > i)
cnt += v;
}
}
cout << cnt << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
ll cnt = 0;
// vector<ll> ans;
cin >> n;
for (int i = 1; i <= 1000000; i++) {
if (n % i == 0) {
ll v = n / i - 1;
if (v > i)
cnt += v;
}
}
cout << cnt << endl;
return 0;
}
| replace | 14 | 15 | 14 | 15 | TLE | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
ty... | replace | 69 | 70 | 69 | 70 | 0 | |
p03050 | C++ | Runtime Error | /*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <unordered_m... | /*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <unordered_m... | replace | 31 | 32 | 31 | 34 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using ll = long long;
class range {
private:
struct I {
int x;
int operator*() { return x; }
bool o... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using ll = long long;
class range {
private:
struct I {
int x;
int operator*() { return x; }
bool o... | insert | 33 | 33 | 33 | 38 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sst... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sst... | replace | 64 | 65 | 64 | 65 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, ans = 0;
cin >> N;
for (int x = 1; x <= sqrt(N); x++) {
if (N % x == 0) {
int64_t a = (N / x) - 1;
if (N / a == N % a)
ans += a;
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, ans = 0;
cin >> N;
for (int x = 1; x <= sqrt(N); x++) {
if (N % x == 0) {
int64_t a = (N / x) - 1;
if (a != 0 && N / a == N % a)
ans += a;
}
}
cout << ans << endl;
}
| replace | 9 | 10 | 9 | 10 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
ll sum = 0;
ll i = 1;
for (; i * i < n; i++) {
if (n / i == n % i)
sum += i;
}
for (; i >= 1; i--) {
ll tmp = (n - i);
ll m = tmp / i;
if (tmp % i)
continue;
if (n / m == n ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll n;
cin >> n;
ll sum = 0;
ll i = 1;
for (; i * i < n; i++) {
if (n / i == n % i)
sum += i;
}
for (; i >= 1; i--) {
ll tmp = (n - i);
if (tmp == 0)
continue;
ll m = tmp / i;
if (tmp % i)
... | insert | 18 | 18 | 18 | 20 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
long long n;
cin >> n;
long long prv = n;
long long ans = 0;
for (long long x = 1; x * x <= n; x++) {
long long start = prv, end = n / (x + 1) + 1;
prv = min(end, start) - 1;
if (start < end)
continue;... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
long long n;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
long long prv = n;
long long ans = 0;
for (long long x = 1; x * x <= n; x++) {
long long start = prv, end = n / (x + 1) + 1;
prv = ... | insert | 7 | 7 | 7 | 11 | 0 | |
p03050 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define forn(i, a, n) for (ll i = a; i < n; i++)
#include <algorithm>
#include <cassert>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#in... | #define _CRT_SECURE_NO_WARNINGS
#define forn(i, a, n) for (ll i = a; i < n; i++)
#include <algorithm>
#include <cassert>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#in... | insert | 66 | 66 | 66 | 71 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#inclu... | insert | 251 | 251 | 251 | 253 | 0 | |
p03050 | C++ | Runtime Error |
/*
@・ω・@
*/
/*****/
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip> //cout << fixed << setprecision(桁数);
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdexcept>
#include <string>
#include <vector>
// #define int long long
using namespace std;... |
/*
@・ω・@
*/
/*****/
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip> //cout << fixed << setprecision(桁数);
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdexcept>
#include <string>
#include <vector>
// #define int long long
using namespace std;... | insert | 142 | 142 | 142 | 147 | 0 | |
p03050 | C++ | Runtime Error | /*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG // FOR THE DEBUG! COMMENT OUT THIS WHEN SUBMITTING!
#endif
/* I REALLY HOPE MY WISH REACH YOU , ATCODER'S ONLINE JUDGE */
#define WOULD
#define YOU
#define... | /*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG // FOR THE DEBUG! COMMENT OUT THIS WHEN SUBMITTING!
#endif
/* I REALLY HOPE MY WISH REACH YOU , ATCODER'S ONLINE JUDGE */
#define WOULD
#define YOU
#define... | insert | 115 | 115 | 115 | 119 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecb2(var, n, m) vec... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecb2(var, n, m) vec... | insert | 51 | 51 | 51 | 53 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
const int INF = 1145141919, MOD = 1e9 + 7;
const long long LINF = 8931145141919364364, LMOD = 998244353;
// const int dx[]={1,0,-1,0,1,1,-1,-1},dy[]={0,-1,0,1,1,-1,-1,1};
int main() {
lon... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
using namespace std;
const int INF = 1145141919, MOD = 1e9 + 7;
const long long LINF = 8931145141919364364, LMOD = 998244353;
// const int dx[]={1,0,-1,0,1,1,-1,-1},dy[]={0,-1,0,1,1,-1,-1,1};
int main() {
lon... | replace | 17 | 19 | 17 | 20 | 0 | |
p03050 | C++ | Runtime Error | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v... | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v... | insert | 45 | 45 | 45 | 49 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll res = 0;
for (ll i = 2; i <= sqrt(n); i++) {
if (n % i... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll res = 0;
for (ll i = 2; i <= sqrt(n); i++) {
if (n % i... | replace | 26 | 28 | 26 | 29 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
int main() {
ll n, ans = 0;
cin >> n;
for (ll i = 1; i * i <= n; i++) {
if (n % i == 0... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
int main() {
ll n, ans = 0;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
... | insert | 16 | 16 | 16 | 20 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define bug(x) cout << "zdongdebug: " << x << endl;
#define bug2(x, y) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define bug(x) cout << "zdongdebug: " << x << endl;
#define bug2(x, y) ... | replace | 30 | 32 | 30 | 32 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define INF 10000000000
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using... | #include <algorithm>
#include <complex>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define INF 10000000000
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using... | insert | 234 | 234 | 234 | 236 | -8 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | replace | 118 | 120 | 118 | 121 | 0 | |
p03050 | C++ | Runtime Error | #include <iostream>
using namespace std;
long long ans, n;
int main() {
cin >> n;
for (long long i = 2; i * i <= n; i++) {
if (n % i == 0) {
long long a, b;
a = n / i;
b = i;
if (n % (a - 1) == n / a)
ans += a - 1;
if (b != a && n % (b - 1) == n / b)
ans += b - 1;... | #include <iostream>
using namespace std;
long long ans, n;
int main() {
cin >> n;
if (n == 1)
return cout << 0, 0;
for (long long i = 2; i * i <= n; i++) {
if (n % i == 0) {
long long a, b;
a = n / i;
b = i;
if (n % (a - 1) == n / a)
ans += a - 1;
if (b != a && n % ... | insert | 7 | 7 | 7 | 9 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
... | replace | 29 | 30 | 29 | 32 | 0 | |
p03050 | C++ | Runtime Error | #include <cmath>
#include <iostream>
using namespace std;
int main() {
long long N;
long long result = 0;
cin >> N;
long long n_sqrt = (long long)floor(sqrt((double)N));
for (long long p = 1; p <= n_sqrt; p++) {
if (N % p == 0) {
long long l = N / p;
if (p == l) {
if (N % (l - 1) == ... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
long long N;
long long result = 0;
cin >> N;
long long n_sqrt = (long long)floor(sqrt((double)N));
for (long long p = 1; p <= n_sqrt; p++) {
if (N % p == 0) {
long long l = N / p;
if (l == 1) {
continue;
}
... | insert | 13 | 13 | 13 | 16 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | replace | 21 | 23 | 21 | 24 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long n, sm;
vector<long long> d;
bool fav(long long x) { return (n % x == (n / x)); }
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
long long i;
for (i = 1; 1LL * i * i < n; i++) {
if (n % i == 0) {
if (i > 1)
... | #include <bits/stdc++.h>
using namespace std;
long long n, sm;
vector<long long> d;
bool fav(long long x) { return (n % x == (n / x)); }
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
if (n == 1)
return cout << 0, 0;
long long i;
for (i = 1; 1LL * i * i < n; i++) {
... | insert | 14 | 14 | 14 | 16 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.