# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
698843 | 2023-02-14T12:45:52 Z | Abrar_Al_Samit | 이상한 기계 (APIO19_strange_device) | C++17 | 1 ms | 468 KB |
#include<bits/stdc++.h> using namespace std; long long gcd(long long x, long long y) { if (y == 0) return x; return gcd(y, x%y); } void PlayGround() { long long n, a, b; cin>>n>>a>>b; assert(n==1); vector<array<long long,2>>iner(n); for(int i=0; i<n; ++i) { cin>>iner[i][0]>>iner[i][1]; } long long g = gcd(a, b+1); long long interval = (a / gcd(a, b+1)) * b; cout<<min(iner[0][1]-iner[0][0]+1, interval)<<'\n'; // cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); PlayGround(); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Incorrect | 0 ms | 212 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1 ms | 468 KB | Execution killed with signal 6 |
3 | Halted | 0 ms | 0 KB | - |