# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
892088 | Isam | Uzastopni (COCI17_uzastopni) | C++17 | 1 ms | 508 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#ifdef DEBUG
#include "debug.h"
#else
#define debug(...) void(37)
#endif
using namespace std;
constexpr int sz = 1e5 + 5;
signed main(){
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
long long N;
cin >> N;
N <<= 1;
for(register int i = 1; 1ll * i * i <= N; ++i){
if(N % i == 0){
if((i + N / i + 1) % 2 == 0){
int b = (i + N / i + 1) / 2;
int a = b - i; --b;
if(a > 0 && b > 0 && b > a){
cout << a << ' ' << b << '\n';
}
}
}
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |