# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
319595 | kaplanbar | Uzastopni (COCI17_uzastopni) | C++14 | 2 ms | 492 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>
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
for(int k = 2; k <= 1e5; k++) {
ll go = 1ll * k * (k - 1);
go /= 2;
if(go < n && (n - go) % k == 0) {
cout << (n - go) / k << " " << (n - go) / k + k - 1 << "\n";
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |