# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892088 | Isam | Uzastopni (COCI17_uzastopni) | C++17 | 1 ms | 508 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |