# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
497963 | dannyboy20031204 | Vepar (COCI21_vepar) | C++17 | 293 ms | 18504 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long
#define int long long
#define fi first
#define se second
#define mp make_pair
using namespace std;
void db() {cout << endl;}
template <typename T, typename ...U> void db(T a, U ...b) {
//return;
cout << a << ' ', db(b...);
}
#ifdef Cloud
#define file freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#else
#define file ios::sync_with_stdio(false); cin.tie(0)
#endif
const int inf = 1e9 + 1, N = 1e7 + 1, mod = 1e9 + 7;
vector<int> p;
int cnt(int l, int r, int x){
return r / x - (l - 1) / x;
}
void solve(){
int a, b, c, d;
cin >> a >> b >> c >> d;
for (int i : p){
ll x = i, pre1 = 0, pre2 = 0, pw = 1, sum = 0;
while (x * i <= N) x *= i, pw++;
for (ll j = x; j > 1; j /= i){
sum += pw * (cnt(c, d, j) - pre1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |