# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
519328 | tibinyte | 이상한 기계 (APIO19_strange_device) | C++14 | 771 ms | 64708 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>
using namespace std;
bool will_overflow(long long a, long long b) {
long long c = a * b;
if (a != c / b) {
return true;
}
return false;
}
long long gcd(long long a, long long b) {
while (b) {
long long c = a % b;
a = b;
b = c;
}
return a;
}
int main() {
cin.tie(nullptr)->ios_base::sync_with_stdio(false);
long long n, a, b;
cin >> n >> a >> b;
long long p = 0;
if (log10((double)a / (double)gcd(b + 1, a)) + log10(b) >= 18) {
p = 1e18 + 1;
}
else {
p = a / gcd(a, b + 1) * b;
}
map<long long, long long> wh;
auto update = [&](long long st, long long dr) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |