diff --git a/S2OJ/1118/1118.cpp b/S2OJ/1118/1118.cpp new file mode 100644 index 00000000..522460c8 --- /dev/null +++ b/S2OJ/1118/1118.cpp @@ -0,0 +1,11 @@ +#include + +using namespace std; + +int n, l, r; + +int main() { + cin >> n >> l >> r; + cout << min((int)(ceil(1.0 * l / n) * n + n - 1), r) % n << endl; + return 0; +}