# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
931844 | 2024-02-22T12:25:37 Z | 12345678 | Strange Device (APIO19_strange_device) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long const int nx=1e6+5; ll n, a, b, l(nx), r(nx); int main() { cin.tie(NULL)->sync_with_stdio(false); cin>>n>>a>>b>>l[0]>>r[0]; //for (int i=1; i<=20; i++) cout<<i<<' '<<i+(i/b)<<' '<<(i+(i/b))%a<<' '<<i%b<<'\n'; cout<<min(a*b, r-l+1); }