Submission #319595

#TimeUsernameProblemLanguageResultExecution timeMemory
319595kaplanbarUzastopni (COCI17_uzastopni)C++14
72 / 80
2 ms492 KiB
#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 timeMemoryGrader output
Fetching results...