| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1368246 | husseinjuanda | Strange Device (APIO19_strange_device) | C++20 | 0 ms | 348 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, A, B; cin >> n >> A >> B;
int l, r; cin >> l >> r;
int j = lcm(A, B+1);
j = j/(B+1);
cout << min(j*B, r-l+1) << "\n";
// int t = 0;
// map<pair<int, int>, bool> m;
// for(int i = l; i <= r; i++){
// t++;
// m[{(t+t/B)%A, {t%B}}] = true;
// }
// cout << m.size() << "\n";
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
